org.exolab.castor.jdo.drivers

Class OracleFactory

Implemented Interfaces:
PersistenceFactory
Known Direct Subclasses:
SapDbFactory

public class OracleFactory
extends GenericFactory

PersistenceFactory for Oracle 7/8 driver.
Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:14 $
Author:
Assaf Arkin

Method Summary

Class
adjustSqlType(Class sqlType)
For INTEGER type ResultSet.getObject() returns BigDecimal: dependent objects with integer identity cause type conversion error (need to fix SimpleQueryExecutor).
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.
Boolean
isDuplicateKeyException(Exception except)
Determine if the given SQLException is DuplicateKeyException
String
quoteName(String name)
Returns the quoted identifier suitable for preventing conflicts between database identifiers and reserved keywords.

Methods inherited from class org.exolab.castor.jdo.drivers.GenericFactory

doubleQuoteName, getFactoryName, getQueryExpression, isDuplicateKeyException, quoteName

Methods inherited from class org.exolab.castor.jdo.engine.BaseFactory

adjustSqlType, getCallQuery, getPersistence, supportsSetNullInWhere

Method Details

adjustSqlType

public Class adjustSqlType(Class sqlType)
For INTEGER type ResultSet.getObject() returns BigDecimal: dependent objects with integer identity cause type conversion error (need to fix SimpleQueryExecutor).
Overrides:
adjustSqlType in interface BaseFactory

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.
Overrides:
getCallQuery in interface BaseFactory
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.

getFactoryName

public String getFactoryName()
Returns the name of this factory. A descriptive name that indicates the type of supported database server or SQL syntax.
Specified by:
getFactoryName in interface PersistenceFactory
Overrides:
getFactoryName in interface GenericFactory
Returns:
The name of this factory

getQueryExpression

public QueryExpression getQueryExpression()
Returns a new empty query expression suitable for the underlying SQL engine. The implementation will construct SQL query statements in the preferred syntax.
Specified by:
getQueryExpression in interface PersistenceFactory
Overrides:
getQueryExpression in interface GenericFactory
Returns:
New empty query expression

isDuplicateKeyException

public Boolean isDuplicateKeyException(Exception except)
Determine if the given SQLException is DuplicateKeyException
Specified by:
isDuplicateKeyException in interface PersistenceFactory
Overrides:
isDuplicateKeyException in interface GenericFactory
Returns:
Boolean.TRUE means "yes", Boolean.FALSE means "no", null means "cannot determine"

quoteName

public String quoteName(String name)
Returns the quoted identifier suitable for preventing conflicts between database identifiers and reserved keywords.
Specified by:
quoteName in interface PersistenceFactory
Overrides:
quoteName in interface GenericFactory
Parameters:
name - The identifier (table, column, etc)
Returns:
The quoted identifier

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com