org.datanucleus.store.valuegenerator
Class AbstractDatastoreGenerator

java.lang.Object
  extended by org.datanucleus.store.valuegenerator.AbstractGenerator
      extended by org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator
All Implemented Interfaces:
ValueGenerator

public abstract class AbstractDatastoreGenerator
extends AbstractGenerator

Abstract representation of a ValueGenerator for a datastore. Builds on the base AbstractValueGenerator, and providing datastore connection and StoreManager information.


Field Summary
protected  ValueGenerationConnectionProvider connectionProvider
          The means of connecting to the datastore (if required by the generator).
protected  StoreManager storeMgr
          Manager for the datastore.
 
Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists
 
Constructor Summary
AbstractDatastoreGenerator(java.lang.String name, java.util.Properties props)
          Constructor.
 
Method Summary
 void setConnectionProvider(ValueGenerationConnectionProvider provider)
          Mutator for setting the connection provider.
 void setStoreManager(StoreManager storeMgr)
          Method to set the StoreManager to be used.
 
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocate, createRepository, current, currentValue, getName, getStorageClass, next, nextValue, obtainGenerationBlock, obtainGenerationBlock, repositoryExists, requiresRepository, reserveBlock, reserveBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

storeMgr

protected StoreManager storeMgr
Manager for the datastore.


connectionProvider

protected ValueGenerationConnectionProvider connectionProvider
The means of connecting to the datastore (if required by the generator).

Constructor Detail

AbstractDatastoreGenerator

public AbstractDatastoreGenerator(java.lang.String name,
                                  java.util.Properties props)
Constructor.

Parameters:
name - Symbolic name for the generator
props - Properties controlling the behaviour of the generator
Method Detail

setStoreManager

public void setStoreManager(StoreManager storeMgr)
Method to set the StoreManager to be used.

Parameters:
storeMgr - The Store Manager

setConnectionProvider

public void setConnectionProvider(ValueGenerationConnectionProvider provider)
Mutator for setting the connection provider.

Parameters:
provider - The connection provider.


Copyright © 2010. All Rights Reserved.