Interface CassandraPersistentProperty

All Superinterfaces:
org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.Aware, org.springframework.data.mapping.PersistentProperty<CassandraPersistentProperty>
All Known Implementing Classes:
BasicCassandraPersistentProperty, BasicCassandraPersistentTupleProperty, CachingCassandraPersistentProperty

public interface CassandraPersistentProperty extends org.springframework.data.mapping.PersistentProperty<CassandraPersistentProperty>, org.springframework.context.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 Type
    Method
    Description
    findAnnotatedType(Class<? extends Annotation> annotationType)
    Find an AnnotatedType by annotationType derived from the property type.
    com.datastax.oss.driver.api.core.CqlIdentifier
    The name of the single column to which the property is persisted.
    The name of the element ordinal to which the property is persisted when the owning type is a mapped tuple.
    The ordering (ascending or descending) for the column.
    default com.datastax.oss.driver.api.core.CqlIdentifier
    The name of the single column to which the property is persisted.
    default int
    The required element ordinal to which the property is persisted when the owning type is a mapped tuple.
    boolean
    Return whether the property has an explicitly configured column name.
    default boolean
    Determines whether this CassandraPersistentProperty is persisted (mapped) to an element ordinal when the owning type is a mapped tuple.
    boolean
    Whether the property is a cluster key column.
    boolean
    Whether the property is a composite primary key.
    default boolean
     
    boolean
    Returns whether the property is a Map.
    boolean
    Whether the property is a partition key column.
    boolean
    Whether the property is a partition key column or a cluster key column
    boolean
    Whether the property maps to a static column.
    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.
    default void
    Deprecated.
    void
    setForceQuote(boolean forceQuote)
    Deprecated.
    since 3.0.

    Methods inherited from interface org.springframework.context.ApplicationContextAware

    setApplicationContext

    Methods inherited from interface org.springframework.data.mapping.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, isTransient, isVersionProperty, isWritable, usePropertyAccess
  • Method Details

    • setColumnName

      @Deprecated default void setColumnName(CqlIdentifier columnName)
      Deprecated.
      If this property is mapped with a single column, set the column name to the given CqlIdentifier. If this property is not mapped by a single column, throws IllegalStateException. If the given column name is null, IllegalArgumentException is thrown.
      Parameters:
      columnName - must not be null.
    • 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 given CqlIdentifier. If this property is not mapped by a single column, throws IllegalStateException. If the given column name is null, IllegalArgumentException is 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
    • setForceQuote

      @Deprecated void setForceQuote(boolean forceQuote)
      Deprecated.
      since 3.0. The column name gets converted into CqlIdentifier hence it no longer requires an indication whether the name should be quoted.
      Whether to force-quote the column names of this property.
      Parameters:
      forceQuote - true to enforce quoting.
      See Also:
    • hasExplicitColumnName

      boolean hasExplicitColumnName()
      Return whether the property has an explicitly configured column name. Eg. via Column.value(), PrimaryKey.value() or PrimaryKeyColumn.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 this CassandraPersistentProperty is persisted (mapped) to an element ordinal when the owning type is a mapped tuple.
      Returns:
      a boolean value indicating whether this CassandraPersistentProperty is 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

      boolean isMapLike()
      Returns whether the property is a Map.
      Returns:
      a boolean indicating whether this property type is a Map.
    • 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

      @Nullable AnnotatedType findAnnotatedType(Class<? extends Annotation> annotationType)
      Find an AnnotatedType 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.
      Parameters:
      annotationType - must not be null.
      Returns:
      the annotated type or null.
      Since:
      2.0