Class CachingCassandraPersistentProperty
java.lang.Object
org.springframework.data.mapping.model.AbstractPersistentProperty<P>
org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<CassandraPersistentProperty>
org.springframework.data.cassandra.core.mapping.BasicCassandraPersistentProperty
org.springframework.data.cassandra.core.mapping.CachingCassandraPersistentProperty
- All Implemented Interfaces:
Aware
,ApplicationContextAware
,CassandraPersistentProperty
,PersistentProperty<CassandraPersistentProperty>
BasicCassandraPersistentProperty
that pre-computes primary key and embedded flags.- Since:
- 3.1.4
- Author:
- Mark Paluch, Aleksei Zotov
-
Constructor Summary
ConstructorsConstructorDescriptionCachingCassandraPersistentProperty
(Property property, CassandraPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) -
Method Summary
Modifier and TypeMethodDescriptionfindAnnotatedType
(Class<? extends Annotation> annotationType) Find anAnnotatedType
byannotationType
derived from the property type.The ordering (ascending or descending) for the column.boolean
Whether the property is a cluster key column.boolean
Whether the property is a composite primary key.boolean
boolean
Whether the property is a partition key column.boolean
Whether the property is a partition key column or a cluster key columnboolean
Whether the property maps to a static column.Methods inherited from class org.springframework.data.cassandra.core.mapping.BasicCassandraPersistentProperty
createAssociation, getAssociation, getColumnName, getOrdinal, getOwner, hasExplicitColumnName, isMapLike, setApplicationContext, setColumnName, setForceQuote, setNamingStrategy
Methods inherited from class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAssociationTargetTypeInformation, getSpelExpression, isAnnotationPresent, isAssociation, isIdProperty, isTransient, isVersionProperty, isWritable, toString, usePropertyAccess
Methods inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty
equals, getActualType, getActualTypeInformation, getAssociationTargetType, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypeInformation, getProperty, getRawType, getSetter, getType, getTypeInformation, getWither, hashCode, isArray, isCollectionLike, isEntity, isImmutable, isMap
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty
getRequiredColumnName, getRequiredOrdinal, hasOrdinal, setColumnName
Methods inherited from interface org.springframework.data.mapping.PersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAccessorForOwner, getActualType, getAssociationTargetType, getAssociationTargetTypeInformation, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypeInformation, getRawType, getRequiredAnnotation, getRequiredAssociation, getRequiredField, getRequiredGetter, getRequiredSetter, getRequiredWither, getSetter, getSpelExpression, getType, getTypeInformation, getWither, hasActualTypeAnnotation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isEntity, isIdProperty, isImmutable, isMap, isTransient, isVersionProperty, isWritable, usePropertyAccess
-
Constructor Details
-
CachingCassandraPersistentProperty
public CachingCassandraPersistentProperty(Property property, CassandraPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder)
-
-
Method Details
-
getPrimaryKeyOrdering
Description copied from interface:CassandraPersistentProperty
The ordering (ascending or descending) for the column. Valid only for primary key columns; returns null for non-primary key columns.- Specified by:
getPrimaryKeyOrdering
in interfaceCassandraPersistentProperty
- Overrides:
getPrimaryKeyOrdering
in classBasicCassandraPersistentProperty
-
isCompositePrimaryKey
public boolean isCompositePrimaryKey()Description copied from interface:CassandraPersistentProperty
Whether the property is a composite primary key.- Specified by:
isCompositePrimaryKey
in interfaceCassandraPersistentProperty
- Overrides:
isCompositePrimaryKey
in classBasicCassandraPersistentProperty
-
isClusterKeyColumn
public boolean isClusterKeyColumn()Description copied from interface:CassandraPersistentProperty
Whether the property is a cluster key column.- Specified by:
isClusterKeyColumn
in interfaceCassandraPersistentProperty
- Overrides:
isClusterKeyColumn
in classBasicCassandraPersistentProperty
-
isPartitionKeyColumn
public boolean isPartitionKeyColumn()Description copied from interface:CassandraPersistentProperty
Whether the property is a partition key column.- Specified by:
isPartitionKeyColumn
in interfaceCassandraPersistentProperty
- Overrides:
isPartitionKeyColumn
in classBasicCassandraPersistentProperty
-
isPrimaryKeyColumn
public boolean isPrimaryKeyColumn()Description copied from interface:CassandraPersistentProperty
Whether the property is a partition key column or a cluster key column- Specified by:
isPrimaryKeyColumn
in interfaceCassandraPersistentProperty
- Overrides:
isPrimaryKeyColumn
in classBasicCassandraPersistentProperty
- See Also:
-
isStaticColumn
public boolean isStaticColumn()Description copied from interface:CassandraPersistentProperty
Whether the property maps to a static column.- Specified by:
isStaticColumn
in interfaceCassandraPersistentProperty
- Overrides:
isStaticColumn
in classBasicCassandraPersistentProperty
-
isEmbedded
public boolean isEmbedded()- Returns:
- true if the property should be embedded.
-
findAnnotatedType
Description copied from interface:CassandraPersistentProperty
Find anAnnotatedType
byannotationType
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.- Specified by:
findAnnotatedType
in interfaceCassandraPersistentProperty
- Overrides:
findAnnotatedType
in classBasicCassandraPersistentProperty
- Parameters:
annotationType
- must not be null.- Returns:
- the annotated type or null.
-