|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
DBDictionary
super.connectedConfiguration
.
connectedConfiguration
in class DBDictionary
SQLException
public Column[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String columnName, Connection conn) throws SQLException
DBDictionary
getColumns
in class DBDictionary
SQLException
public Column newColumn(ResultSet colMeta) throws SQLException
DBDictionary
newColumn
in class DBDictionary
SQLException
public PrimaryKey newPrimaryKey(ResultSet pkMeta) throws SQLException
DBDictionary
newPrimaryKey
in class DBDictionary
SQLException
public Index newIndex(ResultSet idxMeta) throws SQLException
DBDictionary
newIndex
in class DBDictionary
SQLException
public void setBoolean(PreparedStatement stmnt, int idx, boolean val, Column col) throws SQLException
DBDictionary
setBoolean
in class DBDictionary
SQLException
public String[] getCreateTableSQL(Table table)
DBDictionary
getCreateTableSQL
in class DBDictionary
public String[] getAddPrimaryKeySQL(PrimaryKey pk)
DBDictionary
ALTER TABLE <table name> ADD
<pk cons sql >
by default.
getAddPrimaryKeySQL
in class DBDictionary
public String[] getAddForeignKeySQL(ForeignKey fk)
DBDictionary
ALTER 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
DBDictionary
DBDictionary.initializationSQL
that has been set for the dictionary but
does not decoreate the connection.
decorate
in interface ConnectionDecorator
decorate
in class DBDictionary
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |