|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.db.DB_Oracle
public class DB_Oracle
Oracle Database Port
| Field Summary | |
|---|---|
static int |
DEFAULT_CM_PORT
Default Connection Manager Port |
static int |
DEFAULT_PORT
Default Port |
static String |
DRIVER
Driver Class Name |
| Fields inherited from interface org.compiere.db.CompiereDatabase |
|---|
CMD_CREATE_DATABASE, CMD_CREATE_USER, CMD_DROP_DATABASE |
| Constructor Summary | |
|---|---|
DB_Oracle()
Oracle Database |
|
| Method Summary | |
|---|---|
void |
cleanup()
Clean up |
void |
close()
Close |
String |
convertStatement(String oraStatement)
Convert an individual Oracle Style statements to target database statement syntax. |
String |
getAlternativeSQL(int reExNo,
String msg,
String sql)
Check and generate an alternative SQL |
Blob |
getBlob(Connection con,
byte[] bytes)
Get the Database specific Blob data type |
Connection |
getCachedConnection(CConnection connection,
boolean autoCommit,
int transactionIsolation)
Get new Connection from cache |
String |
getCatalog()
Get JDBC Catalog |
Clob |
getClob(Connection con,
String clobString)
Get the Database specific Clob data type |
String[] |
getCommands(int cmdType)
Get SQL Commands. |
String |
getConnectionURL(CConnection connection)
Get Database Connection String. |
String |
getConnectionURL(String dbHost,
int dbPort,
String dbName,
String userName)
Get Connection URL. |
String |
getConnectionURL(String connectionURL,
String userName)
Get Database Connection String |
String |
getConstraintType(Connection conn,
String tableName,
String IXName)
Get constraint type associated with the index |
DataSource |
getDataSource(CConnection connection)
Create DataSource |
String |
getDataType(int displayType,
int precision,
boolean defaultValue)
Get Data Type |
String |
getDescription()
Get Database Description |
Driver |
getDriver()
Get and register Database Driver |
Connection |
getDriverConnection(CConnection connection)
Get new Connection from Driver |
Connection |
getDriverConnection(String dbUrl,
String dbUid,
String dbPwd)
Get new Driver Connection |
String |
getName()
Get Database Name |
String |
getSchema()
Get JDBC Schema |
int |
getStandardPort()
Get Standard JDBC Port |
String |
getStatus()
Get Status |
String |
getSystemDatabase(String databaseName)
Get Name of System Database |
String |
getSystemUser()
Get Name of System User |
String |
getType()
Return the Type |
boolean |
handleAbandonedConnection(oracle.jdbc.OracleConnection conn,
Object userObject)
Handle Abandoned Connection |
boolean |
isConnectionValid(Connection conn)
Check if a connect is valid conn Connection |
boolean |
isSupported(String sql)
Check if DBMS support the sql statement |
static void |
main(String[] args)
Testing |
String |
nullValue(String sqlClause,
int dataType)
Get a string representation of literal used in SQL clause |
void |
releaseConnection(oracle.jdbc.OracleConnection conn,
Object userObject)
Release Connection |
boolean |
supportsBLOB()
Supports BLOB |
String |
TO_CHAR(String columnName,
int displayType,
String AD_Language)
Create SQL for formatted Date, Number |
String |
TO_DATE(Timestamp time,
boolean dayOnly)
Create SQL TO Date String from Timestamp |
String |
TO_NUMBER(BigDecimal number,
int displayType)
Return number as string for INSERT statements with correct precision |
String |
toString()
String Representation |
String |
updateSetSelectList(String sql)
jz change update set (...) = (select ... from ) standard format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DRIVER
public static final int DEFAULT_PORT
public static final int DEFAULT_CM_PORT
| Constructor Detail |
|---|
public DB_Oracle()
| Method Detail |
|---|
public boolean isConnectionValid(Connection conn)
isConnectionValid in interface CompiereDatabaseconn - Connection
public String getType()
getType in interface CompiereDatabasepublic String getName()
getName in interface CompiereDatabasepublic String getDescription()
getDescription in interface CompiereDatabasepublic int getStandardPort()
getStandardPort in interface CompiereDatabase
public Driver getDriver()
throws SQLException
getDriver in interface CompiereDatabaseSQLExceptionpublic String getConnectionURL(CConnection connection)
Timing: - CM with source_route not in address_list = 28.5 sec - CM with source_route in address_list = 58.0 sec - direct = 4.3-8 sec (no real difference if on other box) - bequeath = 3.4-8 sec
getConnectionURL in interface CompiereDatabaseconnection - Connection Descriptor
public String getConnectionURL(String dbHost,
int dbPort,
String dbName,
String userName)
getConnectionURL in interface CompiereDatabasedbHost - db HostdbPort - db PortdbName - db NameuserName - user name
public String getConnectionURL(String connectionURL,
String userName)
getConnectionURL in interface CompiereDatabaseconnectionURL - Connection URLuserName - user name
public String getCatalog()
getCatalog in interface CompiereDatabasepublic String getSchema()
getSchema in interface CompiereDatabasepublic boolean supportsBLOB()
supportsBLOB in interface CompiereDatabasepublic String toString()
toString in interface CompiereDatabasetoString in class Objectpublic String getStatus()
getStatus in interface CompiereDatabasepublic String convertStatement(String oraStatement)
convertStatement in interface CompiereDatabaseoraStatement - oracle statement
public boolean isSupported(String sql)
isSupported in interface CompiereDatabase
public String getConstraintType(Connection conn,
String tableName,
String IXName)
getConstraintType in interface CompiereDatabasepublic String getSystemUser()
getSystemUser in interface CompiereDatabasepublic String getSystemDatabase(String databaseName)
getSystemDatabase in interface CompiereDatabasedatabaseName - database Name
public String TO_DATE(Timestamp time,
boolean dayOnly)
TO_DATE in interface CompiereDatabasetime - Date to be converteddayOnly - true if time set to 00:00:00
public String TO_CHAR(String columnName,
int displayType,
String AD_Language)
TO_CHAR in interface CompiereDatabasecolumnName - the column name in the SQLdisplayType - Display TypeAD_Language - 6 character language setting (from Env.LANG_*)
DisplayType,
Env
public String TO_NUMBER(BigDecimal number,
int displayType)
TO_NUMBER in interface CompiereDatabasenumber - numberdisplayType - display Type
public String[] getCommands(int cmdType)
getCommands in interface CompiereDatabasecmdType - CMD_*
public DataSource getDataSource(CConnection connection)
getDataSource in interface CompiereDatabaseconnection - connection
public Connection getCachedConnection(CConnection connection,
boolean autoCommit,
int transactionIsolation)
throws Exception
getCachedConnection in interface CompiereDatabaseconnection - infoautoCommit - true if autocommit connectiontransactionIsolation - Connection transaction level
Exception
public Connection getDriverConnection(CConnection connection)
throws SQLException
getDriverConnection in interface CompiereDatabaseconnection - info
SQLException
public Connection getDriverConnection(String dbUrl,
String dbUid,
String dbPwd)
throws SQLException
getDriverConnection in interface CompiereDatabasedbUrl - URLdbUid - userdbPwd - password
SQLExceptionpublic void close()
close in interface CompiereDatabasepublic void cleanup()
public boolean handleAbandonedConnection(oracle.jdbc.OracleConnection conn,
Object userObject)
conn - connectionuserObject -
public void releaseConnection(oracle.jdbc.OracleConnection conn,
Object userObject)
conn - connectionuserObject -
public String getDataType(int displayType,
int precision,
boolean defaultValue)
displayType - display typeprecision - precisiondefaultValue - if true adds default value
public String getAlternativeSQL(int reExNo,
String msg,
String sql)
getAlternativeSQL in interface CompiereDatabasepublic String updateSetSelectList(String sql)
updateSetSelectList in interface CompiereDatabasesql - update clause
public String nullValue(String sqlClause,
int dataType)
nullValue in interface CompiereDatabasesqlClause - "S", "U","I", "W"dataType - java.sql.Types
public Clob getClob(Connection con,
String clobString)
getClob in interface CompiereDatabaseconnection - connectionclobString - clob string
public Blob getBlob(Connection con,
byte[] bytes)
getBlob in interface CompiereDatabaseconnection - connectionbytes - bytes
public static void main(String[] args)
args - ignored
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||