|
||||||||||
| 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.AbstractDB2Dictionary
org.apache.openjpa.jdbc.sql.DB2Dictionary
public class DB2Dictionary
Dictionary for IBM DB2 database.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.DBDictionary |
|---|
DBDictionary.SerializedData |
| Field Summary | |
|---|---|
String |
optimizeClause
|
String |
rowClause
|
| Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes |
|---|
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL |
| Constructor Summary | |
|---|---|
DB2Dictionary()
|
|
| Method Summary | |
|---|---|
protected void |
appendSelectRange(SQLBuffer buf,
long start,
long end)
If this dictionary can select ranges, use this method to append the range SQL. |
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. |
protected int |
generateVersionNumber(String versionString)
Get the version number for the ISeries |
String[] |
getCreateSequenceSQL(Sequence seq)
Return a series of SQL statements to create the given sequence. |
int |
getDb2ServerType()
|
protected String |
getForUpdateClause(JDBCFetchConfiguration fetch,
boolean forUpdate)
Get the update clause for the query based on the updateClause and isolationLevel hints |
protected String |
getSequencesSQL(String schemaName,
String sequenceName)
Return the SQL needed to select the list of sequences. |
boolean |
isDB2ISeriesV5R3AndEarlier(DatabaseMetaData metadata)
|
boolean |
isDB2ISeriesV5R4AndLater(DatabaseMetaData metadata)
|
boolean |
isDB2UDBV81OrEarlier(DatabaseMetaData metadata,
int maj,
int min)
|
boolean |
isDB2UDBV82AndLater(DatabaseMetaData metadata,
int maj,
int min)
|
boolean |
isDB2ZOSV8xOrLater(DatabaseMetaData metadata,
int maj)
|
OpenJPAException |
newStoreException(String msg,
SQLException[] causes,
Object failed)
Return a new exception that wraps causes. |
boolean |
supportsRandomAccessResultSet(Select sel,
boolean forUpdate)
Return false if the given select requires a forward-only result set. |
SQLBuffer |
toSelect(Select sel,
boolean forUpdate,
JDBCFetchConfiguration fetch)
Create a SELECT statement in the proper join syntax for the given instance. |
| Methods inherited from class org.apache.openjpa.jdbc.sql.AbstractDB2Dictionary |
|---|
indexOf, substring |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String optimizeClause
public String rowClause
| Constructor Detail |
|---|
public DB2Dictionary()
| Method Detail |
|---|
public boolean supportsRandomAccessResultSet(Select sel,
boolean forUpdate)
DBDictionary
supportsRandomAccessResultSet in class DBDictionary
protected void appendSelectRange(SQLBuffer buf,
long start,
long end)
DBDictionary
appendSelectRange in class DBDictionarypublic String[] getCreateSequenceSQL(Sequence seq)
DBDictionaryCREATE SEQUENCE <sequence name>[ START WITH <start>]
[ INCREMENT BY <increment>] by default.
getCreateSequenceSQL in class DBDictionary
protected String getSequencesSQL(String schemaName,
String sequenceName)
DBDictionary
getSequencesSQL 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
public void connectedConfiguration(Connection conn)
throws SQLException
DBDictionarysuper.connectedConfiguration.
connectedConfiguration in class DBDictionarySQLException
protected String getForUpdateClause(JDBCFetchConfiguration fetch,
boolean forUpdate)
getForUpdateClause in class DBDictionary
public boolean isDB2UDBV82AndLater(DatabaseMetaData metadata,
int maj,
int min)
throws SQLException
SQLException
public boolean isDB2ZOSV8xOrLater(DatabaseMetaData metadata,
int maj)
throws SQLException
SQLException
public boolean isDB2ISeriesV5R3AndEarlier(DatabaseMetaData metadata)
throws SQLException
SQLException
public boolean isDB2ISeriesV5R4AndLater(DatabaseMetaData metadata)
throws SQLException
SQLException
public boolean isDB2UDBV81OrEarlier(DatabaseMetaData metadata,
int maj,
int min)
throws SQLException
SQLExceptionprotected int generateVersionNumber(String versionString)
public SQLBuffer toSelect(Select sel,
boolean forUpdate,
JDBCFetchConfiguration fetch)
DBDictionary
toSelect in class DBDictionary
public OpenJPAException newStoreException(String msg,
SQLException[] causes,
Object failed)
DBDictionarycauses.
However, the details of exactly what type of exception is returned can
be determined by the implementation. This may take into account
DB-specific exception information in causes.
newStoreException in class DBDictionarypublic int getDb2ServerType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||