org.datanucleus.store.valuegenerator
Class ValueGenerationManager

java.lang.Object
  extended by org.datanucleus.store.valuegenerator.ValueGenerationManager

public class ValueGenerationManager
extends java.lang.Object

Manager for the creation of ValueGenerators. Allows creation of generators and provides lookup by symbolic name.


Field Summary
protected  java.util.Map<java.lang.String,ValueGenerator> generatorsByName
          Map of ValueGenerator keyed by the symbolic name.
protected static Localiser LOCALISER
          Localisation of messages
 
Constructor Summary
ValueGenerationManager()
          Constructor.
 
Method Summary
 void clear()
          Method to clear out the generators managed by this manager.
 ValueGenerator createValueGenerator(java.lang.String name, java.lang.Class generatorClass, java.util.Properties props, StoreManager storeMgr, ValueGenerationConnectionProvider connectionProvider)
          Method to create a ValueGenerator when the generator is datastore based.
 ValueGenerator getValueGenerator(java.lang.String name)
          Accessor for the ValueGenerator with the given symbolic name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static final Localiser LOCALISER
Localisation of messages


generatorsByName

protected java.util.Map<java.lang.String,ValueGenerator> generatorsByName
Map of ValueGenerator keyed by the symbolic name.

Constructor Detail

ValueGenerationManager

public ValueGenerationManager()
Constructor.

Method Detail

clear

public void clear()
Method to clear out the generators managed by this manager.


getValueGenerator

public ValueGenerator getValueGenerator(java.lang.String name)
Accessor for the ValueGenerator with the given symbolic name.

Parameters:
name - Name of the ValueGenerator when created
Returns:
The ValueGenerator with this name

createValueGenerator

public ValueGenerator createValueGenerator(java.lang.String name,
                                           java.lang.Class generatorClass,
                                           java.util.Properties props,
                                           StoreManager storeMgr,
                                           ValueGenerationConnectionProvider connectionProvider)
Method to create a ValueGenerator when the generator is datastore based.

Parameters:
name - Symbolic name of the generator
generatorClass - Class for the generator type
props - Properties to control the generator
storeMgr - Manager for the store
connectionProvider - Provider for connections
Returns:
The ValueGenerator


Copyright © 2010. All Rights Reserved.