public class BasicCassandraPersistentProperty extends org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<CassandraPersistentProperty> implements CassandraPersistentProperty, ApplicationContextAware
AnnotationBasedPersistentProperty implementation.| Constructor and Description |
|---|
BasicCassandraPersistentProperty(org.springframework.data.mapping.model.Property property,
CassandraPersistentEntity<?> owner,
org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
Create a new
BasicCassandraPersistentProperty. |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.data.mapping.Association<CassandraPersistentProperty> |
createAssociation() |
AnnotatedType |
findAnnotatedType(Class<? extends Annotation> annotationType)
Find an
AnnotatedType by annotationType derived from the property type. |
org.springframework.data.mapping.Association<CassandraPersistentProperty> |
getAssociation() |
com.datastax.oss.driver.api.core.CqlIdentifier |
getColumnName()
The name of the single column to which the property is persisted.
|
Integer |
getOrdinal()
The name of the element ordinal to which the property is persisted when the owning type is a mapped tuple.
|
CassandraPersistentEntity<?> |
getOwner() |
Ordering |
getPrimaryKeyOrdering()
The ordering (ascending or descending) for the column.
|
boolean |
hasExplicitColumnName()
Return whether the property has an explicitly configured column name.
|
boolean |
isClusterKeyColumn()
Whether the property is a cluster key column.
|
boolean |
isCompositePrimaryKey()
Whether the property is a composite primary key.
|
boolean |
isMapLike()
Returns whether the property is a
Map. |
boolean |
isPartitionKeyColumn()
Whether the property is a partition key column.
|
boolean |
isPrimaryKeyColumn()
Whether the property is a partition key column or a cluster key column
|
boolean |
isStaticColumn()
Whether the property maps to a static column.
|
void |
setApplicationContext(ApplicationContext context) |
void |
setColumnName(com.datastax.oss.driver.api.core.CqlIdentifier columnName)
If this property is mapped with a single column, set the column name to the given
CqlIdentifier. |
void |
setForceQuote(boolean forceQuote)
Whether to force-quote the column names of this property.
|
void |
setNamingStrategy(NamingStrategy namingStrategy)
Set the
NamingStrategy to use. |
findAnnotation, findPropertyOrOwnerAnnotation, getAssociationTargetTypeInformation, getSpelExpression, isAnnotationPresent, isAssociation, isIdProperty, isTransient, isVersionProperty, isWritable, toString, usePropertyAccessequals, getActualType, getActualTypeInformation, getAssociationTargetType, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypeInformation, getPersistentEntityTypes, getProperty, getRawType, getSetter, getType, getTypeInformation, getWither, hashCode, isArray, isCollectionLike, isEntity, isImmutable, isMapclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetRequiredColumnName, getRequiredOrdinal, isEmbedded, setColumnNamefindAnnotation, findPropertyOrOwnerAnnotation, getAccessorForOwner, getActualType, getAssociationTargetType, getAssociationTargetTypeInformation, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypeInformation, getPersistentEntityTypes, getRawType, getRequiredAnnotation, getRequiredAssociation, getRequiredField, getRequiredGetter, getRequiredSetter, getRequiredWither, getSetter, getSpelExpression, getType, getTypeInformation, getWither, hasActualTypeAnnotation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isEntity, isIdProperty, isImmutable, isMap, isTransient, isVersionProperty, isWritable, usePropertyAccesspublic BasicCassandraPersistentProperty(org.springframework.data.mapping.model.Property property,
CassandraPersistentEntity<?> owner,
org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
BasicCassandraPersistentProperty.property - the actual Property in the domain entity corresponding to this persistent entity.owner - the containing object or CassandraPersistentEntity of this persistent property.simpleTypeHolder - mapping of Java [simple|wrapper] types to Cassandra data types.public void setApplicationContext(ApplicationContext context)
setApplicationContext in interface ApplicationContextAwarepublic CassandraPersistentEntity<?> getOwner()
getOwner in interface org.springframework.data.mapping.PersistentProperty<CassandraPersistentProperty>getOwner in class org.springframework.data.mapping.model.AbstractPersistentProperty<CassandraPersistentProperty>public com.datastax.oss.driver.api.core.CqlIdentifier getColumnName()
CassandraPersistentPropertygetColumnName in interface CassandraPersistentProperty@Nullable public Integer getOrdinal()
CassandraPersistentPropertygetOrdinal in interface CassandraPersistentProperty@Nullable public Ordering getPrimaryKeyOrdering()
CassandraPersistentPropertygetPrimaryKeyOrdering in interface CassandraPersistentPropertypublic boolean isCompositePrimaryKey()
CassandraPersistentPropertyisCompositePrimaryKey in interface CassandraPersistentPropertypublic boolean isClusterKeyColumn()
CassandraPersistentPropertyisClusterKeyColumn in interface CassandraPersistentPropertypublic boolean isPartitionKeyColumn()
CassandraPersistentPropertyisPartitionKeyColumn in interface CassandraPersistentPropertypublic boolean isPrimaryKeyColumn()
CassandraPersistentPropertyisPrimaryKeyColumn in interface CassandraPersistentPropertyCassandraPersistentProperty.isPartitionKeyColumn(),
CassandraPersistentProperty.isClusterKeyColumn()public boolean isStaticColumn()
CassandraPersistentPropertyisStaticColumn in interface CassandraPersistentPropertypublic boolean hasExplicitColumnName()
CassandraPersistentPropertyColumn.value(),
PrimaryKey.value() or PrimaryKeyColumn.name()hasExplicitColumnName in interface CassandraPersistentPropertypublic void setColumnName(com.datastax.oss.driver.api.core.CqlIdentifier columnName)
CassandraPersistentPropertyCqlIdentifier. If this
property is not mapped by a single column, throws IllegalStateException. If the given column name is null,
IllegalArgumentException is thrown.setColumnName in interface CassandraPersistentPropertycolumnName - must not be null.public void setNamingStrategy(NamingStrategy namingStrategy)
NamingStrategy to use.namingStrategy - must not be null.public void setForceQuote(boolean forceQuote)
CassandraPersistentPropertysetForceQuote in interface CassandraPersistentPropertyforceQuote - true to enforce quoting.CassandraPersistentProperty.getColumnName(),
CqlIdentifier.fromInternal(String)public org.springframework.data.mapping.Association<CassandraPersistentProperty> getAssociation()
getAssociation in interface org.springframework.data.mapping.PersistentProperty<CassandraPersistentProperty>getAssociation in class org.springframework.data.mapping.model.AbstractPersistentProperty<CassandraPersistentProperty>protected org.springframework.data.mapping.Association<CassandraPersistentProperty> createAssociation()
createAssociation in class org.springframework.data.mapping.model.AbstractPersistentProperty<CassandraPersistentProperty>public boolean isMapLike()
CassandraPersistentPropertyMap.isMapLike in interface CassandraPersistentPropertyMap.public AnnotatedType findAnnotatedType(Class<? extends Annotation> annotationType)
CassandraPersistentPropertyAnnotatedType by annotationType derived from the property type. Annotated type is looked up
by introspecting property field/accessors. Collection/Map-like types are introspected for type annotations within
type arguments.findAnnotatedType in interface CassandraPersistentPropertyannotationType - must not be null.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.