Interface CassandraPersistentProperty
- All Superinterfaces:
ApplicationContextAware, Aware, PersistentProperty<CassandraPersistentProperty>
- All Known Implementing Classes:
BasicCassandraPersistentProperty, BasicCassandraPersistentTupleProperty, CachingCassandraPersistentProperty
public interface CassandraPersistentProperty
extends PersistentProperty<CassandraPersistentProperty>, ApplicationContextAware
Cassandra specific
PersistentProperty extension.- Author:
- Alex Shvid, Matthew T. Adams, David T. Webb, Mark Paluch, John Blum, Christoph Strobl, Frank Spitulski, Aleksei Zotov
-
Method Summary
Modifier and TypeMethodDescription@Nullable AnnotatedTypefindAnnotatedType(Class<? extends Annotation> annotationType) Find anAnnotatedTypebyannotationTypederived from the property type.@Nullable com.datastax.oss.driver.api.core.CqlIdentifierThe name of the single column to which the property is persisted.@Nullable IntegerThe name of the element ordinal to which the property is persisted when the owning type is a mapped tuple.@Nullable OrderingThe ordering (ascending or descending) for the column.default com.datastax.oss.driver.api.core.CqlIdentifierThe name of the single column to which the property is persisted.default intThe required element ordinal to which the property is persisted when the owning type is a mapped tuple.booleanReturn whether the property has an explicitly configured column name.default booleanDetermines whether thisCassandraPersistentPropertyis persisted (mapped) to an element ordinal when the owning type is a mapped tuple.booleanWhether the property is a cluster key column.booleanWhether the property is a composite primary key.default booleanbooleanReturns whether the property is aMap.booleanWhether the property is a partition key column.booleanWhether the property is a partition key column or a cluster key columnbooleanWhether the property maps to a static column.voidsetColumnName(com.datastax.oss.driver.api.core.CqlIdentifier columnName) If this property is mapped with a single column, set the column name to the givenCqlIdentifier.Methods inherited from interface ApplicationContextAware
setApplicationContextMethods inherited from interface PersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAccessorForOwner, getActualType, getAssociation, getAssociationTargetType, getAssociationTargetTypeInformation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityTypeInformation, getRawType, getRequiredAnnotation, getRequiredAssociation, getRequiredField, getRequiredGetter, getRequiredSetter, getRequiredWither, getSetter, getSpelExpression, getType, getTypeInformation, getWither, hasActualTypeAnnotation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isEntity, isIdProperty, isImmutable, isMap, isReadable, isTransient, isVersionProperty, isWritable, usePropertyAccess
-
Method Details
-
setColumnName
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 givenCqlIdentifier. If this property is not mapped by a single column, throwsIllegalStateException. If the given column name is null,IllegalArgumentExceptionis thrown.- Parameters:
columnName- must not be null.
-
getColumnName
@Nullable com.datastax.oss.driver.api.core.CqlIdentifier getColumnName()The name of the single column to which the property is persisted. -
getRequiredColumnName
default com.datastax.oss.driver.api.core.CqlIdentifier getRequiredColumnName()The name of the single column to which the property is persisted.- Throws:
IllegalStateException- if the required column name is not available.- Since:
- 2.1
-
hasExplicitColumnName
boolean hasExplicitColumnName()Return whether the property has an explicitly configured column name. Eg. viaColumn.value(),PrimaryKey.value()orPrimaryKeyColumn.name()- Returns:
- true if a configured column name is present and non empty.
- Since:
- 3.4
-
getOrdinal
@Nullable Integer getOrdinal()The name of the element ordinal to which the property is persisted when the owning type is a mapped tuple. -
getRequiredOrdinal
default int getRequiredOrdinal()The required element ordinal to which the property is persisted when the owning type is a mapped tuple.- Throws:
IllegalStateException- if the required ordinal is not available.- Since:
- 2.1
-
hasOrdinal
default boolean hasOrdinal()Determines whether thisCassandraPersistentPropertyis persisted (mapped) to an element ordinal when the owning type is a mapped tuple.- Returns:
- a boolean value indicating whether this
CassandraPersistentPropertyis persisted (mapped) to an element ordinal when the owning type is a mapped tuple. - Since:
- 4.0
- See Also:
-
getPrimaryKeyOrdering
@Nullable Ordering getPrimaryKeyOrdering()The ordering (ascending or descending) for the column. Valid only for primary key columns; returns null for non-primary key columns. -
isClusterKeyColumn
boolean isClusterKeyColumn()Whether the property is a cluster key column. -
isCompositePrimaryKey
boolean isCompositePrimaryKey()Whether the property is a composite primary key. -
isMapLike
-
isPartitionKeyColumn
boolean isPartitionKeyColumn()Whether the property is a partition key column. -
isPrimaryKeyColumn
boolean isPrimaryKeyColumn()Whether the property is a partition key column or a cluster key column- See Also:
-
isStaticColumn
boolean isStaticColumn()Whether the property maps to a static column.- Since:
- 3.2
-
isEmbedded
default boolean isEmbedded()- Returns:
- true if the property should be embedded.
- Since:
- 3.0
-
findAnnotatedType
Find anAnnotatedTypebyannotationTypederived 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.- Parameters:
annotationType- must not be null.- Returns:
- the annotated type or null.
- Since:
- 2.0
-