|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.cpa.persistence.sql.driver.BaseFactory
org.castor.cpa.persistence.sql.driver.GenericFactory
org.castor.cpa.persistence.sql.driver.DB2Factory
public final class DB2Factory
PersistenceFactory for IBM DB2 driver.
| Field Summary | |
|---|---|
static String |
FACTORY_NAME
Internal name of this PersistenceFactory instance. |
| Constructor Summary | |
|---|---|
DB2Factory()
|
|
| Method Summary | |
|---|---|
String |
getFactoryName()
Returns the name of this factory. |
String |
getIdentitySelectString(String tableName,
String columnName)
Returns the database specific query string for retrieving last identity value. |
QueryExpression |
getQueryExpression()
Returns a new empty query expression suitable for the underlying SQL engine. |
String |
getSequenceBeforeSelectString(String seqName,
String tableName,
int increment)
Returns the database specific SELECT query string for fetching identity before the next INSERT statement gets executed. |
boolean |
isKeyGeneratorIdentitySupported()
Does persistence factory support generation of unique keys with identity key generator? |
boolean |
isKeyGeneratorIdentityTypeSupported(int type)
Does identity key generator support generation of unique keys for the given SQL type? |
boolean |
isKeyGeneratorSequenceSupported(boolean returning,
boolean trigger)
Does persistence factory support generation of new key at the time of new object creation with sequence key generator? |
boolean |
isKeyGeneratorSequenceTypeSupported(int type)
Does Sequence key generator support generation of key for the given SQL type? |
| Methods inherited from class org.castor.cpa.persistence.sql.driver.GenericFactory |
|---|
doubleQuoteName, getSequenceAfterSelectString, getSequenceNextValString, quoteName |
| Methods inherited from class org.castor.cpa.persistence.sql.driver.BaseFactory |
|---|
adjustSqlType, getCallQuery, getKeyGenerator, getPersistence |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FACTORY_NAME
| Constructor Detail |
|---|
public DB2Factory()
| Method Detail |
|---|
public String getFactoryName()
PersistenceFactory
getFactoryName in interface PersistenceFactorygetFactoryName in class GenericFactorypublic QueryExpression getQueryExpression()
PersistenceFactory
getQueryExpression in interface PersistenceFactorygetQueryExpression in class GenericFactorypublic boolean isKeyGeneratorIdentitySupported()
GenericFactory
isKeyGeneratorIdentitySupported in interface PersistenceFactoryisKeyGeneratorIdentitySupported in class GenericFactorytrue if persistence factory is able to generate unique keys with
identity key generator, false otherwise.public boolean isKeyGeneratorIdentityTypeSupported(int type)
GenericFactory
isKeyGeneratorIdentityTypeSupported in interface PersistenceFactoryisKeyGeneratorIdentityTypeSupported in class GenericFactorytype - SQL type to check for support by identity key generator.
true if persistence factory is able to generate unique keys of
given SQL type with identity key generator, false otherwise.
public String getIdentitySelectString(String tableName,
String columnName)
GenericFactory
getIdentitySelectString in interface PersistenceFactorygetIdentitySelectString in class GenericFactorytableName - Name of the table from which identity needs to be fetched.columnName - Name of the column from which identity needs to be fetched.
public boolean isKeyGeneratorSequenceSupported(boolean returning,
boolean trigger)
GenericFactory
isKeyGeneratorSequenceSupported in interface PersistenceFactoryisKeyGeneratorSequenceSupported in class GenericFactoryreturning - Return generated key value with insert statement?trigger - Use a database trigger to generate key?
true if persistence factory is able to generate key with
sequence key generator, false otherwise.public boolean isKeyGeneratorSequenceTypeSupported(int type)
isKeyGeneratorSequenceTypeSupported in interface PersistenceFactoryisKeyGeneratorSequenceTypeSupported in class GenericFactorytype - SQL type to check for support by sequence key generator.
true if persistence factory is able to generate key of
given SQL type with sequence key generator, false otherwise.
public String getSequenceBeforeSelectString(String seqName,
String tableName,
int increment)
GenericFactory
getSequenceBeforeSelectString in interface PersistenceFactorygetSequenceBeforeSelectString in class GenericFactoryseqName - Name of sequence.tableName - Name of the table from which identity will be fetched.increment - Increment value used in Interbase database engine.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||