public interface StoreManager
public MyStoreManager(ClassLoaderResolver clr, NucleusContext ctx, Map<String, Object> props) { }The constructor arguments are
Modifier and Type | Field and Description |
---|---|
static String |
OPTION_APPLICATION_COMPOSITE_ID
Whether the store supports persistence of composite "application" identity.
|
static String |
OPTION_APPLICATION_ID
Whether the store supports persistence of "application" identity.
|
static String |
OPTION_DATASTORE_ID
Whether the store supports persistence of "datastore" identity.
|
static String |
OPTION_DATASTORE_TIME_STORES_MILLISECS
Whether the store will persist milliseconds when persisting a "time" type.
|
static String |
OPTION_DATASTORE_TIME_STORES_NANOSECS
Whether the store will persist nanoseconds when persisting a "time" type.
|
static String |
OPTION_DATASTORE_TIMEOUT
Whether the store supports specification of a timeout on datastore operations.
|
static String |
OPTION_NONDURABLE_ID
Whether the store supports persistence of "non-durable" identity.
|
static String |
OPTION_ORM
Whether the store supports "ORM" concepts in general.
|
static String |
OPTION_ORM_EMBEDDED_ARRAY
Whether the store supports embedding arrays (into the owning objects datastore representation).
|
static String |
OPTION_ORM_EMBEDDED_ARRAY_NESTED
Whether the embedded key/value is storable nested like in JSON (default is in separate table).
|
static String |
OPTION_ORM_EMBEDDED_COLLECTION
Whether the store supports embedding collections (into the owning objects datastore representation).
|
static String |
OPTION_ORM_EMBEDDED_COLLECTION_NESTED
Whether the embedded element is storable nested like in JSON (default is in separate table).
|
static String |
OPTION_ORM_EMBEDDED_MAP
Whether the store supports embedding maps (into the owning objects datastore representation).
|
static String |
OPTION_ORM_EMBEDDED_MAP_NESTED
Whether the embedded element is storable nested like in JSON (default is in separate table).
|
static String |
OPTION_ORM_EMBEDDED_PC
Whether the store supports embedding PC objects (into the owning objects datastore representation).
|
static String |
OPTION_ORM_EMBEDDED_PC_NESTED
Whether the embedded object is storable nested like in JSON (default is flat embedding).
|
static String |
OPTION_ORM_FOREIGN_KEYS
Whether the store supports "foreign keys".
|
static String |
OPTION_ORM_INHERITANCE_COMPLETE_TABLE
Whether the store supports "complete table" inheritance.
|
static String |
OPTION_ORM_INHERITANCE_JOINED_TABLE
Whether the store supports "joined table" inheritance.
|
static String |
OPTION_ORM_INHERITANCE_SINGLE_TABLE
Whether the store supports "single table" inheritance.
|
static String |
OPTION_ORM_SECONDARY_TABLE
Whether the store supports "secondary tables".
|
static String |
OPTION_ORM_SERIALISED_ARRAY_ELEMENT
Whether the store supports serialisation of a array element into a "column".
|
static String |
OPTION_ORM_SERIALISED_COLLECTION_ELEMENT
Whether the store supports serialisation of a collection element into a "column".
|
static String |
OPTION_ORM_SERIALISED_MAP_KEY
Whether the store supports serialisation of a map key into a "column".
|
static String |
OPTION_ORM_SERIALISED_MAP_VALUE
Whether the store supports serialisation of a map value into a "column".
|
static String |
OPTION_ORM_SERIALISED_PC
Whether the store supports serialisation of a PC into a "column".
|
static String |
OPTION_QUERY_CANCEL
Whether the store supports cancellation of queries once started.
|
static String |
OPTION_QUERY_JDOQL_BITWISE_OPS
Whether the store supports use of "bitwise" operations in JDOQL queries.
|
static String |
OPTION_QUERY_JDOQL_BULK_DELETE
Whether the store supports JDOQL queries performing "bulk" DELETE of data.
|
static String |
OPTION_QUERY_JDOQL_BULK_INSERT
Whether the store supports JDOQL queries performing "bulk" INSERT of data.
|
static String |
OPTION_QUERY_JDOQL_BULK_UPDATE
Whether the store supports JDOQL queries performing "bulk" UPDATE of data.
|
static String |
OPTION_QUERY_JPQL_BULK_DELETE
Whether the store supports JPQL queries performing "bulk" DELETE of data.
|
static String |
OPTION_QUERY_JPQL_BULK_INSERT
Whether the store supports JPQL queries performing "bulk" INSERT of data.
|
static String |
OPTION_QUERY_JPQL_BULK_UPDATE
Whether the store supports JPQL queries performing "bulk" UPDATE of data.
|
static String |
OPTION_TRANSACTION_ACID
Whether the store supports ACID transactions.
|
static String |
OPTION_TXN_ISOLATION_READ_COMMITTED
Whether the store supports "read-committed" transaction isolation.
|
static String |
OPTION_TXN_ISOLATION_READ_UNCOMMITTED
Whether the store supports "read-uncommitted" transaction isolation.
|
static String |
OPTION_TXN_ISOLATION_REPEATABLE_READ
Whether the store supports "repeatable-read" transaction isolation.
|
static String |
OPTION_TXN_ISOLATION_SERIALIZABLE
Whether the store supports "serializable" transaction isolation.
|
static String |
RELATION_IDENTITY_STORAGE_PERSISTABLE_IDENTITY |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ApiAdapter |
getApiAdapter()
Accessor for the API adapter.
|
Boolean |
getBooleanObjectProperty(String name) |
boolean |
getBooleanProperty(String name) |
boolean |
getBooleanProperty(String name,
boolean resultIfNotSet) |
String |
getClassNameForObjectID(Object id,
ClassLoaderResolver clr,
ExecutionContext ec)
Returns the class corresponding to the given object identity.
|
default String |
getConnectionDriverName()
Convenience accessor for the driver name to use for the connections (where supported).
|
default Object |
getConnectionFactory()
Convenience accessor for the primary connection factory (when a factory was provided by the user).
|
default Object |
getConnectionFactory2()
Convenience accessor for the secondary connection factory (when a factory was provided by the user).
|
default String |
getConnectionFactory2Name()
Convenience accessor for the factory (JNDI) name for the secondary connection factory (when provided by the user).
|
default String |
getConnectionFactoryName()
Convenience accessor for the factory (JNDI) name for the primary connection factory (when provided by the user).
|
ConnectionManager |
getConnectionManager()
Accessor for the connection manager for this store manager.
|
String |
getConnectionPassword()
Convenience accessor for the password to use for the connections (where required).
|
default String |
getConnectionURL()
Convenience accessor for the URL for the connections.
|
default String |
getConnectionUserName()
Convenience accessor for the user name to use for the connections (where required).
|
default Date |
getDatastoreDate()
Get the date/time of the datastore.
|
String |
getDefaultObjectProviderClassName() |
<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) |
MetaDataManager |
getMetaDataManager() |
NamingFactory |
getNamingFactory() |
default String |
getNativeQueryLanguage()
Accessor for the native query language of this store.
|
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.
|
default NucleusSequence |
getNucleusSequence(ExecutionContext ec,
SequenceMetaData seqmd)
Method to return a datastore sequence for this datastore matching the passed sequence MetaData.
|
StorePersistenceHandler |
getPersistenceHandler() |
Object |
getProperty(String name) |
default String |
getQueryCacheKey()
Accessor for the key used for representing this store manager in the query cache.
|
QueryManager |
getQueryManager() |
StoreSchemaHandler |
getSchemaHandler() |
StoreData |
getStoreDataForClass(String className) |
String |
getStoreManagerKey()
Accessor for the key for this store manager.
|
String |
getStringProperty(String name) |
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()
Strings representing features that are supported by this datastore.
|
Collection<String> |
getSupportedQueryLanguages()
Accessor for the supported query languages.
|
ValueGenerationManager |
getValueGenerationManager()
Accessor for the ValueGenerationManager for generating field values.
|
String |
getValueGenerationStrategyForNative(AbstractClassMetaData cmd,
int absFieldNumber)
Method defining which value-strategy to use when the user specifies "native"/"auto".
|
Object |
getValueGenerationStrategyValue(ExecutionContext ec,
AbstractClassMetaData cmd,
int absoluteFieldNumber)
Method to retrieve the value for a value generation strategy for a particular field.
|
boolean |
hasProperty(String name) |
boolean |
isJdbcStore()
Returns whether the datastore is a "JDBC datastore".
|
boolean |
isValueGenerationStrategyDatastoreAttributed(AbstractClassMetaData cmd,
int absFieldNumber)
Convenience method to return whether the value generation strategy used by the specified class/member is generated in the datastore during a persist.
|
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 currently
|
Query |
newQuery(String language,
ExecutionContext ec)
Method to return a new query, for the specified language and ExecutionContext.
|
Query |
newQuery(String language,
ExecutionContext ec,
Query q)
Method to return a new query, for the specified language and ExecutionContext, using the specified existing query to copy from.
|
Query |
newQuery(String language,
ExecutionContext ec,
String queryString)
Method to return a new query, for the specified language and ExecutionContext, using the specified query string.
|
void |
printInformation(String cat,
PrintStream ps)
Method to output particular information owned by this datastore.
|
boolean |
supportsQueryLanguage(String language)
Accessor for whether this query language is supported.
|
boolean |
supportsValueGenerationStrategy(String strategy)
Accessor for whether this value generation strategy is supported.
|
default void |
transactionCommitted(ExecutionContext ec)
Method to inform the StoreManager that a transaction has committed for the specified execution context.
|
default void |
transactionRolledBack(ExecutionContext ec)
Method to inform the StoreManager that a transaction has rolled back for the specified execution context.
|
default void |
transactionStarted(ExecutionContext ec)
Method to inform the StoreManager that a transaction has started for the specified execution context.
|
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.
|
default boolean |
usesBackedSCOWrappers()
Whether this store manager uses backing-store based SCO wrappers.
|
static final String OPTION_APPLICATION_ID
static final String OPTION_APPLICATION_COMPOSITE_ID
static final String OPTION_DATASTORE_ID
static final String OPTION_NONDURABLE_ID
static final String OPTION_ORM
static final String OPTION_ORM_EMBEDDED_PC
static final String OPTION_ORM_EMBEDDED_COLLECTION
static final String OPTION_ORM_EMBEDDED_MAP
static final String OPTION_ORM_EMBEDDED_ARRAY
static final String OPTION_ORM_EMBEDDED_PC_NESTED
static final String OPTION_ORM_EMBEDDED_COLLECTION_NESTED
static final String OPTION_ORM_EMBEDDED_MAP_NESTED
static final String OPTION_ORM_EMBEDDED_ARRAY_NESTED
static final String OPTION_ORM_SERIALISED_PC
static final String OPTION_ORM_SERIALISED_COLLECTION_ELEMENT
static final String OPTION_ORM_SERIALISED_MAP_KEY
static final String OPTION_ORM_SERIALISED_MAP_VALUE
static final String OPTION_ORM_SERIALISED_ARRAY_ELEMENT
static final String OPTION_ORM_SECONDARY_TABLE
static final String OPTION_ORM_FOREIGN_KEYS
static final String OPTION_ORM_INHERITANCE_COMPLETE_TABLE
static final String OPTION_ORM_INHERITANCE_SINGLE_TABLE
static final String OPTION_ORM_INHERITANCE_JOINED_TABLE
static final String OPTION_TRANSACTION_ACID
static final String OPTION_TXN_ISOLATION_READ_COMMITTED
static final String OPTION_TXN_ISOLATION_READ_UNCOMMITTED
static final String OPTION_TXN_ISOLATION_REPEATABLE_READ
static final String OPTION_TXN_ISOLATION_SERIALIZABLE
static final String OPTION_QUERY_CANCEL
static final String OPTION_QUERY_JDOQL_BULK_INSERT
static final String OPTION_QUERY_JDOQL_BULK_UPDATE
static final String OPTION_QUERY_JDOQL_BULK_DELETE
static final String OPTION_QUERY_JDOQL_BITWISE_OPS
static final String OPTION_QUERY_JPQL_BULK_INSERT
static final String OPTION_QUERY_JPQL_BULK_UPDATE
static final String OPTION_QUERY_JPQL_BULK_DELETE
static final String OPTION_DATASTORE_TIMEOUT
static final String OPTION_DATASTORE_TIME_STORES_MILLISECS
static final String OPTION_DATASTORE_TIME_STORES_NANOSECS
static final String RELATION_IDENTITY_STORAGE_PERSISTABLE_IDENTITY
Collection<String> getSupportedOptions()
void close()
MetaDataManager getMetaDataManager()
StorePersistenceHandler getPersistenceHandler()
FlushProcess getFlushProcess()
NamingFactory getNamingFactory()
QueryManager getQueryManager()
StoreSchemaHandler getSchemaHandler()
default NucleusSequence getNucleusSequence(ExecutionContext ec, SequenceMetaData seqmd)
ec
- execution contextseqmd
- SequenceMetaDataNucleusConnection getNucleusConnection(ExecutionContext ec)
ec
- execution contextConnectionManager getConnectionManager()
default String getConnectionURL()
default String getConnectionUserName()
String getConnectionPassword()
default String getConnectionDriverName()
default Object getConnectionFactory()
default String getConnectionFactoryName()
default Object getConnectionFactory2()
default String getConnectionFactory2Name()
ValueGenerationManager getValueGenerationManager()
boolean supportsValueGenerationStrategy(String strategy)
strategy
- The value generation strategyboolean isValueGenerationStrategyDatastoreAttributed(AbstractClassMetaData cmd, int absFieldNumber)
cmd
- Metadata for the classabsFieldNumber
- number of the field (or -1 if for datastore-id)Object getValueGenerationStrategyValue(ExecutionContext ec, AbstractClassMetaData cmd, int absoluteFieldNumber)
ec
- execution contextcmd
- AbstractClassMetaData for the classabsoluteFieldNumber
- The field numberString getValueGenerationStrategyForNative(AbstractClassMetaData cmd, int absFieldNumber)
cmd
- Class requiring the strategyabsFieldNumber
- Field of the classApiAdapter getApiAdapter()
String getStoreManagerKey()
default String getQueryCacheKey()
PersistenceNucleusContext getNucleusContext()
default Date getDatastoreDate()
boolean isJdbcStore()
void printInformation(String cat, PrintStream ps) throws Exception
cat
- Category of informationps
- PrintStreamException
- Thrown if an error occurs in the output processboolean useBackedSCOWrapperForMember(AbstractMemberMetaData mmd, ExecutionContext ec)
mmd
- Metadata for the memberec
- ExecutionContextboolean managesClass(String className)
className
- The name of the classvoid manageClasses(ClassLoaderResolver clr, String... classNames)
clr
- The ClassLoaderResolverclassNames
- The class(es) to be managedDatastoreValidationException
- If there is some mismatch between the current datastore contents and
those necessary to enable persistence of the given classes.void unmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)
clr
- ClassLoader resolverclassName
- Name of the classremoveFromDatastore
- Whether to also remove it from the datastore (otherwise just from the StoreManager)void unmanageAllClasses(ClassLoaderResolver clr)
clr
- The ClassLoaderResolverString manageClassForIdentity(Object id, ClassLoaderResolver clr)
id
- identityclr
- ClassLoader resolverNucleusUserException
- if the identity is assigned to the wrong class<T> Extent<T> getExtent(ExecutionContext ec, Class<T> c, boolean subclasses)
T
- Type of the extentec
- execution contextc
- The class requiring the Extentsubclasses
- Whether to include subclasses of 'c'Collection<String> getSupportedQueryLanguages()
boolean supportsQueryLanguage(String language)
language
- The languageQuery newQuery(String language, ExecutionContext ec)
language
- The query languageec
- ExecutionContextQuery newQuery(String language, ExecutionContext ec, String queryString)
language
- The query languageec
- ExecutionContextqueryString
- The query stringQuery newQuery(String language, ExecutionContext ec, Query q)
language
- The query languageec
- ExecutionContextq
- Existing querydefault String getNativeQueryLanguage()
String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
id
- The identity of some object.clr
- ClassLoader resolverec
- execution contextClassCastException
- If the type of ID is not recognizedCollection<String> getSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)
className
- Class for which we search for subclasses.includeDescendents
- Whether to include subclasses of subclasses etcclr
- The ClassLoaderResolverboolean hasProperty(String name)
int getIntProperty(String name)
boolean getBooleanProperty(String name)
boolean getBooleanProperty(String name, boolean resultIfNotSet)
default void transactionStarted(ExecutionContext ec)
ec
- ExecutionContextdefault void transactionCommitted(ExecutionContext ec)
ec
- ExecutionContextdefault void transactionRolledBack(ExecutionContext ec)
ec
- ExecutionContextString getDefaultObjectProviderClassName()
default boolean usesBackedSCOWrappers()
Copyright © 2019. All rights reserved.