public class BasicCassandraPersistentEntity<T> extends BasicPersistentEntity<T,CassandraPersistentProperty> implements CassandraPersistentEntity<T>, ApplicationContextAware
BasicPersistentEntity
implementation that adds Cassandra specific metadata.Modifier | 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 . |
protected |
BasicCassandraPersistentEntity(TypeInformation<T> typeInformation,
CassandraPersistentEntityMetadataVerifier verifier,
Comparator<CassandraPersistentProperty> comparator)
Create a new
BasicCassandraPersistentEntity with the given TypeInformation . |
Modifier and Type | Method and Description |
---|---|
void |
addAssociation(Association<CassandraPersistentProperty> association) |
protected com.datastax.oss.driver.api.core.CqlIdentifier |
determineTableName() |
void |
doWithAssociations(AssociationHandler<CassandraPersistentProperty> handler) |
com.datastax.oss.driver.api.core.CqlIdentifier |
getTableName()
Returns the table name to which the entity shall be persisted.
|
CassandraPersistentEntityMetadataVerifier |
getVerifier() |
boolean |
isCompositePrimaryKey()
Returns whether this entity represents a composite primary key.
|
boolean |
isTupleType() |
boolean |
isUserDefinedType() |
void |
setApplicationContext(ApplicationContext context) |
void |
setForceQuote(boolean forceQuote)
Sets whether to enforce quoting when using the
CassandraPersistentEntity.getTableName() in CQL. |
void |
setNamingStrategy(NamingStrategy namingStrategy)
Set the
NamingStrategy to use. |
void |
setTableName(com.datastax.oss.driver.api.core.CqlIdentifier tableName)
Sets the CQL table name.
|
void |
setVerifier(CassandraPersistentEntityMetadataVerifier verifier) |
void |
verify() |
addPersistentProperty, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getEvaluationContext, getEvaluationContext, getFallbackIsNewStrategy, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, iterator, requiresPropertyPopulation, returnPropertyIfBetterIdPropertyCandidateOrNull, setEvaluationContextProvider, setPersistentPropertyAccessorFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setTableName
doWithAll, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation
forEach, iterator, spliterator
public 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 BasicCassandraPersistentEntity(TypeInformation<T> typeInformation, CassandraPersistentEntityMetadataVerifier verifier, Comparator<CassandraPersistentProperty> comparator)
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.comparator
- must not be null.protected com.datastax.oss.driver.api.core.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()
CassandraPersistentEntity
isCompositePrimaryKey
in interface CassandraPersistentEntity<T>
public void verify() throws MappingException
verify
in interface MutablePersistentEntity<T,CassandraPersistentProperty>
verify
in class BasicPersistentEntity<T,CassandraPersistentProperty>
MappingException
public void setApplicationContext(ApplicationContext context) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void setForceQuote(boolean forceQuote)
CassandraPersistentEntity
CassandraPersistentEntity.getTableName()
in CQL.setForceQuote
in interface CassandraPersistentEntity<T>
forceQuote
- true to enforce quoting; false to disable enforced quoting usage.CqlIdentifier.fromInternal(String)
public void setTableName(com.datastax.oss.driver.api.core.CqlIdentifier tableName)
CassandraPersistentEntity
setTableName
in interface CassandraPersistentEntity<T>
tableName
- must not be null.public void setNamingStrategy(NamingStrategy namingStrategy)
NamingStrategy
to use.namingStrategy
- must not be null.public com.datastax.oss.driver.api.core.CqlIdentifier getTableName()
CassandraPersistentEntity
getTableName
in interface CassandraPersistentEntity<T>
public void setVerifier(CassandraPersistentEntityMetadataVerifier verifier)
verifier
- The verifier to set.public CassandraPersistentEntityMetadataVerifier getVerifier()
public boolean isTupleType()
isTupleType
in interface CassandraPersistentEntity<T>
Tuple
public boolean isUserDefinedType()
isUserDefinedType
in interface CassandraPersistentEntity<T>
UserDefinedType
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.