PersistenceFactory
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 | Description |
---|---|---|
static java.lang.String |
FACTORY_NAME |
Constructor | Description |
---|---|
InstantDBFactory() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Class<?> |
adjustSqlType(java.lang.Class<?> sqlType) |
For NUMERIC type ResultSet.getObject() returns Double instead of BigDecimal for InstantDB.
|
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.
|
QueryExpression |
getQueryExpression() |
Returns a new empty query expression suitable for the underlying
SQL engine.
|
getKeyGenerator, getPersistence
doubleQuoteName, getIdentitySelectString, getSequenceAfterSelectString, getSequenceBeforeSelectString, getSequenceNextValString, isKeyGeneratorIdentitySupported, isKeyGeneratorIdentityTypeSupported, isKeyGeneratorSequenceSupported, isKeyGeneratorSequenceTypeSupported, quoteName
public static final java.lang.String FACTORY_NAME
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 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 typespublic java.lang.Class<?> adjustSqlType(java.lang.Class<?> sqlType)
adjustSqlType
in interface PersistenceFactory
adjustSqlType
in class BaseFactory
sqlType
- The correspondent Java class for the SQL type in mapping.xmlIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com