Class AbstractConnectedGenerator<T>
java.lang.Object
org.datanucleus.store.valuegenerator.AbstractGenerator<T>
org.datanucleus.store.valuegenerator.AbstractConnectedGenerator<T>
- All Implemented Interfaces:
ValueGenerator<T>
Abstract representation of a ValueGenerator requiring a connection to a datastore.
Builds on the base AbstractGenerator, providing datastore connection information.
TODO Remove "properties" and pass in class+member so we can extract the precise definition for this generator directly
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ValueGenerationConnectionProvider
The means of connecting to the datastore.protected Properties
Properties controlling the value generator behaviour.Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocationSize, block, initialValue, name, storeMgr
Fields inherited from interface org.datanucleus.store.valuegenerator.ValueGenerator
PROPERTY_CATALOG_NAME, PROPERTY_CLASS_NAME, PROPERTY_COLUMN_NAME, PROPERTY_FIELD_NAME, PROPERTY_KEY_CACHE_SIZE, PROPERTY_KEY_DATABASE_CACHE_SIZE, PROPERTY_KEY_INITIAL_VALUE, PROPERTY_KEY_MAX_VALUE, PROPERTY_KEY_MIN_VALUE, PROPERTY_ROOT_CLASS_NAME, PROPERTY_SCHEMA_NAME, PROPERTY_SEQUENCE_NAME, PROPERTY_SEQUENCETABLE_CATALOG, PROPERTY_SEQUENCETABLE_NAME_COLUMN, PROPERTY_SEQUENCETABLE_NEXTVAL_COLUMN, PROPERTY_SEQUENCETABLE_SCHEMA, PROPERTY_SEQUENCETABLE_TABLE, PROPERTY_TABLE_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractConnectedGenerator
(StoreManager storeMgr, String name, Properties props) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionAccessor for any requirement for connection used by this value generator.void
Mutator for setting the connection provider.Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocate, current, currentValue, getName, next, nextValue, obtainGenerationBlock, obtainGenerationBlock, reserveBlock, reserveBlock
-
Field Details
-
connectionProvider
The means of connecting to the datastore. -
properties
Properties controlling the value generator behaviour.
-
-
Constructor Details
-
AbstractConnectedGenerator
Constructor.- Parameters:
storeMgr
- Store Managername
- Symbolic name for the generatorprops
- Properties controlling the behaviour of the generator
-
-
Method Details
-
setConnectionProvider
Mutator for setting the connection provider.- Parameters:
provider
- The connection provider.
-
getConnectionPreference
Accessor for any requirement for connection used by this value generator. EXISTING means use the same connection as the ExecutionContext is using. NEW means use a new connection, and commit it after any operation. NONE means use NEW and allow override by the persistence property "datanucleus.valuegeneration.transactionAttribute".- Returns:
- The connection preference
-