Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.dt.trees.utils
Class DatabaseUtils

java.lang.Object
  extended by oracle.apps.fnd.applcore.dt.trees.utils.DatabaseUtils

public final class DatabaseUtils
extends java.lang.Object

Utility class for all the database related methods.

Author:
Pallavi Palparthy <pallavi.palparthy@oracle.com>

Method Summary
static boolean deleteConnection(java.lang.String connectionName)
          Method to delete a database connection when delete button is pressed.
static java.sql.Connection getConnectionObjectToSelectedDB(java.lang.String connectionName)
          getConnectionObjectToSelectedDB returns the ConnectionObject for the selected database in the ComboBox.
static java.util.List getDatabaseConnections()
          getDatabaseConnections is the main method which retrieves all the connections.
static java.util.List<TreeStructureCodes> getTreeStructureCodesFromDB(java.sql.Connection conn)
          Method to query Objects of TreeStructureCodes for the Tree Structure ComboBox.
static java.util.List<TreeAttribute> getTreeTableAttributes(java.lang.String treeStructureCode, java.sql.Connection connection, java.util.Locale l)
          Gets the Tree Structure Attributes.
static boolean isDateCol(int colType)
          Does colType represent one of the java.sql.Types representing a primitive date.
static boolean isNumericCol(int colType)
          Does colType represent one of the java.sql.Types representing a primitive number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTreeStructureCodesFromDB

public static java.util.List<TreeStructureCodes> getTreeStructureCodesFromDB(java.sql.Connection conn)
Method to query Objects of TreeStructureCodes for the Tree Structure ComboBox.

Parameters:
conn - a non - null connection
Returns:
List<TreeStructureCodes> List of TreeStructureCodes

getDatabaseConnections

public static java.util.List getDatabaseConnections()
getDatabaseConnections is the main method which retrieves all the connections.

Returns:
ArrayList of Connection Names

getConnectionObjectToSelectedDB

public static java.sql.Connection getConnectionObjectToSelectedDB(java.lang.String connectionName)
getConnectionObjectToSelectedDB returns the ConnectionObject for the selected database in the ComboBox.

Parameters:
connectionName - String
Returns:
Connection Object

isNumericCol

public static boolean isNumericCol(int colType)
Does colType represent one of the java.sql.Types representing a primitive number.

Parameters:
colType - integer value
Returns:
true if numeric type, false otherwise

isDateCol

public static boolean isDateCol(int colType)
Does colType represent one of the java.sql.Types representing a primitive date.

Parameters:
colType - Integer value
Returns:
true if date type, false otherwise

getTreeTableAttributes

public static java.util.List<TreeAttribute> getTreeTableAttributes(java.lang.String treeStructureCode,
                                                                   java.sql.Connection connection,
                                                                   java.util.Locale l)
Gets the Tree Structure Attributes.

Parameters:
treeStructureCode - String value
connection - Connection Object
l - locale
Returns:
Vector of Labels

deleteConnection

public static boolean deleteConnection(java.lang.String connectionName)
Method to delete a database connection when delete button is pressed.

Parameters:
connectionName - String value
Returns:
boolean success value

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.