|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CompiereDatabase
Interface for Compiere Databases
| Field Summary | |
|---|---|
static int |
CMD_CREATE_DATABASE
Create Database/Schema Commands |
static int |
CMD_CREATE_USER
Create User commands |
static int |
CMD_DROP_DATABASE
Drop Database/Schema Commands |
| Method Summary | |
|---|---|
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 connection,
byte[] bytes)
Get the Database specific Blob data type |
Connection |
getCachedConnection(CConnection connection,
boolean autoCommit,
int transactionIsolation)
Get new Cached Connection on Server |
String |
getCatalog()
Get JDBC Catalog |
Clob |
getClob(Connection connection,
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 |
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 |
isConnectionValid(Connection conn)
Check if a connect is valid |
boolean |
isSupported(String sql)
Check if DBMS support the sql statement or the function |
String |
nullValue(String sqlClause,
int dataType)
Get a string representation of literal used in SQL clause |
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)
change update set (...) = (select ... from ) standard format |
| Field Detail |
|---|
static final int CMD_CREATE_USER
static final int CMD_CREATE_DATABASE
static final int CMD_DROP_DATABASE
| Method Detail |
|---|
boolean isConnectionValid(Connection conn)
conn - Connection
String getType()
String getName()
String getDescription()
Driver getDriver()
throws SQLException
SQLExceptionint getStandardPort()
String getConnectionURL(CConnection connection)
connection - Connection Descriptor
String getConnectionURL(String dbHost,
int dbPort,
String dbName,
String userName)
dbHost - db HostdbPort - db PortdbName - db NameuserName - user name
String getConnectionURL(String connectionURL,
String userName)
connectionURL - Connection URLuserName - user name
String getCatalog()
String getSchema()
boolean supportsBLOB()
String toString()
toString in class ObjectString convertStatement(String oraStatement)
oraStatement - oracle statement
boolean isSupported(String sql)
String updateSetSelectList(String sql)
sql - update clause
String getConstraintType(Connection conn,
String tableName,
String IXName)
String getAlternativeSQL(int reExNo,
String msg,
String sql)
String getSystemUser()
String getSystemDatabase(String databaseName)
databaseName - database Name
String TO_DATE(Timestamp time,
boolean dayOnly)
time - Date to be converteddayOnly - true if time set to 00:00:00
String TO_CHAR(String columnName,
int displayType,
String AD_Language)
columnName - the column name in the SQLdisplayType - Display TypeAD_Language - 6 character language setting (from Env.LANG_*)
DisplayType,
Env
String TO_NUMBER(BigDecimal number,
int displayType)
number - numberdisplayType - display Type
String nullValue(String sqlClause,
int dataType)
sqlClause - "S", "U","I", "W"dataType - java.sql.Types
String[] getCommands(int cmdType)
The following variables are resolved:
- Parameters:
cmdType - CMD_*
- Returns:
- array of commands to be executed
Connection getCachedConnection(CConnection connection,
boolean autoCommit,
int transactionIsolation)
throws Exception
connection - infoautoCommit - true if autocommit connectiontransactionIsolation - Connection transaction level
Exception
Connection getDriverConnection(CConnection connection)
throws SQLException
connection - info
SQLException
Connection getDriverConnection(String dbUrl,
String dbUid,
String dbPwd)
throws SQLException
dbUrl - URLdbUid - userdbPwd - password
SQLExceptionDataSource getDataSource(CConnection connection)
connection - connection
String getStatus()
void close()
Clob getClob(Connection connection,
String clobString)
connection - connectionclobString - clob string
Blob getBlob(Connection connection,
byte[] bytes)
connection - connectionbytes - bytes
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||