Class CassandraStoreManager

  • All Implemented Interfaces:
    org.datanucleus.store.schema.SchemaAwareStoreManager, org.datanucleus.store.StoreManager

    public class CassandraStoreManager
    extends org.datanucleus.store.AbstractStoreManager
    implements org.datanucleus.store.schema.SchemaAwareStoreManager
    StoreManager for persisting to Cassandra datastores.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String EXTENSION_CASSANDRA_DELETE_USING
      Comma separated USING clause for DELETES.
      static String EXTENSION_CASSANDRA_INSERT_USING
      Comma separated USING clause for INSERTS.
      static String EXTENSION_CASSANDRA_UPDATE_USING
      Comma separated USING clause for UPDATES.
      static String PROPERTY_CASSANDRA_ENFORCE_UNIQUENESS_IN_APPLICATION  
      static String RESERVED_WORDS  
      • Fields inherited from class org.datanucleus.store.AbstractStoreManager

        connectionMgr, flushProcess, namingFactory, nucleusContext, persistenceHandler, queryMgr, schemaHandler, storeDataMgr, storeManagerKey, valueGenerationMgr
      • 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 
      Constructor Description
      CassandraStoreManager​(org.datanucleus.ClassLoaderResolver clr, org.datanucleus.PersistenceNucleusContext nucleusCtx, Map<String,​Object> props)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createDatabase​(String catalogName, String schemaName, Properties props)  
      void createSchemaForClasses​(Set<String> classNames, Properties props)  
      void deleteDatabase​(String catalogName, String schemaName, Properties props)  
      void deleteSchemaForClasses​(Set<String> classNames, Properties props)  
      String getClassNameForObjectID​(Object id, org.datanucleus.ClassLoaderResolver clr, org.datanucleus.ExecutionContext ec)  
      String getNativeQueryLanguage()  
      SessionStatementProvider getStatementProvider()  
      Collection<String> getSupportedOptions()  
      Collection<String> getSupportedQueryLanguages()  
      void manageClasses​(String[] classNames, org.datanucleus.ClassLoaderResolver clr, com.datastax.oss.driver.api.core.CqlSession session)  
      void manageClasses​(org.datanucleus.ClassLoaderResolver clr, String... classNames)  
      org.datanucleus.store.query.Query newQuery​(String language, org.datanucleus.ExecutionContext ec)  
      org.datanucleus.store.query.Query newQuery​(String language, org.datanucleus.ExecutionContext ec, String queryString)  
      org.datanucleus.store.query.Query newQuery​(String language, org.datanucleus.ExecutionContext ec, org.datanucleus.store.query.Query q)  
      boolean supportsQueryLanguage​(String language)  
      void validateSchemaForClasses​(Set<String> classNames, Properties props)  
      • Methods inherited from class org.datanucleus.store.AbstractStoreManager

        close, deregisterAllStoreData, enableSchemaGeneration, getApiAdapter, getBooleanObjectProperty, getBooleanProperty, getBooleanProperty, getConnectionManager, getConnectionPassword, getDefaultObjectProviderClassName, getExtent, getFlushProcess, getIntProperty, getMetaDataManager, getNamingFactory, getNextValueForValueGenerator, getNucleusConnection, getNucleusContext, getPersistenceHandler, getPropertiesForValueGenerator, getProperty, getQueryManager, getSchemaHandler, getStoreDataForClass, getStoreManagerKey, getStringProperty, getSubClassesForClass, getValueGenerationManager, getValueGenerationStrategyForNative, getValueGenerationStrategyValue, getValueGeneratorForMember, hasProperty, isJdbcStore, isValueGenerationStrategyDatastoreAttributed, logConfiguration, manageClassForIdentity, managesClass, newStoreData, printInformation, registerConnectionMgr, registerStoreData, resetSchemaGeneration, supportsValueGenerationStrategy, unmanageAllClasses, unmanageClass, useBackedSCOWrapperForMember
      • Methods inherited from class org.datanucleus.properties.PropertyStore

        getFrequentProperties, hasPropertyNotNull, setPropertyInternal
      • Methods inherited from interface org.datanucleus.store.StoreManager

        getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionURL, getConnectionUserName, getDatastoreDate, getNucleusSequence, getQueryCacheKey, transactionCommitted, transactionRolledBack, transactionStarted, usesBackedSCOWrappers
    • Field Detail

      • PROPERTY_CASSANDRA_ENFORCE_UNIQUENESS_IN_APPLICATION

        public static final String PROPERTY_CASSANDRA_ENFORCE_UNIQUENESS_IN_APPLICATION
        See Also:
        Constant Field Values
      • EXTENSION_CASSANDRA_INSERT_USING

        public static final String EXTENSION_CASSANDRA_INSERT_USING
        Comma separated USING clause for INSERTS.
        See Also:
        Constant Field Values
      • EXTENSION_CASSANDRA_UPDATE_USING

        public static final String EXTENSION_CASSANDRA_UPDATE_USING
        Comma separated USING clause for UPDATES.
        See Also:
        Constant Field Values
      • EXTENSION_CASSANDRA_DELETE_USING

        public static final String EXTENSION_CASSANDRA_DELETE_USING
        Comma separated USING clause for DELETES.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CassandraStoreManager

        public CassandraStoreManager​(org.datanucleus.ClassLoaderResolver clr,
                                     org.datanucleus.PersistenceNucleusContext nucleusCtx,
                                     Map<String,​Object> props)
        Constructor.
        Parameters:
        clr - ClassLoader resolver
        nucleusCtx - Nucleus context
        props - Properties for the store manager
    • Method Detail

      • getSupportedOptions

        public Collection<String> getSupportedOptions()
        Specified by:
        getSupportedOptions in interface org.datanucleus.store.StoreManager
        Overrides:
        getSupportedOptions in class org.datanucleus.store.AbstractStoreManager
      • getSupportedQueryLanguages

        public Collection<String> getSupportedQueryLanguages()
        Specified by:
        getSupportedQueryLanguages in interface org.datanucleus.store.StoreManager
        Overrides:
        getSupportedQueryLanguages in class org.datanucleus.store.AbstractStoreManager
      • supportsQueryLanguage

        public boolean supportsQueryLanguage​(String language)
        Specified by:
        supportsQueryLanguage in interface org.datanucleus.store.StoreManager
        Overrides:
        supportsQueryLanguage in class org.datanucleus.store.AbstractStoreManager
      • getNativeQueryLanguage

        public String getNativeQueryLanguage()
        Specified by:
        getNativeQueryLanguage in interface org.datanucleus.store.StoreManager
      • newQuery

        public org.datanucleus.store.query.Query newQuery​(String language,
                                                          org.datanucleus.ExecutionContext ec)
        Specified by:
        newQuery in interface org.datanucleus.store.StoreManager
      • newQuery

        public org.datanucleus.store.query.Query newQuery​(String language,
                                                          org.datanucleus.ExecutionContext ec,
                                                          String queryString)
        Specified by:
        newQuery in interface org.datanucleus.store.StoreManager
      • newQuery

        public org.datanucleus.store.query.Query newQuery​(String language,
                                                          org.datanucleus.ExecutionContext ec,
                                                          org.datanucleus.store.query.Query q)
        Specified by:
        newQuery in interface org.datanucleus.store.StoreManager
      • manageClasses

        public void manageClasses​(org.datanucleus.ClassLoaderResolver clr,
                                  String... classNames)
        Specified by:
        manageClasses in interface org.datanucleus.store.StoreManager
        Overrides:
        manageClasses in class org.datanucleus.store.AbstractStoreManager
      • manageClasses

        public void manageClasses​(String[] classNames,
                                  org.datanucleus.ClassLoaderResolver clr,
                                  com.datastax.oss.driver.api.core.CqlSession session)
      • getClassNameForObjectID

        public String getClassNameForObjectID​(Object id,
                                              org.datanucleus.ClassLoaderResolver clr,
                                              org.datanucleus.ExecutionContext ec)
        Specified by:
        getClassNameForObjectID in interface org.datanucleus.store.StoreManager
        Overrides:
        getClassNameForObjectID in class org.datanucleus.store.AbstractStoreManager
      • createDatabase

        public void createDatabase​(String catalogName,
                                   String schemaName,
                                   Properties props)
        Specified by:
        createDatabase in interface org.datanucleus.store.schema.SchemaAwareStoreManager
      • deleteDatabase

        public void deleteDatabase​(String catalogName,
                                   String schemaName,
                                   Properties props)
        Specified by:
        deleteDatabase in interface org.datanucleus.store.schema.SchemaAwareStoreManager
      • createSchemaForClasses

        public void createSchemaForClasses​(Set<String> classNames,
                                           Properties props)
        Specified by:
        createSchemaForClasses in interface org.datanucleus.store.schema.SchemaAwareStoreManager
      • deleteSchemaForClasses

        public void deleteSchemaForClasses​(Set<String> classNames,
                                           Properties props)
        Specified by:
        deleteSchemaForClasses in interface org.datanucleus.store.schema.SchemaAwareStoreManager
      • validateSchemaForClasses

        public void validateSchemaForClasses​(Set<String> classNames,
                                             Properties props)
        Specified by:
        validateSchemaForClasses in interface org.datanucleus.store.schema.SchemaAwareStoreManager