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. |
CassandraMappingContext(UserTypeResolver userTypeResolver,
TupleTypeFactory tupleTypeFactory)
Deprecated.
since 3.0,
UserTypeResolver and TupleTypeFactory no longer required here as high-level
type resolution went into CassandraConverter. |
| Modifier and Type | Method and Description |
|---|---|
protected Optional<BasicCassandraPersistentEntity<?>> |
addPersistentEntity(TypeInformation<?> typeInformation) |
protected <T> BasicCassandraPersistentEntity<T> |
createPersistentEntity(TypeInformation<T> typeInformation) |
protected CassandraPersistentProperty |
createPersistentProperty(Property property,
BasicCassandraPersistentEntity<?> owner,
SimpleTypeHolder simpleTypeHolder) |
com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry |
getCodecRegistry()
Deprecated.
since 3.0. Retrieve
CodecRegistry directly from
CassandraConverter. |
CustomConversions |
getCustomConversions()
Deprecated.
since 3.0. Use custom conversion through
MappingCassandraConverter. |
Collection<BasicCassandraPersistentEntity<?>> |
getTableEntities()
Returns only
Table entities. |
Collection<CassandraPersistentEntity<?>> |
getUserDefinedTypeEntities()
Returns only those entities representing a user defined type.
|
UserTypeResolver |
getUserTypeResolver()
Deprecated.
since 3.0. Retrieve
UserTypeResolver directly from
CassandraConverter. |
CassandraPersistentEntityMetadataVerifier |
getVerifier() |
void |
initialize() |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setBeanClassLoader(ClassLoader beanClassLoader) |
void |
setCodecRegistry(com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry codecRegistry)
Deprecated.
since 3.0. Set
CodecRegistry directly on
CassandraConverter. |
void |
setCustomConversions(CustomConversions customConversions)
Deprecated.
since 3.0. Use custom conversion through
MappingCassandraConverter. |
void |
setMapping(Mapping mapping)
Sets the
Mapping. |
void |
setNamingStrategy(NamingStrategy namingStrategy)
Set the
NamingStrategy to use. |
void |
setTupleTypeFactory(TupleTypeFactory tupleTypeFactory)
Deprecated.
since 3.0. Tuple type creation uses
DataTypes.tupleOf(DataType...) |
void |
setUserTypeResolver(UserTypeResolver userTypeResolver)
Deprecated.
since 3.0. Set
UserTypeResolver directly on
CassandraConverter. |
void |
setVerifier(CassandraPersistentEntityMetadataVerifier verifier) |
protected boolean |
shouldCreatePersistentEntityFor(TypeInformation<?> typeInfo) |
boolean |
usesTable(com.datastax.oss.driver.api.core.CqlIdentifier name)
Returns whether this mapping context has any entities mapped to the given table.
|
boolean |
usesUserType(com.datastax.oss.driver.api.core.CqlIdentifier name)
Returns whether this mapping context has any entities using the given user type.
|
addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, findPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, setApplicationEventPublisher, setInitialEntitySet, setSimpleTypeHolder, setStrictclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntitypublic CassandraMappingContext()
CassandraMappingContext.@Deprecated public CassandraMappingContext(UserTypeResolver userTypeResolver, TupleTypeFactory tupleTypeFactory)
UserTypeResolver and TupleTypeFactory no longer required here as high-level
type resolution went into CassandraConverter.userTypeResolver - must not be null.tupleTypeFactory - must not be null.public void initialize()
initialize in class AbstractMappingContext<BasicCassandraPersistentEntity<?>,CassandraPersistentProperty>public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwaresetApplicationContext in class AbstractMappingContext<BasicCassandraPersistentEntity<?>,CassandraPersistentProperty>BeansExceptionpublic void setBeanClassLoader(ClassLoader beanClassLoader)
setBeanClassLoader in interface BeanClassLoaderAware@Deprecated public void setCustomConversions(CustomConversions customConversions)
MappingCassandraConverter.CustomConversions.customConversions - must not be null.@Deprecated public CustomConversions getCustomConversions()
MappingCassandraConverter.public void setMapping(Mapping mapping)
Mapping.mapping - must not be null.public Collection<BasicCassandraPersistentEntity<?>> getTableEntities()
Table entities.public Collection<CassandraPersistentEntity<?>> getUserDefinedTypeEntities()
@Deprecated public void setCodecRegistry(com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry codecRegistry)
CodecRegistry directly on
CassandraConverter.CodecRegistry.codecRegistry - must not be null.@Deprecated public com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry getCodecRegistry()
CodecRegistry directly from
CassandraConverter.public void setNamingStrategy(NamingStrategy namingStrategy)
NamingStrategy to use.namingStrategy - must not be null.@Deprecated public void setTupleTypeFactory(TupleTypeFactory tupleTypeFactory)
DataTypes.tupleOf(DataType...)TupleTypeFactory.tupleTypeFactory - must not be null.@Deprecated public void setUserTypeResolver(UserTypeResolver userTypeResolver)
UserTypeResolver directly on
CassandraConverter.UserTypeResolver.userTypeResolver - must not be null.@Nullable @Deprecated public UserTypeResolver getUserTypeResolver()
UserTypeResolver directly from
CassandraConverter.public void setVerifier(CassandraPersistentEntityMetadataVerifier verifier)
verifier - The verifier to set.public CassandraPersistentEntityMetadataVerifier getVerifier()
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(com.datastax.oss.driver.api.core.CqlIdentifier name)
name - must not be null.public boolean usesUserType(com.datastax.oss.driver.api.core.CqlIdentifier name)
name - must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.