PersistenceFactory
DB2Factory
, DerbyFactory
, HsqlFactory
, InformixFactory
, InstantDBFactory
, InterbaseFactory
, MySQLFactory
, OracleFactory
, PointbaseFactory
, PostgreSQLFactory
, ProgressFactory
, SapDbFactory
, SQLServerFactory
, SybaseFactory
public class GenericFactory extends BaseFactory
PersistenceFactory
for generic JDBC driver.Constructor | Description |
---|---|
GenericFactory() |
Modifier and Type | Method | Description |
---|---|---|
protected java.lang.String |
doubleQuoteName(java.lang.String name) |
Updated to handle input such as user.tablename.column.
|
java.lang.String |
getFactoryName() |
Returns the name of this factory.
|
java.lang.String |
getIdentitySelectString(java.lang.String tableName,
java.lang.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.
|
java.lang.String |
getSequenceAfterSelectString(java.lang.String seqName,
java.lang.String tableName) |
Returns the database specific SELECT query string
for fetching identity after the INSERT statement executed.
|
java.lang.String |
getSequenceBeforeSelectString(java.lang.String seqName,
java.lang.String tableName,
int increment) |
Returns the database specific SELECT query string
for fetching identity before the next INSERT statement gets executed.
|
java.lang.String |
getSequenceNextValString(java.lang.String seqName) |
Returns the database engine specific string to fetch sequence next value.
|
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?
|
java.lang.String |
quoteName(java.lang.String name) |
Returns the quoted identifier suitable for preventing conflicts between
database identifiers and reserved keywords.
|
adjustSqlType, getCallQuery, getKeyGenerator, getPersistence
public java.lang.String getFactoryName()
PersistenceFactory
public QueryExpression getQueryExpression()
PersistenceFactory
public java.lang.String quoteName(java.lang.String name)
PersistenceFactory
name
- The identifier (table, column, etc)protected final java.lang.String doubleQuoteName(java.lang.String name)
public boolean isKeyGeneratorIdentitySupported()
true
if persistence factory is able to generate unique keys with
identity key generator, false
otherwise.public boolean isKeyGeneratorIdentityTypeSupported(int type)
type
- 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 java.lang.String getIdentitySelectString(java.lang.String tableName, java.lang.String columnName)
tableName
- 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)
returning
- 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)
type
- 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 java.lang.String getSequenceNextValString(java.lang.String seqName)
seqName
- Name of the sequence.public java.lang.String getSequenceAfterSelectString(java.lang.String seqName, java.lang.String tableName)
seqName
- Name of sequence.tableName
- Name of the table from which identity will be fetched.public java.lang.String getSequenceBeforeSelectString(java.lang.String seqName, java.lang.String tableName, int increment)
seqName
- Name of sequence.tableName
- Name of the table from which identity will be fetched.increment
- Increment value used in Interbase database engine.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com