public class BasicCassandraPersistentEntity<T> extends BasicPersistentEntity<T,CassandraPersistentProperty> implements CassandraPersistentEntity<T>, ApplicationContextAware
BasicPersistentEntity implementation that adds Cassandra specific metadata.hasIdProperty, hasVersionPropertyhasIdProperty, hasVersionProperty| Constructor and Description |
|---|
BasicCassandraPersistentEntity(TypeInformation<T> typeInformation)
Create a new
BasicCassandraPersistentEntity given TypeInformation. |
BasicCassandraPersistentEntity(TypeInformation<T> typeInformation,
CassandraPersistentEntityMetadataVerifier verifier)
Create a new
BasicCassandraPersistentEntity with the given TypeInformation. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssociation(Association<CassandraPersistentProperty> association) |
protected CqlIdentifier |
determineTableName() |
void |
doWithAssociations(AssociationHandler<CassandraPersistentProperty> handler) |
CqlIdentifier |
getTableName()
Returns the table name to which the entity shall be persisted.
|
com.datastax.driver.core.UserType |
getUserType() |
CassandraPersistentEntityMetadataVerifier |
getVerifier() |
boolean |
isCompositePrimaryKey()
Returns whether this entity represents a composite primary key.
|
boolean |
isUserDefinedType() |
void |
setApplicationContext(ApplicationContext context) |
void |
setForceQuote(boolean forceQuote)
Sets whether to enforce quoting when using the
CassandraPersistentEntity.getTableName() in CQL. |
void |
setTableName(CqlIdentifier tableName)
Sets the CQL table name.
|
void |
setVerifier(CassandraPersistentEntityMetadataVerifier verifier) |
void |
verify() |
addPersistentProperty, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPropertyAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isVersionProperty, iterator, returnPropertyIfBetterIdPropertyCandidateOrNull, setPersistentPropertyAccessorFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isVersionPropertyforEach, iterator, spliteratorpublic BasicCassandraPersistentEntity(TypeInformation<T> typeInformation)
BasicCassandraPersistentEntity given TypeInformation.typeInformation - must not be null.public BasicCassandraPersistentEntity(TypeInformation<T> typeInformation, CassandraPersistentEntityMetadataVerifier verifier)
BasicCassandraPersistentEntity with the given TypeInformation. Will default the table
name to the entity's simple type name.typeInformation - must not be null.verifier - must not be null.protected CqlIdentifier determineTableName()
public void addAssociation(Association<CassandraPersistentProperty> association)
addAssociation in interface MutablePersistentEntity<T,CassandraPersistentProperty>addAssociation in class BasicPersistentEntity<T,CassandraPersistentProperty>public void doWithAssociations(AssociationHandler<CassandraPersistentProperty> handler)
doWithAssociations in interface PersistentEntity<T,CassandraPersistentProperty>doWithAssociations in class BasicPersistentEntity<T,CassandraPersistentProperty>public boolean isCompositePrimaryKey()
CassandraPersistentEntityisCompositePrimaryKey in interface CassandraPersistentEntity<T>public void verify()
throws MappingException
verify in interface MutablePersistentEntity<T,CassandraPersistentProperty>verify in class BasicPersistentEntity<T,CassandraPersistentProperty>MappingExceptionpublic void setApplicationContext(ApplicationContext context) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void setForceQuote(boolean forceQuote)
CassandraPersistentEntityCassandraPersistentEntity.getTableName() in CQL.setForceQuote in interface CassandraPersistentEntity<T>forceQuote - true to enforce quoting; false to disable enforced quoting usage.public void setTableName(CqlIdentifier tableName)
CassandraPersistentEntitysetTableName in interface CassandraPersistentEntity<T>tableName - must not be null.public CqlIdentifier getTableName()
CassandraPersistentEntitygetTableName in interface CassandraPersistentEntity<T>public void setVerifier(CassandraPersistentEntityMetadataVerifier verifier)
verifier - The verifier to set.public CassandraPersistentEntityMetadataVerifier getVerifier()
public boolean isUserDefinedType()
isUserDefinedType in interface CassandraPersistentEntity<T>UserDefinedType@Nullable public com.datastax.driver.core.UserType getUserType()
getUserType in interface CassandraPersistentEntity<T>UserType if the type is a mapped user defined type, otherwise null.UserDefinedTypeCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.