org.apache.torque.oid
Class IDGeneratorFactory

java.lang.Object
  extended byorg.apache.torque.oid.IDGeneratorFactory

public class IDGeneratorFactory
extends java.lang.Object

A factory which instantiates IdGenerator implementations.

Version:
$Id: IDGeneratorFactory.java,v 1.2.4.2 2004/05/20 04:36:07 seade Exp $
Author:
Daniel Rall

Field Summary
static java.lang.String[] ID_GENERATOR_METHODS
          The list of ID generation method types which have associated IdGenerator implementations.
 
Constructor Summary
IDGeneratorFactory()
           
 
Method Summary
static IdGenerator create(DB dbAdapter)
          Factory method which instantiates IdGenerator implementations based on the return value of the provided adapter's DB.getIDMethodType() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_GENERATOR_METHODS

public static final java.lang.String[] ID_GENERATOR_METHODS
The list of ID generation method types which have associated IdGenerator implementations.

Constructor Detail

IDGeneratorFactory

public IDGeneratorFactory()
Method Detail

create

public static IdGenerator create(DB dbAdapter)
Factory method which instantiates IdGenerator implementations based on the return value of the provided adapter's DB.getIDMethodType() method. Returns null for unknown types.

Parameters:
dbAdapter - The type of adapter to create an ID generator for.
Returns:
The appropriate ID generator (possibly null).


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.