public class BasicCassandraPersistentEntity<T> extends BasicPersistentEntity<T,CassandraPersistentProperty> implements CassandraPersistentEntity<T>, ApplicationContextAware
BasicPersistentEntity implementation that adds Cassandra specific metadata.| Modifier and Type | Field and Description |
|---|---|
protected ApplicationContext |
context |
protected static CassandraPersistentEntityMetadataVerifier |
DEFAULT_VERIFIER |
protected Boolean |
forceQuote |
protected CassandraMappingContext |
mappingContext |
protected StandardEvaluationContext |
spelContext |
protected CqlIdentifier |
tableName |
protected CassandraPersistentEntityMetadataVerifier |
verifier |
| Constructor and Description |
|---|
BasicCassandraPersistentEntity(TypeInformation<T> typeInformation) |
BasicCassandraPersistentEntity(TypeInformation<T> typeInformation,
CassandraMappingContext mappingContext)
Creates a new
BasicCassandraPersistentEntity with the given TypeInformation. |
BasicCassandraPersistentEntity(TypeInformation<T> typeInformation,
CassandraMappingContext mappingContext,
CassandraPersistentEntityMetadataVerifier verifier)
Creates a new
BasicCassandraPersistentEntity with the given TypeInformation. |
addPersistentProperty, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isConstructorArgument, isIdProperty, isVersionProperty, returnPropertyIfBetterIdPropertyCandidateOrNull, setPersistentPropertyAccessorFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPersistentProperty, setPersistentPropertyAccessorFactorydoWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isConstructorArgument, isIdProperty, isVersionPropertyprotected static final CassandraPersistentEntityMetadataVerifier DEFAULT_VERIFIER
protected ApplicationContext context
protected Boolean forceQuote
protected CassandraMappingContext mappingContext
protected CassandraPersistentEntityMetadataVerifier verifier
protected CqlIdentifier tableName
protected StandardEvaluationContext spelContext
public BasicCassandraPersistentEntity(TypeInformation<T> typeInformation)
public BasicCassandraPersistentEntity(TypeInformation<T> typeInformation, CassandraMappingContext mappingContext)
BasicCassandraPersistentEntity with the given TypeInformation. Will default the table
name to the entity's simple type name.typeInformation - public BasicCassandraPersistentEntity(TypeInformation<T> typeInformation, CassandraMappingContext mappingContext, CassandraPersistentEntityMetadataVerifier verifier)
BasicCassandraPersistentEntity with the given TypeInformation. Will default the table
name to the entity's simple type name.typeInformation - 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 List<CassandraPersistentProperty> getCompositePrimaryKeyProperties()
getCompositePrimaryKeyProperties in interface CassandraPersistentEntity<T>protected void addCompositePrimaryKeyProperties(CassandraPersistentEntity<?> compositePrimaryKeyEntity, List<CassandraPersistentProperty> properties)
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 ApplicationContext getApplicationContext()
getApplicationContext in interface CassandraPersistentEntity<T>public void setForceQuote(boolean forceQuote)
setForceQuote in interface CassandraPersistentEntity<T>public CassandraMappingContext getMappingContext()
getMappingContext in interface CassandraPersistentEntity<T>public void setTableName(CqlIdentifier tableName)
setTableName in interface CassandraPersistentEntity<T>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>UserDefinedTypepublic com.datastax.driver.core.UserType getUserType()
getUserType in interface CassandraPersistentEntity<T>UserType if the type is a mapped user defined type, otherwise null.UserDefinedTypeprotected CqlIdentifier determineDefaultName()
protected CqlIdentifier determineName(String value, boolean forceQuote)
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.