org.castor.cpa.persistence.sql.driver
Class MySQLFactory

java.lang.Object
  extended by org.castor.cpa.persistence.sql.driver.BaseFactory
      extended by org.castor.cpa.persistence.sql.driver.GenericFactory
          extended by org.castor.cpa.persistence.sql.driver.MySQLFactory
All Implemented Interfaces:
PersistenceFactory

public final class MySQLFactory
extends GenericFactory

PersistenceFactory for MySQL JDBC driver.

Version:
$Revision: 7585 $ $Date: 2006-02-21 16:05:42 -0700 (Tue, 21 Feb 2006) $
Author:
Leonardo Souza Mario Bueno

Field Summary
static java.lang.String FACTORY_NAME
          Internal name for this PersistenceFactory instance.
 
Constructor Summary
MySQLFactory()
           
 
Method Summary
 java.lang.Class adjustSqlType(java.lang.Class sqlType)
          For CLOB type ResultSet.setClob() is not supported yet by mm.MySql JDBC driver.
 java.lang.String getFactoryName()
          Returns the name of this factory.
 QueryExpression getQueryExpression()
          Returns a new empty query expression suitable for the underlying SQL engine.
 
Methods inherited from class org.castor.cpa.persistence.sql.driver.GenericFactory
doubleQuoteName, isDuplicateKeyException, quoteName
 
Methods inherited from class org.castor.cpa.persistence.sql.driver.BaseFactory
getCallQuery, getPersistence, supportsSetNullInWhere
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_NAME

public static final java.lang.String FACTORY_NAME
Internal name for this PersistenceFactory instance.

See Also:
Constant Field Values
Constructor Detail

MySQLFactory

public MySQLFactory()
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.

Specified by:
getFactoryName in interface PersistenceFactory
Overrides:
getFactoryName in class GenericFactory
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.

Specified by:
getQueryExpression in interface PersistenceFactory
Overrides:
getQueryExpression in class GenericFactory
Returns:
New empty query expression

adjustSqlType

public java.lang.Class adjustSqlType(java.lang.Class sqlType)
For CLOB type ResultSet.setClob() is not supported yet by mm.MySql JDBC driver. BLOB support is buggy in MM.MySQL 2.0.3: it handles NULL values in incorrect way.

Specified by:
adjustSqlType in interface PersistenceFactory
Overrides:
adjustSqlType in class BaseFactory
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.


Copyright © 2011. All Rights Reserved.