org.exolab.castor.jdo.keygen
Class IdentityKeyGeneratorFactory

java.lang.Object
  extended by org.exolab.castor.jdo.keygen.IdentityKeyGeneratorFactory
All Implemented Interfaces:
KeyGeneratorFactory

public final class IdentityKeyGeneratorFactory
extends java.lang.Object
implements KeyGeneratorFactory

IDENTITY key generator factory. The short name of this key generator is "IDENTITY". It works for Sybase and SQL Server identity (autoincrement) fields and fetched @@identity after insert.

Version:
$Revision: 1.1 $ $Date: 2005/06/01 12:08:16 $
Author:
Oleg Nitz
See Also:
IdentityKeyGenerator

Constructor Summary
IdentityKeyGeneratorFactory()
           
 
Method Summary
 KeyGenerator getKeyGenerator(PersistenceFactory factory, java.util.Properties params, int sqlType)
          Produce the key generator.
 java.lang.String getName()
          The short name of this key generator is "IDENTITY"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityKeyGeneratorFactory

public IdentityKeyGeneratorFactory()
Method Detail

getKeyGenerator

public KeyGenerator getKeyGenerator(PersistenceFactory factory,
                                    java.util.Properties params,
                                    int sqlType)
                             throws MappingException
Produce the key generator.

Specified by:
getKeyGenerator in interface KeyGeneratorFactory
Parameters:
factory - Helper object for obtaining database-specific QuerySyntax.
params - Parameters for key generator.
sqlType - The SQL type of the primary key, the generated identities must have the corresponding Java type, e.g. java.sql.Types.INTEGER corresponds to java.lang.Integer, java.sql.Types.NUMERIC corresponds to java.lang.BigDecimal.
Throws:
MappingException
Factory:
Helper object for obtaining database-specific QuerySyntax.

getName

public java.lang.String getName()
The short name of this key generator is "IDENTITY"

Specified by:
getName in interface KeyGeneratorFactory


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