public final class InstantDBFactory extends GenericFactory
Example database.xml
file for JDO
<database name="test" engine="instantdb" > <driver class-name="org.enhydra.instantdb.jdbc.idbDriver" url="jdbc:idb:C:\\castor-0.8.8\\db\\test\\test.prp"> <param name="user" value="" /> <param name="password" value="" /> </driver> <mapping href="mapping.xml" /> </database>
Modifier and Type | Field and Description |
---|---|
static String |
FACTORY_NAME |
Constructor and Description |
---|
InstantDBFactory() |
Modifier and Type | Method and Description |
---|---|
Class<?> |
adjustSqlType(Class<?> sqlType)
For NUMERIC type ResultSet.getObject() returns Double instead of BigDecimal for InstantDB.
|
PersistenceQuery |
getCallQuery(String call,
Class<?>[] paramTypes,
Class<?> javaClass,
String[] fields,
int[] sqlTypes)
Needed to process OQL queries of "CALL" type (using stored procedure
call).
|
String |
getFactoryName()
Returns the name of this factory.
|
QueryExpression |
getQueryExpression()
Returns a new empty query expression suitable for the underlying
SQL engine.
|
doubleQuoteName, getIdentitySelectString, getSequenceAfterSelectString, getSequenceBeforeSelectString, getSequenceNextValString, isKeyGeneratorIdentitySupported, isKeyGeneratorIdentityTypeSupported, isKeyGeneratorSequenceSupported, isKeyGeneratorSequenceTypeSupported, quoteName
getKeyGenerator, getPersistence
public static final String FACTORY_NAME
public String getFactoryName()
PersistenceFactory
getFactoryName
in interface PersistenceFactory
getFactoryName
in class GenericFactory
public QueryExpression getQueryExpression()
PersistenceFactory
getQueryExpression
in interface PersistenceFactory
getQueryExpression
in class GenericFactory
public PersistenceQuery getCallQuery(String call, Class<?>[] paramTypes, Class<?> javaClass, 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 typespublic Class<?> adjustSqlType(Class<?> sqlType)
adjustSqlType
in interface PersistenceFactory
adjustSqlType
in class BaseFactory
sqlType
- The correspondent Java class for the SQL type in mapping.xmlCopyright © 2014. All rights reserved.