public interface CassandraMappingContext extends MappingContext<CassandraPersistentEntity<?>,CassandraPersistentProperty>
MappingContext for Cassandra.| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Class<?> type)
Returns whether this
CassandraMappingContext already contains a CassandraPersistentEntity for the
given type. |
CreateTableSpecification |
getCreateTableSpecificationFor(CassandraPersistentEntity<?> entity)
Returns a
CreateTableSpecification for the given entity, including all mapping information. |
CreateUserTypeSpecification |
getCreateUserTypeSpecificationFor(CassandraPersistentEntity<?> entity)
Returns a
CreateUserTypeSpecification for the given entity, including all mapping information. |
com.datastax.driver.core.DataType |
getDataType(CassandraPersistentProperty property)
Retrieve the data type of the property.
|
com.datastax.driver.core.DataType |
getDataType(Class<?> type)
Retrieve the data type based on the given
type. |
CassandraPersistentEntity<?> |
getExistingPersistentEntity(Class<?> type)
Returns the existing
CassandraPersistentEntity for the given Class. |
Collection<CassandraPersistentEntity<?>> |
getNonPrimaryKeyEntities()
Deprecated.
as of 1.5, use
getTableEntities(). |
Collection<CassandraPersistentEntity<?>> |
getPersistentEntities()
Returns only those entities that don't represent primary key types.
|
Collection<CassandraPersistentEntity<?>> |
getPersistentEntities(boolean includePrimaryKeyTypesAndUdts)
Returns all persistent entities or only non-primary-key entities.
|
Collection<CassandraPersistentEntity<?>> |
getPrimaryKeyEntities()
Deprecated.
as of 1.5
|
Collection<CassandraPersistentEntity<?>> |
getTableEntities()
Returns only
Table entities. |
Collection<CassandraPersistentEntity<?>> |
getUserDefinedTypeEntities()
Returns only those entities representing a user defined type.
|
void |
setVerifier(CassandraPersistentEntityMetadataVerifier verifier)
Sets a verifier other than the
BasicCassandraPersistentEntityMetadataVerifier |
boolean |
usesTable(com.datastax.driver.core.TableMetadata table)
Returns whether this mapping context has any entities mapped to the given table.
|
boolean |
usesUserType(CqlIdentifier userType)
Returns whether this mapping context has any entities using the given user type.
|
boolean |
usesUserType(com.datastax.driver.core.UserType userType)
Returns whether this mapping context has any entities using the given user type.
|
getManagedTypes, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityForCollection<CassandraPersistentEntity<?>> getPersistentEntities()
getPersistentEntities in interface MappingContext<CassandraPersistentEntity<?>,CassandraPersistentProperty>getPersistentEntities(boolean)Collection<CassandraPersistentEntity<?>> getPersistentEntities(boolean includePrimaryKeyTypesAndUdts)
includePrimaryKeyTypesAndUdts - If true, returns all entities, including entities that represent primary
key types and user-defined types. If false, returns only entities that don't represent primary key types and no user-defined types.@Deprecated Collection<CassandraPersistentEntity<?>> getNonPrimaryKeyEntities()
getTableEntities().getPersistentEntities(boolean)@Deprecated Collection<CassandraPersistentEntity<?>> getPrimaryKeyEntities()
Collection<CassandraPersistentEntity<?>> getTableEntities()
Table entities.Collection<CassandraPersistentEntity<?>> getUserDefinedTypeEntities()
getPersistentEntities(boolean)CreateTableSpecification getCreateTableSpecificationFor(CassandraPersistentEntity<?> entity)
CreateTableSpecification for the given entity, including all mapping information.entity - must not be null.CreateUserTypeSpecification getCreateUserTypeSpecificationFor(CassandraPersistentEntity<?> entity)
CreateUserTypeSpecification for the given entity, including all mapping information.entity - must not be null.boolean usesTable(com.datastax.driver.core.TableMetadata table)
table - must not be null.boolean usesUserType(com.datastax.driver.core.UserType userType)
userType - must not be null.boolean usesUserType(CqlIdentifier userType)
userType - must not be null.CassandraPersistentEntity<?> getExistingPersistentEntity(Class<?> type)
CassandraPersistentEntity for the given Class. If it is not yet known to this
CassandraMappingContext, an IllegalArgumentException is thrown.type - The class of the existing persistent entity.boolean contains(Class<?> type)
CassandraMappingContext already contains a CassandraPersistentEntity for the
given type.void setVerifier(CassandraPersistentEntityMetadataVerifier verifier)
BasicCassandraPersistentEntityMetadataVerifiercom.datastax.driver.core.DataType getDataType(CassandraPersistentProperty property)
types are determined using simple types and
configured CustomConversions.property - must not be null.type.CustomConversions,
CassandraSimpleTypeHoldercom.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–2019 Pivotal Software, Inc.. All rights reserved.