|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colle.sql.schema.RDBMSRuntime
Abstraction of known differences in RDBMS systems. Created: 21 Feb 2001
Field Summary | |
static int |
ERROR_CONSTRAINT_VIOLATED
|
static int |
ERROR_DUPLICATE_ROW
|
static int |
ERROR_UNKNOWN
|
Constructor Summary | |
RDBMSRuntime()
|
Method Summary | |
abstract void |
createSequence(String psSequenceName,
int pnStartWith,
int pnIncrementBy,
Connection pxConnection)
Create a new sequence. |
abstract void |
dropSequence(String psSequenceName,
Connection pxConnection)
Drop the sequence from the database. |
String |
getCreatTableSuffix()
Returns the vendor specific text to put at the end of a create table call so MySQL can turn on transactions. |
String |
getDatabaseURL(String psServer,
String psDatabase,
Integer pnPort)
Forms a DBMS specific database URL from the information provided. |
abstract int |
getErrorCode(SQLException pxException)
Return error code (ERROR_*) for SQLException. |
static RDBMSRuntime |
getInstance()
|
abstract int |
getNextValue(String psSequenceName,
Connection pxConnection)
Request a unique identifier for the following sequence name. |
abstract ResultSet |
getTables(String psTable,
Connection pxConnection)
Wraps calls to DatabaseMetaData.getTables(). |
String |
getTruncName(String psName)
Truncate a name value to a maximum size for a specific database. |
boolean |
isIndexRequiredOnForeignKey()
Returns true if RDBMS requires an explicit index on content before creating a foreign key. |
abstract void |
loadCSVFile(Table pxTable,
String psCSVFile,
Connection pxConnection)
Loads a CSV file into a table. |
void |
lockTable(String psTableName,
Connection pxConnection)
Locks a table for multiple operations. |
void |
lockTables(String[] pxTableNames,
Connection pxConnection)
Locks several tables at once. |
String |
mapJDBCType(String psJDBCType,
int pnLength,
boolean pbNullable)
Re-maps JDBC data types to vendor specific data types. |
void |
unlockTable(String psTableName,
Connection pxConnection)
Unlocks a table previously locked with lockTable. |
void |
unlockTables(String[] pxTableNames,
Connection pxConnection)
Unlocks tables previously locked with lockTables. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ERROR_UNKNOWN
public static final int ERROR_DUPLICATE_ROW
public static final int ERROR_CONSTRAINT_VIOLATED
Constructor Detail |
public RDBMSRuntime()
Method Detail |
public static RDBMSRuntime getInstance()
public abstract int getErrorCode(SQLException pxException)
pxException
- SQL Exception
public String getTruncName(String psName)
psName
- name to be truncated
public abstract ResultSet getTables(String psTable, Connection pxConnection) throws SQLException
SQLException
public abstract void loadCSVFile(Table pxTable, String psCSVFile, Connection pxConnection)
public String mapJDBCType(String psJDBCType, int pnLength, boolean pbNullable)
public String getCreatTableSuffix()
public boolean isIndexRequiredOnForeignKey()
public abstract void dropSequence(String psSequenceName, Connection pxConnection)
psSequenceName
- name to sequencepxConnection
- database connectionpublic abstract void createSequence(String psSequenceName, int pnStartWith, int pnIncrementBy, Connection pxConnection)
psSequenceName
- name to sequencepnStartWith
- starting value of the sequencepnIncrementBy
- increment bypxConnection
- database connectionpublic abstract int getNextValue(String psSequenceName, Connection pxConnection)
psSequenceName
- name to sequencepxConnection
- database connection
public String getDatabaseURL(String psServer, String psDatabase, Integer pnPort)
psServer
- IP address or computer name of the server. Will not be
null.psDatabase
- name of the database. May be null if the application
does not define.pnPort
- port number of the server. May be null if the application
does not define.public void lockTable(String psTableName, Connection pxConnection) throws SQLException
SQLException
public void lockTables(String[] pxTableNames, Connection pxConnection) throws SQLException
SQLException
lockTable(java.lang.String, java.sql.Connection)
public void unlockTable(String psTableName, Connection pxConnection) throws SQLException
SQLException
public void unlockTables(String[] pxTableNames, Connection pxConnection) throws SQLException
SQLException
unlockTable(java.lang.String, java.sql.Connection)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |