org.exolab.castor.jdo.drivers
Class GenericFactory

java.lang.Object
  extended by org.exolab.castor.jdo.engine.BaseFactory
      extended by org.exolab.castor.jdo.drivers.GenericFactory
All Implemented Interfaces:
PersistenceFactory
Direct Known Subclasses:
DB2Factory, DerbyFactory, HsqlFactory, InformixFactory, InstantDBFactory, InterbaseFactory, MySQLFactory, OracleFactory, PostgreSQLFactory, SybaseFactory

public class GenericFactory
extends BaseFactory

PersistenceFactory for generic JDBC driver.

Version:
$Revision: 1.3 $ $Date: 2004/01/19 20:01:46 $
Author:
Assaf Arkin, Bruce Snyder

Constructor Summary
GenericFactory()
           
 
Method Summary
protected  java.lang.String doubleQuoteName(java.lang.String name)
          Updated to handle input such as user.tablename.column
 java.lang.String getFactoryName()
          Returns the name of this factory.
 QueryExpression getQueryExpression()
          Returns a new empty query expression suitable for the underlying SQL engine.
 java.lang.Boolean isDuplicateKeyException(java.lang.Exception ex)
          Determine if the given SQLException is DuplicateKeyException
 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.exolab.castor.jdo.engine.BaseFactory
adjustSqlType, getCallQuery, getPersistence, supportsSetNullInWhere
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericFactory

public GenericFactory()
Method Detail

getFactoryName

public java.lang.String getFactoryName()
Description copied from interface: PersistenceFactory
Returns the name of this factory. A descriptive name that indicates the type of supported database server or SQL syntax.

Returns:
The name of this factory

getQueryExpression

public QueryExpression getQueryExpression()
Description copied from interface: PersistenceFactory
Returns a new empty query expression suitable for the underlying SQL engine. The implementation will construct SQL query statements in the preferred syntax.

Returns:
New empty query expression

isDuplicateKeyException

public java.lang.Boolean isDuplicateKeyException(java.lang.Exception ex)
Determine if the given SQLException is DuplicateKeyException

Returns:
Boolean.TRUE means "yes", Boolean.FALSE means "no", null means "cannot determine"

quoteName

public java.lang.String quoteName(java.lang.String name)
Description copied from interface: PersistenceFactory
Returns the quoted identifier suitable for preventing conflicts between database identifiers and reserved keywords.

Parameters:
name - The identifier (table, column, etc)
Returns:
The quoted identifier

doubleQuoteName

protected final java.lang.String doubleQuoteName(java.lang.String name)
Updated to handle input such as user.tablename.column



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