Class AbstractConnectedGenerator<T>

  • All Implemented Interfaces:

    public abstract class AbstractConnectedGenerator<T>
    extends AbstractGenerator<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
    • Field Detail

      • properties

        protected Properties properties
        Properties controlling the value generator behaviour.
    • Constructor Detail

      • AbstractConnectedGenerator

        public AbstractConnectedGenerator​(StoreManager storeMgr,
                                          String name,
                                          Properties props)
        storeMgr - Store Manager
        name - Symbolic name for the generator
        props - Properties controlling the behaviour of the generator
    • Method Detail

      • setConnectionProvider

        public void setConnectionProvider​(ValueGenerationConnectionProvider provider)
        Mutator for setting the connection provider.
        provider - The connection provider.
      • getConnectionPreference

        public AbstractConnectedGenerator.ConnectionPreference 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".
        The connection preference