Cumulus4j API
(1.0.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, nontxConnectionFactoryName, nucleusContext, persistenceHandler, readOnlyDatastore, schemaHandler, starter, starterInitialised, storeDataMgr, storeManagerKey, storeManagerRuntime, 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)
           
 ClassMeta getClassMeta(ExecutionContext ec, Class<?> clazz)
          Get the persistent meta-data of a certain class.
 String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
           
 EncryptionCoordinateSetManager getEncryptionCoordinateSetManager()
           
 EncryptionHandler getEncryptionHandler()
           
 IndexEntryFactoryRegistry getIndexFactoryRegistry()
           
protected  String getStrategyForNative(AbstractClassMetaData cmd, int absFieldNumber)
           
 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, getExtent, getIntProperty, getMetaDataManager, getNucleusConnection, getNucleusContext, getNucleusSequence, getPersistenceHandler, getPropertiesForGenerator, getProperty, getQueryCacheKey, getQueryManager, getRuntimeManager, getSchemaHandler, getStoreManagerKey, getStrategyValue, getStrategyValueForGenerator, getStringProperty, getSubClassesForClass, getSupportedOptions, getValueGenerationManager, initialiseAutoStart, isAutoCreateColumns, isAutoCreateConstraints, isAutoCreateTables, isStrategyDatastoreAttributed, isValidateColumns, isValidateConstraints, isValidateTables, logConfiguration, manageClassForIdentity, managesClass, newStoreData, printInformation, registerConnectionFactory, registerConnectionMgr, registerStoreData, removeAllClasses, supportsQueryLanguage, supportsValueStrategy, transactionCommitted, transactionRolledBack, transactionStarted
 
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()

getIndexFactoryRegistry

public IndexEntryFactoryRegistry getIndexFactoryRegistry()

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.
Returns:
the meta-data. Never returns null.

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

getStrategyForNative

protected String getStrategyForNative(AbstractClassMetaData cmd,
                                      int absFieldNumber)
Overrides:
getStrategyForNative 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

Cumulus4j API
(1.0.0)

Copyright © 2012 NightLabs Consulting GmbH. All Rights Reserved.