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 ConnectionManagerconnectionMgrConnectionManagerprotected FlushProcessflushProcessThe flush process appropriate for this datastore.protected NamingFactorynamingFactoryNaming factory.protected PersistenceNucleusContextnucleusContextNucleus Context.protected StorePersistenceHandlerpersistenceHandlerPersistence handler.protected QueryManagerqueryMgrQuery Manager.protected StoreSchemaHandlerschemaHandlerSchema handler.protected StoreDataManagerstoreDataMgrManager for the data definition in the datastore.protected StringstoreManagerKeyKey for this StoreManager e.g "rdbms", "neo4j"protected ValueGenerationManagervalueGenerationMgrManager 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 protectedAbstractStoreManager(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 voidaddValueGenerationPropertiesForIncrement(Properties properties, TableGeneratorMetaData tablegenmd)protected voidaddValueGenerationPropertiesForSequence(Properties properties, SequenceMetaData seqmd)voidclose()protected voidderegisterAllStoreData()Method to deregister all existing store data so that we are managing nothing.voidenableSchemaGeneration()Convenience method to override the specified schema generation properties and enable schema generation.ApiAdaptergetApiAdapter()Accessor for the API adapter.BooleangetBooleanObjectProperty(String name)Accessor for the specified property as a Boolean.booleangetBooleanProperty(String name)Accessor for the specified property as a boolean.booleangetBooleanProperty(String name, boolean resultIfNotSet)Accessor for the specified property as a boolean.StringgetClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)Returns the class corresponding to the given object identity.ConnectionManagergetConnectionManager()Accessor for the connection manager for this store manager.StringgetConnectionPassword()Convenience accessor for the password to use for the connection.StringgetDefaultStateManagerClassName()<T> Extent<T>getExtent(ExecutionContext ec, Class<T> c, boolean subclasses)Interface to getting an Extent for a class.FlushProcessgetFlushProcess()intgetIntProperty(String name)Accessor for the specified property as an int.MetaDataManagergetMetaDataManager()NamingFactorygetNamingFactory()protected ObjectgetNextValueForValueGenerator(ValueGenerator generator, ExecutionContext ec)Accessor for the next value from the specified ValueGenerator.NucleusConnectiongetNucleusConnection(ExecutionContext ec)Method to return a connection to the user for the ExecutionContext.PersistenceNucleusContextgetNucleusContext()Accessor for the context in which this StoreManager is running.StorePersistenceHandlergetPersistenceHandler()protected PropertiesgetPropertiesForValueGenerator(AbstractClassMetaData cmd, int absoluteFieldNumber, ClassLoaderResolver clr, SequenceMetaData seqmd, TableGeneratorMetaData tablegenmd)Method to return the properties to pass to the generator for the specified field.ObjectgetProperty(String name)Method to get the value of a property from the store.QueryManagergetQueryManager()StoreSchemaHandlergetSchemaHandler()StoreDatagetStoreDataForClass(String className)StringgetStoreManagerKey()Accessor for the key for this store manager.StringgetStringProperty(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.ValueGenerationManagergetValueGenerationManager()Accessor for the ValueGenerationManager for generating field values.StringgetValueGenerationStrategyForNative(AbstractClassMetaData cmd)Method defining which value-strategy to use when the user specifies "native" on datastore-identity.StringgetValueGenerationStrategyForNative(AbstractMemberMetaData mmd)Method defining which value-strategy to use when the user specifies "native" on a member.ObjectgetValueGenerationStrategyValue(ExecutionContext ec, AbstractClassMetaData cmd, AbstractMemberMetaData mmd)Method to retrieve the value for a value generation strategy for a particular field or datastore-identity.protected ValueGeneratorgetValueGeneratorForMember(ClassLoaderResolver clr, AbstractClassMetaData cmd, AbstractMemberMetaData mmd)booleanhasProperty(String name)Accessor for whether a particular property is defined (but may be null).booleanisClosed()booleanisJdbcStore()Returns whether the datastore is a "JDBC datastore".booleanisValueGenerationStrategyDatastoreAttributed(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 voidlogConfiguration()Convenience method to log the configuration of this store manager.voidmanageClasses(ClassLoaderResolver clr, String... classNames)Manage the specified classes.StringmanageClassForIdentity(Object id, ClassLoaderResolver clr)Convenience method to ensure that the class defined by the passed DatastoreId/SingleFieldId is managed by the store.booleanmanagesClass(String className)Accessor for whether the specified class is managed currentlyprotected StoreDatanewStoreData(ClassMetaData cmd, ClassLoaderResolver clr)Instantiate a StoreData instance using the provided ClassMetaData and ClassLoaderResolver.voidprintInformation(String category, PrintStream ps)Method to output the information about the StoreManager.protected voidregisterConnectionMgr()Register the default ConnectionManager implementation.protected voidregisterStoreData(StoreData data)Method to register some data with the store.voidresetSchemaGeneration()Convenience method to reset the schema generation properties to their initial creation values, effectively undoing a call to enableSchemaGeneration.booleansupportsQueryLanguage(String language)Accessor for whether this query language is supported.booleansupportsValueGenerationStrategy(String strategy)Accessor for whether this value strategy is supported.voidunmanageAllClasses(ClassLoaderResolver clr)Remove all classes from the persistence model for the datastore.voidunmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)Method to remove knowledge of the specified class from this StoreManager.booleanuseBackedSCOWrapperForMember(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:
closein interfaceStoreManager
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceStoreManager
-
getConnectionManager
public ConnectionManager getConnectionManager()
Description copied from interface:StoreManagerAccessor for the connection manager for this store manager.- Specified by:
getConnectionManagerin 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:
getConnectionPasswordin interfaceStoreManager- Returns:
- Password
-
isJdbcStore
public boolean isJdbcStore()
Description copied from interface:StoreManagerReturns 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:
isJdbcStorein interfaceStoreManager- Returns:
- Whether this is a JDBC datastore
-
getPersistenceHandler
public StorePersistenceHandler getPersistenceHandler()
- Specified by:
getPersistenceHandlerin interfaceStoreManager
-
getFlushProcess
public FlushProcess getFlushProcess()
- Specified by:
getFlushProcessin interfaceStoreManager
-
getQueryManager
public QueryManager getQueryManager()
- Specified by:
getQueryManagerin interfaceStoreManager
-
getSchemaHandler
public StoreSchemaHandler getSchemaHandler()
- Specified by:
getSchemaHandlerin interfaceStoreManager
-
getNamingFactory
public NamingFactory getNamingFactory()
- Specified by:
getNamingFactoryin interfaceStoreManager
-
getNucleusConnection
public NucleusConnection getNucleusConnection(ExecutionContext ec)
Description copied from interface:StoreManagerMethod to return a connection to the user for the ExecutionContext. Typically provides a wrapper to the currently in-use ManagedConnection.- Specified by:
getNucleusConnectionin interfaceStoreManager- Parameters:
ec- execution context- Returns:
- The datastore Connection
-
getValueGenerationManager
public ValueGenerationManager getValueGenerationManager()
Description copied from interface:StoreManagerAccessor for the ValueGenerationManager for generating field values.- Specified by:
getValueGenerationManagerin interfaceStoreManager- Returns:
- The ValueGenerationManager for this datastore
-
getApiAdapter
public ApiAdapter getApiAdapter()
Description copied from interface:StoreManagerAccessor for the API adapter.- Specified by:
getApiAdapterin interfaceStoreManager- Returns:
- API adapter
-
getStoreManagerKey
public String getStoreManagerKey()
Description copied from interface:StoreManagerAccessor for the key for this store manager.- Specified by:
getStoreManagerKeyin interfaceStoreManager- Returns:
- StoreManager key
-
getNucleusContext
public PersistenceNucleusContext getNucleusContext()
Description copied from interface:StoreManagerAccessor for the context in which this StoreManager is running.- Specified by:
getNucleusContextin interfaceStoreManager- Returns:
- Returns the context.
-
getMetaDataManager
public MetaDataManager getMetaDataManager()
- Specified by:
getMetaDataManagerin interfaceStoreManager
-
getStoreDataForClass
public StoreData getStoreDataForClass(String className)
- Specified by:
getStoreDataForClassin 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:
printInformationin 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:StoreManagerAccessor for whether the specified class is managed currently- Specified by:
managesClassin 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:StoreManagerManage 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:
manageClassesin 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:StoreManagerRemove 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:
unmanageAllClassesin interfaceStoreManager- Parameters:
clr- The ClassLoaderResolver
-
unmanageClass
public void unmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)
Description copied from interface:StoreManagerMethod to remove knowledge of the specified class from this StoreManager. This can optionally also remove it from the datastore.- Specified by:
unmanageClassin 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:StoreManagerConvenience method to ensure that the class defined by the passed DatastoreId/SingleFieldId is managed by the store.- Specified by:
manageClassForIdentityin 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:StoreManagerInterface to getting an Extent for a class.- Specified by:
getExtentin 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:StoreManagerAccessor for the supported query languages.- Specified by:
getSupportedQueryLanguagesin interfaceStoreManager- Returns:
- The supported query languages
-
supportsQueryLanguage
public boolean supportsQueryLanguage(String language)
Description copied from interface:StoreManagerAccessor for whether this query language is supported.- Specified by:
supportsQueryLanguagein interfaceStoreManager- Parameters:
language- The language- Returns:
- Whether it is supported.
-
getClassNameForObjectID
public String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
Description copied from interface:StoreManagerReturns 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:
getClassNameForObjectIDin 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:
supportsValueGenerationStrategyin 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:
isValueGenerationStrategyDatastoreAttributedin 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:StoreManagerMethod to retrieve the value for a value generation strategy for a particular field or datastore-identity.- Specified by:
getValueGenerationStrategyValuein 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:
getValueGenerationStrategyForNativein 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:
getValueGenerationStrategyForNativein 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:StoreManagerUtility 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:
getSubClassesForClassin 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:
getSupportedOptionsin interfaceStoreManager- Returns:
- The supported options
-
hasProperty
public boolean hasProperty(String name)
Description copied from class:PropertyStoreAccessor for whether a particular property is defined (but may be null).- Specified by:
hasPropertyin interfaceStoreManager- Overrides:
hasPropertyin classPropertyStore- Parameters:
name- Property name- Returns:
- Whether the property is defined
-
getProperty
public Object getProperty(String name)
Description copied from class:PropertyStoreMethod to get the value of a property from the store.- Specified by:
getPropertyin interfaceStoreManager- Overrides:
getPropertyin classPropertyStore- Parameters:
name- Name of the property- Returns:
- Its value (or null)
-
getIntProperty
public int getIntProperty(String name)
Description copied from class:PropertyStoreAccessor for the specified property as an int. If the specified property isn't found returns 0.- Specified by:
getIntPropertyin interfaceStoreManager- Overrides:
getIntPropertyin classPropertyStore- Parameters:
name- Name of the property- Returns:
- Int value for the property
-
getStringProperty
public String getStringProperty(String name)
Description copied from class:PropertyStoreAccessor for the specified property as a String. If the specified property isn't found returns null.- Specified by:
getStringPropertyin interfaceStoreManager- Overrides:
getStringPropertyin classPropertyStore- Parameters:
name- Name of the property- Returns:
- String value for the property
-
getBooleanProperty
public boolean getBooleanProperty(String name)
Description copied from class:PropertyStoreAccessor for the specified property as a boolean. If the specified property isn't found returns false.- Specified by:
getBooleanPropertyin interfaceStoreManager- Overrides:
getBooleanPropertyin 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:PropertyStoreAccessor for the specified property as a boolean.- Specified by:
getBooleanPropertyin interfaceStoreManager- Overrides:
getBooleanPropertyin 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:PropertyStoreAccessor for the specified property as a Boolean. If the specified property isn't found returns false.- Specified by:
getBooleanObjectPropertyin interfaceStoreManager- Overrides:
getBooleanObjectPropertyin 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:StoreManagerConvenience method to override the specified schema generation properties and enable schema generation.- Specified by:
enableSchemaGenerationin interfaceStoreManager
-
resetSchemaGeneration
public void resetSchemaGeneration()
Description copied from interface:StoreManagerConvenience method to reset the schema generation properties to their initial creation values, effectively undoing a call to enableSchemaGeneration.- Specified by:
resetSchemaGenerationin interfaceStoreManager
-
useBackedSCOWrapperForMember
public boolean useBackedSCOWrapperForMember(AbstractMemberMetaData mmd, ExecutionContext ec)
Description copied from interface:StoreManagerMethod to return whether the specified member should use a backed SCO wrapper.- Specified by:
useBackedSCOWrapperForMemberin 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:
getDefaultStateManagerClassNamein interfaceStoreManager
-
-