|
||||||||
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.SQLServerFactory
public final class SQLServerFactory
PersistenceFactory for SQL Server.
Field Summary | |
---|---|
static java.lang.String |
FACTORY_NAME
|
Constructor Summary | |
---|---|
SQLServerFactory()
|
Method Summary | |
---|---|
PersistenceQuery |
getCallQuery(java.lang.String call,
java.lang.Class<?>[] paramTypes,
java.lang.Class<?> javaClass,
java.lang.String[] fields,
int[] sqlTypes)
Needed to process OQL queries of "CALL" type (using stored procedure call). |
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. |
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? |
java.lang.String |
quoteName(java.lang.String name)
Returns the quoted identifier suitable for preventing conflicts between database identifiers and reserved keywords. |
Methods inherited from class org.castor.cpa.persistence.sql.driver.GenericFactory |
---|
doubleQuoteName, getSequenceAfterSelectString, getSequenceBeforeSelectString, getSequenceNextValString, isKeyGeneratorSequenceSupported, isKeyGeneratorSequenceTypeSupported |
Methods inherited from class org.castor.cpa.persistence.sql.driver.BaseFactory |
---|
adjustSqlType, 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 java.lang.String FACTORY_NAME
Constructor Detail |
---|
public SQLServerFactory()
Method Detail |
---|
public java.lang.String getFactoryName()
PersistenceFactory
getFactoryName
in interface PersistenceFactory
getFactoryName
in class GenericFactory
public QueryExpression getQueryExpression()
PersistenceFactory
getQueryExpression
in interface PersistenceFactory
getQueryExpression
in class GenericFactory
public java.lang.String quoteName(java.lang.String name)
PersistenceFactory
quoteName
in interface PersistenceFactory
quoteName
in class GenericFactory
name
- The identifier (table, column, etc)
public PersistenceQuery getCallQuery(java.lang.String call, java.lang.Class<?>[] paramTypes, java.lang.Class<?> javaClass, java.lang.String[] fields, int[] sqlTypes)
getCallQuery
in interface PersistenceFactory
getCallQuery
in class BaseFactory
call
- Stored procedure call (without "{call")paramTypes
- The types of the query parametersjavaClass
- The Java class of the query resultsfields
- The field namessqlTypes
- The field SQL types
public boolean isKeyGeneratorIdentitySupported()
GenericFactory
isKeyGeneratorIdentitySupported
in interface PersistenceFactory
isKeyGeneratorIdentitySupported
in class GenericFactory
true
if persistence factory is able to generate unique keys with
identity key generator, false
otherwise.public boolean isKeyGeneratorIdentityTypeSupported(int type)
GenericFactory
isKeyGeneratorIdentityTypeSupported
in interface PersistenceFactory
isKeyGeneratorIdentityTypeSupported
in class GenericFactory
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)
GenericFactory
getIdentitySelectString
in interface PersistenceFactory
getIdentitySelectString
in class GenericFactory
tableName
- Name of the table from which identity needs to be fetched.columnName
- Name of the column from which identity needs to be fetched.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |