|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.sql.DBDictionary
org.apache.openjpa.jdbc.sql.InformixDictionary
public class InformixDictionary
Dictionary for Informix database. Notable features:
lockWaitSeconds and lockModeEnabled.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.DBDictionary |
|---|
DBDictionary.SerializedData |
| Field Summary | |
|---|---|
boolean |
lockModeEnabled
If true, then we will issue a "SET LOCK MODE TO WAIT N" statement whenever we create a Connection, in order
allow waiting on locks. |
int |
lockWaitSeconds
If lockModeEnabled is true, then this
parameter specifies the number of seconds we will wait to
obtain a lock for inserts and pessimistic locking. |
boolean |
swapSchemaAndCatalog
Informix JDBC metadata for all known drivers returns with the table catalog and the table schema name swapped. |
| Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes |
|---|
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL |
| Constructor Summary | |
|---|---|
InformixDictionary()
|
|
| Method Summary | |
|---|---|
void |
connectedConfiguration(Connection conn)
This method is called when the dictionary first sees any connection. |
Connection |
decorate(Connection conn)
Decorate the given connection if needed. |
String[] |
getAddForeignKeySQL(ForeignKey fk)
Return a series of SQL statements to add the given foreign key to its table. |
String[] |
getAddPrimaryKeySQL(PrimaryKey pk)
Return a series of SQL statements to add the given primary key to its table. |
Column[] |
getColumns(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
String columnName,
Connection conn)
Reflect on the schema to find columns matching the given table and column patterns. |
String[] |
getCreateTableSQL(Table table)
Return a series of SQL statements to create the given table, complete with columns. |
Column |
newColumn(ResultSet colMeta)
Create a new column from the information in the schema metadata. |
Index |
newIndex(ResultSet idxMeta)
Create a new index from the information in the schema metadata. |
PrimaryKey |
newPrimaryKey(ResultSet pkMeta)
Create a new primary key from the information in the schema metadata. |
void |
setBoolean(PreparedStatement stmnt,
int idx,
boolean val,
Column col)
Set the given value as a parameter to the statement. |
boolean |
supportsRandomAccessResultSet(Select sel,
boolean forUpdate)
Return false if the given select requires a forward-only result set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean lockModeEnabled
Connection, in order
allow waiting on locks.
public int lockWaitSeconds
lockModeEnabled is true, then this
parameter specifies the number of seconds we will wait to
obtain a lock for inserts and pessimistic locking.
public boolean swapSchemaAndCatalog
true
value for this property indicates that they should be reversed.
| Constructor Detail |
|---|
public InformixDictionary()
| Method Detail |
|---|
public void connectedConfiguration(Connection conn)
throws SQLException
DBDictionarysuper.connectedConfiguration.
connectedConfiguration in class DBDictionarySQLException
public Column[] getColumns(DatabaseMetaData meta,
String catalog,
String schemaName,
String tableName,
String columnName,
Connection conn)
throws SQLException
DBDictionary
getColumns in class DBDictionarySQLException
public Column newColumn(ResultSet colMeta)
throws SQLException
DBDictionary
newColumn in class DBDictionarySQLException
public PrimaryKey newPrimaryKey(ResultSet pkMeta)
throws SQLException
DBDictionary
newPrimaryKey in class DBDictionarySQLException
public Index newIndex(ResultSet idxMeta)
throws SQLException
DBDictionary
newIndex in class DBDictionarySQLException
public void setBoolean(PreparedStatement stmnt,
int idx,
boolean val,
Column col)
throws SQLException
DBDictionary
setBoolean in class DBDictionarySQLExceptionpublic String[] getCreateTableSQL(Table table)
DBDictionary
getCreateTableSQL in class DBDictionarypublic String[] getAddPrimaryKeySQL(PrimaryKey pk)
DBDictionaryALTER TABLE <table name> ADD
<pk cons sql > by default.
getAddPrimaryKeySQL in class DBDictionarypublic String[] getAddForeignKeySQL(ForeignKey fk)
DBDictionaryALTER TABLE <table name> ADD
<fk cons sql > by default.
getAddForeignKeySQL in class DBDictionary
public boolean supportsRandomAccessResultSet(Select sel,
boolean forUpdate)
DBDictionary
supportsRandomAccessResultSet in class DBDictionary
public Connection decorate(Connection conn)
throws SQLException
DBDictionaryDBDictionary.initializationSQL that has been set for the dictionary but
does not decoreate the connection.
decorate in interface ConnectionDecoratordecorate in class DBDictionarySQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||