org.exolab.castor.jdo.engine

Class BaseFactory

public abstract class BaseFactory extends Object implements PersistenceFactory

{@link org.exolab.castor.persist.spi.PersistenceFactory} for generic JDBC driver.

Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:16 $

Author: Assaf Arkin

Method Summary
ClassadjustSqlType(Class sqlType)
Some databases has some problems with some SQL types.
PersistenceQuerygetCallQuery(String call, Class[] paramTypes, Class javaClass, String[] fields, int[] sqlTypes)
Needed to process OQL queries of "CALL" type (using stored procedure call).
PersistencegetPersistence(ClassDescriptor clsDesc, LogInterceptor logInterceptor)
booleansupportsSetNullInWhere()
Many databases don't support setNull for "WHERE fld=?

Method Detail

adjustSqlType

public Class adjustSqlType(Class sqlType)
Some databases has some problems with some SQL types. Usually it is enough to merely replace one SQL type by another.

Parameters: sqlType The correspondent Java class for the SQL type in mapping.xml

Returns: The correspondent Java class for the SQL type that should be used instead.

getCallQuery

public PersistenceQuery getCallQuery(String call, Class[] paramTypes, Class javaClass, String[] fields, int[] sqlTypes)
Needed to process OQL queries of "CALL" type (using stored procedure call). This feature is specific for JDO.

Parameters: call Stored procedure call (without "{call") paramTypes The types of the query parameters javaClass The Java class of the query results fields The field names sqlTypes The field SQL types

Returns: null if this feature is not supported.

getPersistence

public Persistence getPersistence(ClassDescriptor clsDesc, LogInterceptor logInterceptor)

supportsSetNullInWhere

public boolean supportsSetNullInWhere()
Many databases don't support setNull for "WHERE fld=?" and require "WHERE fld IS NULL".
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com