Package org.datanucleus.store
Class AbstractStoreManager
- java.lang.Object
-
- org.datanucleus.properties.PropertyStore
-
- org.datanucleus.store.AbstractStoreManager
-
- All Implemented Interfaces:
StoreManager
public abstract class AbstractStoreManager extends PropertyStore implements StoreManager
An abstract representation of a Store Manager. Manages the persistence of objects to the store. Will be implemented for the type of datastore (RDBMS, ODBMS, etc) in question. The store manager's responsibilities include:- Creating and/or validating datastore tables according to the persistent classes being accessed by the application.
- Serving as the primary intermediary between StateManagers and the database.
- Serving as the base Extent and Query factory.
A store manager's knowledge of its contents is typically not complete. It knows about the classes that it has encountered in its lifetime. The ExecutionContext can make the StoreManager aware of a class, and can check if the StoreManager knows about a particular class.
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectionManager
connectionMgr
ConnectionManagerprotected FlushProcess
flushProcess
The flush process appropriate for this datastore.protected NamingFactory
namingFactory
Naming factory.protected PersistenceNucleusContext
nucleusContext
Nucleus Context.protected StorePersistenceHandler
persistenceHandler
Persistence handler.protected QueryManager
queryMgr
Query Manager.protected StoreSchemaHandler
schemaHandler
Schema handler.protected StoreDataManager
storeDataMgr
Manager for the data definition in the datastore.protected String
storeManagerKey
Key for this StoreManager e.g "rdbms", "neo4j"protected ValueGenerationManager
valueGenerationMgr
Manager for value generation.-
Fields inherited from class org.datanucleus.properties.PropertyStore
frequentProperties, properties
-
Fields inherited from interface org.datanucleus.store.StoreManager
OPTION_APPLICATION_COMPOSITE_ID, OPTION_APPLICATION_ID, OPTION_DATASTORE_ID, OPTION_DATASTORE_TIME_STORES_MILLISECS, OPTION_DATASTORE_TIME_STORES_NANOSECS, OPTION_DATASTORE_TIMEOUT, OPTION_NONDURABLE_ID, OPTION_ORM, OPTION_ORM_EMBEDDED_ARRAY, OPTION_ORM_EMBEDDED_ARRAY_NESTED, OPTION_ORM_EMBEDDED_COLLECTION, OPTION_ORM_EMBEDDED_COLLECTION_NESTED, OPTION_ORM_EMBEDDED_MAP, OPTION_ORM_EMBEDDED_MAP_NESTED, OPTION_ORM_EMBEDDED_PC, OPTION_ORM_EMBEDDED_PC_NESTED, OPTION_ORM_FOREIGN_KEYS, OPTION_ORM_INHERITANCE_COMPLETE_TABLE, OPTION_ORM_INHERITANCE_JOINED_TABLE, OPTION_ORM_INHERITANCE_SINGLE_TABLE, OPTION_ORM_SECONDARY_TABLE, OPTION_ORM_SERIALISED_ARRAY_ELEMENT, OPTION_ORM_SERIALISED_COLLECTION_ELEMENT, OPTION_ORM_SERIALISED_MAP_KEY, OPTION_ORM_SERIALISED_MAP_VALUE, OPTION_ORM_SERIALISED_PC, OPTION_QUERY_CANCEL, OPTION_QUERY_JDOQL_BITWISE_OPS, OPTION_QUERY_JDOQL_BULK_DELETE, OPTION_QUERY_JDOQL_BULK_INSERT, OPTION_QUERY_JDOQL_BULK_UPDATE, OPTION_QUERY_JPQL_BULK_DELETE, OPTION_QUERY_JPQL_BULK_INSERT, OPTION_QUERY_JPQL_BULK_UPDATE, OPTION_TRANSACTION_ACID, OPTION_TXN_ISOLATION_READ_COMMITTED, OPTION_TXN_ISOLATION_READ_UNCOMMITTED, OPTION_TXN_ISOLATION_REPEATABLE_READ, OPTION_TXN_ISOLATION_SERIALIZABLE, RELATION_IDENTITY_STORAGE_PERSISTABLE_IDENTITY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStoreManager(String key, ClassLoaderResolver clr, PersistenceNucleusContext nucleusContext, Map<String,Object> props)
Constructor for a new StoreManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addValueGenerationPropertiesForIncrement(Properties properties, TableGeneratorMetaData tablegenmd)
protected void
addValueGenerationPropertiesForSequence(Properties properties, SequenceMetaData seqmd)
void
close()
protected void
deregisterAllStoreData()
Method to deregister all existing store data so that we are managing nothing.void
enableSchemaGeneration()
Convenience method to override the specified schema generation properties and enable schema generation.ApiAdapter
getApiAdapter()
Accessor for the API adapter.Boolean
getBooleanObjectProperty(String name)
Accessor for the specified property as a Boolean.boolean
getBooleanProperty(String name)
Accessor for the specified property as a boolean.boolean
getBooleanProperty(String name, boolean resultIfNotSet)
Accessor for the specified property as a boolean.String
getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
Returns the class corresponding to the given object identity.ConnectionManager
getConnectionManager()
Accessor for the connection manager for this store manager.String
getConnectionPassword()
Convenience accessor for the password to use for the connection.String
getDefaultStateManagerClassName()
<T> Extent<T>
getExtent(ExecutionContext ec, Class<T> c, boolean subclasses)
Interface to getting an Extent for a class.FlushProcess
getFlushProcess()
int
getIntProperty(String name)
Accessor for the specified property as an int.MetaDataManager
getMetaDataManager()
NamingFactory
getNamingFactory()
protected Object
getNextValueForValueGenerator(ValueGenerator generator, ExecutionContext ec)
Accessor for the next value from the specified ValueGenerator.NucleusConnection
getNucleusConnection(ExecutionContext ec)
Method to return a connection to the user for the ExecutionContext.PersistenceNucleusContext
getNucleusContext()
Accessor for the context in which this StoreManager is running.StorePersistenceHandler
getPersistenceHandler()
protected Properties
getPropertiesForValueGenerator(AbstractClassMetaData cmd, int absoluteFieldNumber, ClassLoaderResolver clr, SequenceMetaData seqmd, TableGeneratorMetaData tablegenmd)
Method to return the properties to pass to the generator for the specified field.Object
getProperty(String name)
Method to get the value of a property from the store.QueryManager
getQueryManager()
StoreSchemaHandler
getSchemaHandler()
StoreData
getStoreDataForClass(String className)
String
getStoreManagerKey()
Accessor for the key for this store manager.String
getStringProperty(String name)
Accessor for the specified property as a String.Collection<String>
getSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)
Utility to return the names of the classes that are known subclasses of the provided class.Collection<String>
getSupportedOptions()
Accessor for the supported options in string form.Collection<String>
getSupportedQueryLanguages()
Accessor for the supported query languages.ValueGenerationManager
getValueGenerationManager()
Accessor for the ValueGenerationManager for generating field values.String
getValueGenerationStrategyForNative(AbstractClassMetaData cmd)
Method defining which value-strategy to use when the user specifies "native" on datastore-identity.String
getValueGenerationStrategyForNative(AbstractMemberMetaData mmd)
Method defining which value-strategy to use when the user specifies "native" on a member.Object
getValueGenerationStrategyValue(ExecutionContext ec, AbstractClassMetaData cmd, AbstractMemberMetaData mmd)
Method to retrieve the value for a value generation strategy for a particular field or datastore-identity.protected ValueGenerator
getValueGeneratorForMember(ClassLoaderResolver clr, AbstractClassMetaData cmd, AbstractMemberMetaData mmd)
boolean
hasProperty(String name)
Accessor for whether a particular property is defined (but may be null).boolean
isClosed()
boolean
isJdbcStore()
Returns whether the datastore is a "JDBC datastore".boolean
isValueGenerationStrategyDatastoreAttributed(AbstractClassMetaData cmd, int absFieldNumber)
Convenience method to return whether the strategy used by the specified class/member is generated by the datastore (during a persist).protected void
logConfiguration()
Convenience method to log the configuration of this store manager.void
manageClasses(ClassLoaderResolver clr, String... classNames)
Manage the specified classes.String
manageClassForIdentity(Object id, ClassLoaderResolver clr)
Convenience method to ensure that the class defined by the passed DatastoreId/SingleFieldId is managed by the store.boolean
managesClass(String className)
Accessor for whether the specified class is managed currentlyprotected StoreData
newStoreData(ClassMetaData cmd, ClassLoaderResolver clr)
Instantiate a StoreData instance using the provided ClassMetaData and ClassLoaderResolver.void
printInformation(String category, PrintStream ps)
Method to output the information about the StoreManager.protected void
registerConnectionMgr()
Register the default ConnectionManager implementation.protected void
registerStoreData(StoreData data)
Method to register some data with the store.void
resetSchemaGeneration()
Convenience method to reset the schema generation properties to their initial creation values, effectively undoing a call to enableSchemaGeneration.boolean
supportsQueryLanguage(String language)
Accessor for whether this query language is supported.boolean
supportsValueGenerationStrategy(String strategy)
Accessor for whether this value strategy is supported.void
unmanageAllClasses(ClassLoaderResolver clr)
Remove all classes from the persistence model for the datastore.void
unmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)
Method to remove knowledge of the specified class from this StoreManager.boolean
useBackedSCOWrapperForMember(AbstractMemberMetaData mmd, ExecutionContext ec)
Method to return whether the specified member should use a backed SCO wrapper.-
Methods inherited from class org.datanucleus.properties.PropertyStore
getFrequentProperties, hasPropertyNotNull, setPropertyInternal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.datanucleus.store.StoreManager
getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionURL, getConnectionUserName, getDatastoreDate, getDefaultCatalogName, getDefaultSchemaName, getNativeQueryLanguage, getNucleusSequence, getQueryCacheKey, newQuery, newQuery, newQuery, transactionCommitted, transactionRolledBack, transactionStarted, usesBackedSCOWrappers
-
-
-
-
Field Detail
-
storeManagerKey
protected final String storeManagerKey
Key for this StoreManager e.g "rdbms", "neo4j"
-
nucleusContext
protected PersistenceNucleusContext nucleusContext
Nucleus Context.
-
valueGenerationMgr
protected ValueGenerationManager valueGenerationMgr
Manager for value generation.
-
storeDataMgr
protected StoreDataManager storeDataMgr
Manager for the data definition in the datastore.
-
persistenceHandler
protected StorePersistenceHandler persistenceHandler
Persistence handler.
-
flushProcess
protected FlushProcess flushProcess
The flush process appropriate for this datastore.
-
queryMgr
protected QueryManager queryMgr
Query Manager. Lazy initialised, so use getQueryManager() to access.
-
schemaHandler
protected StoreSchemaHandler schemaHandler
Schema handler.
-
namingFactory
protected NamingFactory namingFactory
Naming factory.
-
connectionMgr
protected ConnectionManager connectionMgr
ConnectionManager
-
-
Constructor Detail
-
AbstractStoreManager
protected AbstractStoreManager(String key, ClassLoaderResolver clr, PersistenceNucleusContext nucleusContext, Map<String,Object> props)
Constructor for a new StoreManager. Stores the basic information required for the datastore management.- Parameters:
key
- Key for this StoreManagerclr
- the ClassLoaderResolvernucleusContext
- The corresponding nucleus context.props
- Any properties controlling this datastore
-
-
Method Detail
-
registerConnectionMgr
protected void registerConnectionMgr()
Register the default ConnectionManager implementation. Having this in a separate method to allow overriding by store plugins if required.
-
close
public void close()
- Specified by:
close
in interfaceStoreManager
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceStoreManager
-
getConnectionManager
public ConnectionManager getConnectionManager()
Description copied from interface:StoreManager
Accessor for the connection manager for this store manager.- Specified by:
getConnectionManager
in interfaceStoreManager
- Returns:
- connection manager
-
getConnectionPassword
public String getConnectionPassword()
Convenience accessor for the password to use for the connection. Will perform decryption if the persistence property "datanucleus.ConnectionPasswordDecrypter" has also been specified.- Specified by:
getConnectionPassword
in interfaceStoreManager
- Returns:
- Password
-
isJdbcStore
public boolean isJdbcStore()
Description copied from interface:StoreManager
Returns whether the datastore is a "JDBC datastore". If it is then the JDO spec needs to return a connection that implements java.sql.Connection. RDBMS is the only one that will return true from here (or certainly as we can foresee now).- Specified by:
isJdbcStore
in interfaceStoreManager
- Returns:
- Whether this is a JDBC datastore
-
getPersistenceHandler
public StorePersistenceHandler getPersistenceHandler()
- Specified by:
getPersistenceHandler
in interfaceStoreManager
-
getFlushProcess
public FlushProcess getFlushProcess()
- Specified by:
getFlushProcess
in interfaceStoreManager
-
getQueryManager
public QueryManager getQueryManager()
- Specified by:
getQueryManager
in interfaceStoreManager
-
getSchemaHandler
public StoreSchemaHandler getSchemaHandler()
- Specified by:
getSchemaHandler
in interfaceStoreManager
-
getNamingFactory
public NamingFactory getNamingFactory()
- Specified by:
getNamingFactory
in interfaceStoreManager
-
getNucleusConnection
public NucleusConnection getNucleusConnection(ExecutionContext ec)
Description copied from interface:StoreManager
Method to return a connection to the user for the ExecutionContext. Typically provides a wrapper to the currently in-use ManagedConnection.- Specified by:
getNucleusConnection
in interfaceStoreManager
- Parameters:
ec
- execution context- Returns:
- The datastore Connection
-
getValueGenerationManager
public ValueGenerationManager getValueGenerationManager()
Description copied from interface:StoreManager
Accessor for the ValueGenerationManager for generating field values.- Specified by:
getValueGenerationManager
in interfaceStoreManager
- Returns:
- The ValueGenerationManager for this datastore
-
getApiAdapter
public ApiAdapter getApiAdapter()
Description copied from interface:StoreManager
Accessor for the API adapter.- Specified by:
getApiAdapter
in interfaceStoreManager
- Returns:
- API adapter
-
getStoreManagerKey
public String getStoreManagerKey()
Description copied from interface:StoreManager
Accessor for the key for this store manager.- Specified by:
getStoreManagerKey
in interfaceStoreManager
- Returns:
- StoreManager key
-
getNucleusContext
public PersistenceNucleusContext getNucleusContext()
Description copied from interface:StoreManager
Accessor for the context in which this StoreManager is running.- Specified by:
getNucleusContext
in interfaceStoreManager
- Returns:
- Returns the context.
-
getMetaDataManager
public MetaDataManager getMetaDataManager()
- Specified by:
getMetaDataManager
in interfaceStoreManager
-
getStoreDataForClass
public StoreData getStoreDataForClass(String className)
- Specified by:
getStoreDataForClass
in interfaceStoreManager
-
registerStoreData
protected void registerStoreData(StoreData data)
Method to register some data with the store. This will also register the data with the starter process.- Parameters:
data
- The StoreData to add
-
deregisterAllStoreData
protected void deregisterAllStoreData()
Method to deregister all existing store data so that we are managing nothing.
-
logConfiguration
protected void logConfiguration()
Convenience method to log the configuration of this store manager.
-
printInformation
public void printInformation(String category, PrintStream ps) throws Exception
Method to output the information about the StoreManager. Supports the category "DATASTORE".- Specified by:
printInformation
in interfaceStoreManager
- Parameters:
category
- Category of informationps
- PrintStream- Throws:
Exception
- Thrown if an error occurs in the output process
-
managesClass
public boolean managesClass(String className)
Description copied from interface:StoreManager
Accessor for whether the specified class is managed currently- Specified by:
managesClass
in interfaceStoreManager
- Parameters:
className
- The name of the class- Returns:
- Whether it is managed
-
manageClasses
public void manageClasses(ClassLoaderResolver clr, String... classNames)
Description copied from interface:StoreManager
Manage the specified classes. This method is primarily useful for applications that wish to perform all of their datastore initialization up front, rather than wait for the runtime to do it on-demand.- Specified by:
manageClasses
in interfaceStoreManager
- Parameters:
clr
- The ClassLoaderResolverclassNames
- The class(es) to be managed
-
newStoreData
protected StoreData newStoreData(ClassMetaData cmd, ClassLoaderResolver clr)
Instantiate a StoreData instance using the provided ClassMetaData and ClassLoaderResolver. Override this method if you want to instantiate a subclass of StoreData.- Parameters:
cmd
- MetaData for the classclr
- ClassLoader resolver- Returns:
- The StoreData
-
unmanageAllClasses
public void unmanageAllClasses(ClassLoaderResolver clr)
Description copied from interface:StoreManager
Remove all classes from the persistence model for the datastore. This empties the datastore of all datastore objects managed by us. All objects of types not managed are left untouched. In the case of RDBMS this means drop all tables for types managed by us.- Specified by:
unmanageAllClasses
in interfaceStoreManager
- Parameters:
clr
- The ClassLoaderResolver
-
unmanageClass
public void unmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)
Description copied from interface:StoreManager
Method to remove knowledge of the specified class from this StoreManager. This can optionally also remove it from the datastore.- Specified by:
unmanageClass
in interfaceStoreManager
- Parameters:
clr
- ClassLoader resolverclassName
- Name of the classremoveFromDatastore
- Whether to also remove it from the datastore (otherwise just from the StoreManager)
-
manageClassForIdentity
public String manageClassForIdentity(Object id, ClassLoaderResolver clr)
Description copied from interface:StoreManager
Convenience method to ensure that the class defined by the passed DatastoreId/SingleFieldId is managed by the store.- Specified by:
manageClassForIdentity
in interfaceStoreManager
- Parameters:
id
- identityclr
- ClassLoader resolver- Returns:
- The class name of the class associated to this identity
-
getExtent
public <T> Extent<T> getExtent(ExecutionContext ec, Class<T> c, boolean subclasses)
Description copied from interface:StoreManager
Interface to getting an Extent for a class.- Specified by:
getExtent
in interfaceStoreManager
- Type Parameters:
T
- Type of the extent- Parameters:
ec
- execution contextc
- The class requiring the Extentsubclasses
- Whether to include subclasses of 'c'- Returns:
- The Extent.
-
getSupportedQueryLanguages
public Collection<String> getSupportedQueryLanguages()
Description copied from interface:StoreManager
Accessor for the supported query languages.- Specified by:
getSupportedQueryLanguages
in interfaceStoreManager
- Returns:
- The supported query languages
-
supportsQueryLanguage
public boolean supportsQueryLanguage(String language)
Description copied from interface:StoreManager
Accessor for whether this query language is supported.- Specified by:
supportsQueryLanguage
in interfaceStoreManager
- Parameters:
language
- The language- Returns:
- Whether it is supported.
-
getClassNameForObjectID
public String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
Description copied from interface:StoreManager
Returns the class corresponding to the given object identity. If the object is datastore-identity, return the PC class specified in the identity. If the object is single-field identity, return the PC class specified in the identity If the object is an AppID PK, return the PC class that uses it. If the object is a SCOID, return the SCO class. If the object is a persistable class, return the class.- Specified by:
getClassNameForObjectID
in interfaceStoreManager
- Parameters:
id
- The identity of some object.clr
- ClassLoader resolverec
- execution context- Returns:
- For datastore identity, return the class of the corresponding object. For application identity, return the class of the corresponding object or null if object does not exist.
-
supportsValueGenerationStrategy
public boolean supportsValueGenerationStrategy(String strategy)
Accessor for whether this value strategy is supported.- Specified by:
supportsValueGenerationStrategy
in interfaceStoreManager
- Parameters:
strategy
- The strategy- Returns:
- Whether it is supported.
-
isValueGenerationStrategyDatastoreAttributed
public boolean isValueGenerationStrategyDatastoreAttributed(AbstractClassMetaData cmd, int absFieldNumber)
Convenience method to return whether the strategy used by the specified class/member is generated by the datastore (during a persist).- Specified by:
isValueGenerationStrategyDatastoreAttributed
in interfaceStoreManager
- Parameters:
cmd
- Metadata for the classabsFieldNumber
- Absolute field number for the field (or -1 if datastore id)- Returns:
- Whether the strategy is generated in the datastore
-
getValueGenerationStrategyValue
public Object getValueGenerationStrategyValue(ExecutionContext ec, AbstractClassMetaData cmd, AbstractMemberMetaData mmd)
Description copied from interface:StoreManager
Method to retrieve the value for a value generation strategy for a particular field or datastore-identity.- Specified by:
getValueGenerationStrategyValue
in interfaceStoreManager
- Parameters:
ec
- execution contextcmd
- AbstractClassMetaData for the classmmd
- MetaData for the member when this is for a member (or null for datastore-identity)- Returns:
- The generated value
-
getValueGeneratorForMember
protected ValueGenerator getValueGeneratorForMember(ClassLoaderResolver clr, AbstractClassMetaData cmd, AbstractMemberMetaData mmd)
-
getValueGenerationStrategyForNative
public String getValueGenerationStrategyForNative(AbstractClassMetaData cmd)
Method defining which value-strategy to use when the user specifies "native" on datastore-identity. This will return as follows- If your field is Numeric-based (or no jdbc-type) then chooses the first one that is supported of "identity", "sequence", "increment", otherwise exception.
- Otherwise your field is String-based then chooses "uuid-hex".
- Specified by:
getValueGenerationStrategyForNative
in interfaceStoreManager
- Parameters:
cmd
- Class requiring the strategy- Returns:
- The strategy used when "native" is specified
-
getValueGenerationStrategyForNative
public String getValueGenerationStrategyForNative(AbstractMemberMetaData mmd)
Method defining which value-strategy to use when the user specifies "native" on a member. This will return as follows- If your field is Numeric-based then chooses the first one that is supported of "identity", "sequence", "increment", otherwise exception.
- Otherwise your field is String-based then chooses "uuid-hex".
- Specified by:
getValueGenerationStrategyForNative
in interfaceStoreManager
- Parameters:
mmd
- Member requiring the strategy- Returns:
- The strategy used when "native" is specified
-
getNextValueForValueGenerator
protected Object getNextValueForValueGenerator(ValueGenerator generator, ExecutionContext ec)
Accessor for the next value from the specified ValueGenerator. This implementation simply returns generator.next(). Any case where the generator requires datastore connections should override this method.- Parameters:
generator
- The generatorec
- execution context- Returns:
- The next value.
-
getPropertiesForValueGenerator
protected Properties getPropertiesForValueGenerator(AbstractClassMetaData cmd, int absoluteFieldNumber, ClassLoaderResolver clr, SequenceMetaData seqmd, TableGeneratorMetaData tablegenmd)
Method to return the properties to pass to the generator for the specified field. Will define the following properties "class-name", "root-class-name", "field-name" (if for a field), "sequence-name", "key-initial-value", "key-cache-size", "sequence-table-name", "sequence-schema-name", "sequence-catalog-name", "sequence-name-column-name", "sequence-nextval-column-name". In addition any extension properties on the respective field or datastore-identity are also passed through as properties.- Parameters:
cmd
- MetaData for the classabsoluteFieldNumber
- Number of the field (-1 = datastore identity)clr
- ClassLoader resolverseqmd
- Any sequence metadatatablegenmd
- Any table generator metadata- Returns:
- The properties to use for this field
-
addValueGenerationPropertiesForIncrement
protected void addValueGenerationPropertiesForIncrement(Properties properties, TableGeneratorMetaData tablegenmd)
-
addValueGenerationPropertiesForSequence
protected void addValueGenerationPropertiesForSequence(Properties properties, SequenceMetaData seqmd)
-
getSubClassesForClass
public Collection<String> getSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)
Description copied from interface:StoreManager
Utility to return the names of the classes that are known subclasses of the provided class. Actually uses the MetaDataManager for determining what is a subclass since the MetaData is often registered before being needed by the Store. The important difference is that this method will then register the subclass as required- Specified by:
getSubClassesForClass
in interfaceStoreManager
- Parameters:
className
- Class for which we search for subclasses.includeDescendents
- Whether to include subclasses of subclasses etcclr
- The ClassLoaderResolver- Returns:
- Set of classes that are subclasses of the input class.
-
getSupportedOptions
public Collection<String> getSupportedOptions()
Accessor for the supported options in string form. Typical values specified here are :-- ApplicationIdentity - if the datastore supports application identity
- DatastoreIdentity - if the datastore supports datastore identity
- ORM - if the datastore supports (some) ORM concepts
- TransactionIsolationLevel.read-committed - if supporting this txn isolation level
- TransactionIsolationLevel.read-uncommitted - if supporting this txn isolation level
- TransactionIsolationLevel.repeatable-read - if supporting this txn isolation level
- TransactionIsolationLevel.serializable - if supporting this txn isolation level
- TransactionIsolationLevel.snapshot - if supporting this txn isolation level
- Query.Cancel - if supporting cancelling of queries
- Query.Timeout - if supporting timeout of queries
- Specified by:
getSupportedOptions
in interfaceStoreManager
- Returns:
- The supported options
-
hasProperty
public boolean hasProperty(String name)
Description copied from class:PropertyStore
Accessor for whether a particular property is defined (but may be null).- Specified by:
hasProperty
in interfaceStoreManager
- Overrides:
hasProperty
in classPropertyStore
- Parameters:
name
- Property name- Returns:
- Whether the property is defined
-
getProperty
public Object getProperty(String name)
Description copied from class:PropertyStore
Method to get the value of a property from the store.- Specified by:
getProperty
in interfaceStoreManager
- Overrides:
getProperty
in classPropertyStore
- Parameters:
name
- Name of the property- Returns:
- Its value (or null)
-
getIntProperty
public int getIntProperty(String name)
Description copied from class:PropertyStore
Accessor for the specified property as an int. If the specified property isn't found returns 0.- Specified by:
getIntProperty
in interfaceStoreManager
- Overrides:
getIntProperty
in classPropertyStore
- Parameters:
name
- Name of the property- Returns:
- Int value for the property
-
getStringProperty
public String getStringProperty(String name)
Description copied from class:PropertyStore
Accessor for the specified property as a String. If the specified property isn't found returns null.- Specified by:
getStringProperty
in interfaceStoreManager
- Overrides:
getStringProperty
in classPropertyStore
- Parameters:
name
- Name of the property- Returns:
- String value for the property
-
getBooleanProperty
public boolean getBooleanProperty(String name)
Description copied from class:PropertyStore
Accessor for the specified property as a boolean. If the specified property isn't found returns false.- Specified by:
getBooleanProperty
in interfaceStoreManager
- Overrides:
getBooleanProperty
in classPropertyStore
- Parameters:
name
- Name of the property- Returns:
- Boolean value for the property
-
getBooleanProperty
public boolean getBooleanProperty(String name, boolean resultIfNotSet)
Description copied from class:PropertyStore
Accessor for the specified property as a boolean.- Specified by:
getBooleanProperty
in interfaceStoreManager
- Overrides:
getBooleanProperty
in classPropertyStore
- Parameters:
name
- Name of the propertyresultIfNotSet
- The value to return if no value for the specified property is found.- Returns:
- Boolean value for the property
-
getBooleanObjectProperty
public Boolean getBooleanObjectProperty(String name)
Description copied from class:PropertyStore
Accessor for the specified property as a Boolean. If the specified property isn't found returns false.- Specified by:
getBooleanObjectProperty
in interfaceStoreManager
- Overrides:
getBooleanObjectProperty
in classPropertyStore
- Parameters:
name
- Name of the property- Returns:
- Boolean value for the property (or null if not present)
-
enableSchemaGeneration
public void enableSchemaGeneration()
Description copied from interface:StoreManager
Convenience method to override the specified schema generation properties and enable schema generation.- Specified by:
enableSchemaGeneration
in interfaceStoreManager
-
resetSchemaGeneration
public void resetSchemaGeneration()
Description copied from interface:StoreManager
Convenience method to reset the schema generation properties to their initial creation values, effectively undoing a call to enableSchemaGeneration.- Specified by:
resetSchemaGeneration
in interfaceStoreManager
-
useBackedSCOWrapperForMember
public boolean useBackedSCOWrapperForMember(AbstractMemberMetaData mmd, ExecutionContext ec)
Description copied from interface:StoreManager
Method to return whether the specified member should use a backed SCO wrapper.- Specified by:
useBackedSCOWrapperForMember
in interfaceStoreManager
- Parameters:
mmd
- Metadata for the memberec
- ExecutionContext- Returns:
- Whether to use a back SCO wrapper (false means use a simple SCO wrapper).
-
getDefaultStateManagerClassName
public String getDefaultStateManagerClassName()
- Specified by:
getDefaultStateManagerClassName
in interfaceStoreManager
-
-