public class CassandraMappingContext extends AbstractMappingContext<BasicCassandraPersistentEntity<?>,CassandraPersistentProperty> implements ApplicationContextAware, BeanClassLoaderAware
MappingContext for Cassandra using CassandraPersistentEntity and
CassandraPersistentProperty as primary abstractions.| Constructor and Description |
|---|
CassandraMappingContext()
Create a new
CassandraMappingContext. |
addPersistentEntity, afterPropertiesSet, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, setApplicationEventPublisher, setInitialEntitySet, setSimpleTypeHolder, setStrictclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntitypublic CassandraMappingContext()
CassandraMappingContext.public void initialize()
initialize in class AbstractMappingContext<BasicCassandraPersistentEntity<?>,CassandraPersistentProperty>public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void setBeanClassLoader(ClassLoader beanClassLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic void setCustomConversions(CustomConversions customConversions)
CustomConversions.customConversions - must not be null.public void setMapping(Mapping mapping)
Mapping.mapping - must not be null.public void setUserTypeResolver(UserTypeResolver userTypeResolver)
UserTypeResolver.userTypeResolver - must not be null.public void setVerifier(CassandraPersistentEntityMetadataVerifier verifier)
verifier - The verifier to set.public CassandraPersistentEntityMetadataVerifier getVerifier()
public Collection<BasicCassandraPersistentEntity<?>> getTableEntities()
Table entities.public Collection<CassandraPersistentEntity<?>> getUserDefinedTypeEntities()
protected Optional<BasicCassandraPersistentEntity<?>> addPersistentEntity(TypeInformation<?> typeInformation)
addPersistentEntity in class AbstractMappingContext<BasicCassandraPersistentEntity<?>,CassandraPersistentProperty>protected boolean shouldCreatePersistentEntityFor(TypeInformation<?> typeInfo)
protected <T> BasicCassandraPersistentEntity<T> createPersistentEntity(TypeInformation<T> typeInformation)
createPersistentEntity in class AbstractMappingContext<BasicCassandraPersistentEntity<?>,CassandraPersistentProperty>protected CassandraPersistentProperty createPersistentProperty(Property property, BasicCassandraPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder)
createPersistentProperty in class AbstractMappingContext<BasicCassandraPersistentEntity<?>,CassandraPersistentProperty>public boolean usesTable(CqlIdentifier name)
name - must not be null.public boolean usesUserType(CqlIdentifier name)
name - must not be null.public CreateTableSpecification getCreateTableSpecificationFor(CassandraPersistentEntity<?> entity)
CreateTableSpecification for the given entity, including all mapping information.entity - must not be null.public List<CreateIndexSpecification> getCreateIndexSpecificationsFor(CassandraPersistentEntity<?> entity)
entity - must not be null.public CreateUserTypeSpecification getCreateUserTypeSpecificationFor(CassandraPersistentEntity<?> entity)
CreateUserTypeSpecification for the given entity, including all mapping information.entity - must not be null.public com.datastax.driver.core.DataType getDataType(CassandraPersistentProperty property)
types are determined using simple types and
configured CustomConversions.property - must not be null.type.CustomConversions,
CassandraSimpleTypeHolderpublic com.datastax.driver.core.DataType getDataType(Class<?> type)
type. Cassandra types are determined using
simple types and configured CustomConversions.type - must not be null.type.CustomConversions,
CassandraSimpleTypeHolderCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.