Cumulus4j API
(1.1.0)

org.cumulus4j.store
Class Cumulus4jStoreManager

java.lang.Object
  extended by org.datanucleus.properties.PropertyStore
      extended by org.datanucleus.store.AbstractStoreManager
          extended by org.cumulus4j.store.Cumulus4jStoreManager
All Implemented Interfaces:
SchemaAwareStoreManager, StoreManager

public class Cumulus4jStoreManager
extends AbstractStoreManager
implements SchemaAwareStoreManager

Store Manager for Cumulus4J operation. This StoreManager handles a backend StoreManager for the persistence to the chosen datastore, and optionally a second backend StoreManager for the persistence of index data to the chosen index datastore. The user will persist objects of their own classes, and these will be translated into the persistence of DataEntry, ClassMeta, FieldMeta for the data, as well as various IndexXXX types.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Field Summary
static String CUMULUS4J_QUERYABLE
          Extension key for marking field as not queryable
 
Fields inherited from class org.datanucleus.store.AbstractStoreManager
autoCreateColumns, autoCreateConstraints, autoCreateTables, autoCreateWarnOnError, autoStartMechanism, connectionMgr, fixedDatastore, LOCALISER, namingFactory, nontxConnectionFactoryName, nucleusContext, persistenceHandler, readOnlyDatastore, schemaHandler, starter, starterInitialised, storeDataMgr, storeManagerKey, txConnectionFactoryName, validateColumns, validateConstraints, validateTables
 
Fields inherited from class org.datanucleus.properties.PropertyStore
properties
 
Constructor Summary
Cumulus4jStoreManager(ClassLoaderResolver clr, NucleusContext nucleusContext, Map<String,Object> props)
           
 
Method Summary
 void createSchema(Set<String> classNames, Properties props)
           
 void deleteSchema(Set<String> classNames, Properties props)
           
protected  ClassMeta detachClassMeta(ExecutionContext ec, PersistenceManager pm, ClassMeta classMeta)
           
 ClassMeta getAttachedClassMeta(ExecutionContext ec, PersistenceManager pm, Class<?> clazz)
           
 ClassMeta getClassMeta(ExecutionContext ec, Class<?> clazz)
          Get the persistent meta-data of a certain class.
 ClassMeta getClassMeta(ExecutionContext ec, long classID, boolean throwExceptionIfNotFound)
           
 List<ClassMeta> getClassMetaWithSubClassMetas(ExecutionContext ec, ClassMeta classMeta)
           
 String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
           
 DatastoreVersionManager getDatastoreVersionManager()
           
 EncryptionCoordinateSetManager getEncryptionCoordinateSetManager()
           
 EncryptionHandler getEncryptionHandler()
           
 Extent getExtent(ExecutionContext ec, Class c, boolean subclasses)
           
 FieldMeta getFieldMeta(ExecutionContext ec, long fieldID, boolean throwExceptionIfNotFound)
           
 IndexEntryFactoryRegistry getIndexFactoryRegistry()
           
 KeyStoreRefManager getKeyStoreRefManager()
           
 Cumulus4jPersistenceHandler getPersistenceHandler()
           
 List<ClassMeta> getSubClassMetas(ExecutionContext ec, Class<?> clazz, boolean includeDescendents)
           
 List<ClassMeta> getSubClassMetas(ExecutionContext ec, ClassMeta classMeta, boolean includeDescendents)
           
 List<ClassMeta> getSubClassMetas(ExecutionContext ec, String className, boolean includeDescendents)
           
 boolean isStrategyDatastoreAttributed(AbstractClassMetaData cmd, int absFieldNumber)
           
protected  void putClassMetaIntoCache(ClassMeta classMeta)
           
protected  void putFieldMetasIntoCache(ClassMeta classMeta)
           
protected  void putFieldMetasIntoCache(Collection<FieldMeta> fieldMetas)
           
 void setClassNameForObjectID(Object id, String className)
          Store the association between an objectID and the class-name of the corresponding persistable object in a WeakHashMap.
 void validateSchema(Set<String> classNames, Properties props)
           
 
Methods inherited from class org.datanucleus.store.AbstractStoreManager
addClass, addClasses, assertReadOnlyForUpdateOfObject, clearAutoStarter, close, deregisterAllStoreData, getApiAdapter, getBooleanObjectProperty, getBooleanProperty, getBooleanProperty, getConnection, getConnection, getConnection, getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionManager, getConnectionPassword, getConnectionURL, getConnectionUserName, getDatastoreDate, getIntProperty, getMetaDataManager, getNamingFactory, getNucleusConnection, getNucleusContext, getNucleusSequence, getPropertiesForGenerator, getProperty, getQueryCacheKey, getQueryManager, getSchemaHandler, getStoreManagerKey, getStrategyForNative, getStrategyValue, getStrategyValueForGenerator, getStringProperty, getSubClassesForClass, getSupportedOptions, getValueGenerationManager, initialiseAutoStart, isAutoCreateColumns, isAutoCreateConstraints, isAutoCreateTables, isValidateColumns, isValidateConstraints, isValidateTables, logConfiguration, manageClassForIdentity, managesClass, newStoreData, printInformation, registerConnectionFactory, registerConnectionMgr, registerStoreData, removeAllClasses, supportsQueryLanguage, supportsValueStrategy, transactionCommitted, transactionRolledBack, transactionStarted, useBackedSCOWrapperForMember, usesBackedSCOWrappers
 
Methods inherited from class org.datanucleus.properties.PropertyStore
hasProperty, 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
hasProperty
 

Field Detail

CUMULUS4J_QUERYABLE

public static final String CUMULUS4J_QUERYABLE
Extension key for marking field as not queryable

See Also:
Constant Field Values
Constructor Detail

Cumulus4jStoreManager

public Cumulus4jStoreManager(ClassLoaderResolver clr,
                             NucleusContext nucleusContext,
                             Map<String,Object> props)
Method Detail

getEncryptionHandler

public EncryptionHandler getEncryptionHandler()

getEncryptionCoordinateSetManager

public EncryptionCoordinateSetManager getEncryptionCoordinateSetManager()

getKeyStoreRefManager

public KeyStoreRefManager getKeyStoreRefManager()

getIndexFactoryRegistry

public IndexEntryFactoryRegistry getIndexFactoryRegistry()

getDatastoreVersionManager

public DatastoreVersionManager getDatastoreVersionManager()

getFieldMeta

public FieldMeta getFieldMeta(ExecutionContext ec,
                              long fieldID,
                              boolean throwExceptionIfNotFound)

getClassMeta

public ClassMeta getClassMeta(ExecutionContext ec,
                              long classID,
                              boolean throwExceptionIfNotFound)

putClassMetaIntoCache

protected void putClassMetaIntoCache(ClassMeta classMeta)

putFieldMetasIntoCache

protected void putFieldMetasIntoCache(ClassMeta classMeta)

putFieldMetasIntoCache

protected void putFieldMetasIntoCache(Collection<FieldMeta> fieldMetas)

detachClassMeta

protected ClassMeta detachClassMeta(ExecutionContext ec,
                                    PersistenceManager pm,
                                    ClassMeta classMeta)

getClassMetaWithSubClassMetas

public List<ClassMeta> getClassMetaWithSubClassMetas(ExecutionContext ec,
                                                     ClassMeta classMeta)

getSubClassMetas

public List<ClassMeta> getSubClassMetas(ExecutionContext ec,
                                        ClassMeta classMeta,
                                        boolean includeDescendents)

getSubClassMetas

public List<ClassMeta> getSubClassMetas(ExecutionContext ec,
                                        Class<?> clazz,
                                        boolean includeDescendents)

getSubClassMetas

public List<ClassMeta> getSubClassMetas(ExecutionContext ec,
                                        String className,
                                        boolean includeDescendents)

getClassMeta

public ClassMeta getClassMeta(ExecutionContext ec,
                              Class<?> clazz)
Get the persistent meta-data of a certain class. This persistent meta-data is primarily used for efficient mapping using long-identifiers instead of fully qualified class names.

Parameters:
ec -
clazz - the Class for which to query the meta-data. Must not be null.
Returns:
the meta-data. Never returns null.

getAttachedClassMeta

public ClassMeta getAttachedClassMeta(ExecutionContext ec,
                                      PersistenceManager pm,
                                      Class<?> clazz)

setClassNameForObjectID

public void setClassNameForObjectID(Object id,
                                    String className)
Store the association between an objectID and the class-name of the corresponding persistable object in a WeakHashMap. This is used for performance optimization of getClassNameForObjectID(Object, ClassLoaderResolver, ExecutionContext).


getClassNameForObjectID

public String getClassNameForObjectID(Object id,
                                      ClassLoaderResolver clr,
                                      ExecutionContext ec)
Specified by:
getClassNameForObjectID in interface StoreManager
Overrides:
getClassNameForObjectID in class AbstractStoreManager

createSchema

public void createSchema(Set<String> classNames,
                         Properties props)
Specified by:
createSchema in interface SchemaAwareStoreManager

deleteSchema

public void deleteSchema(Set<String> classNames,
                         Properties props)
Specified by:
deleteSchema in interface SchemaAwareStoreManager

validateSchema

public void validateSchema(Set<String> classNames,
                           Properties props)
Specified by:
validateSchema in interface SchemaAwareStoreManager

getPersistenceHandler

public Cumulus4jPersistenceHandler getPersistenceHandler()
Specified by:
getPersistenceHandler in interface StoreManager
Overrides:
getPersistenceHandler in class AbstractStoreManager

isStrategyDatastoreAttributed

public boolean isStrategyDatastoreAttributed(AbstractClassMetaData cmd,
                                             int absFieldNumber)
Specified by:
isStrategyDatastoreAttributed in interface StoreManager
Overrides:
isStrategyDatastoreAttributed in class AbstractStoreManager

getExtent

public Extent getExtent(ExecutionContext ec,
                        Class c,
                        boolean subclasses)
Specified by:
getExtent in interface StoreManager
Overrides:
getExtent in class AbstractStoreManager

Cumulus4j API
(1.1.0)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.