Interface SpannerPersistentProperty

All Superinterfaces:
org.springframework.data.mapping.PersistentProperty<SpannerPersistentProperty>
All Known Implementing Classes:
SpannerCompositeKeyProperty, SpannerPersistentPropertyImpl

public interface SpannerPersistentProperty extends org.springframework.data.mapping.PersistentProperty<SpannerPersistentProperty>
Interface for a PersistentProperty of a SpannerPersistentEntity to be stored in a Google Cloud Spanner table.
Since:
1.1
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.cloud.spanner.Type.Code
    Optionally directly specify the column type in Cloud Spanner.
    Gets the inner type of the column, which is meaningful for columns of type ARRAY in Google Cloud Spanner.
    Gets the name of the column in the Google Cloud Spanner table mapped to this property.
    Gets the maximum data length of the column if provided.
    Gets the order of this column if it is part of the table's primary key.
    Returns WHERE clause of the interleaved property or empty string if no value.
    boolean
    Returns true when the property has an annotation Where with a non-empty value.
    boolean
    If the column is a Cloud Spanner commit timestamp auto-populating column.
    boolean
    Return whether this property is an eagerly-fetched interleaved property.
    boolean
    True if the property is an embedded class containing more columns.
    boolean
    If the column's schema should be NOT NULL when generating a schema based on an entity class.
    boolean
    True if property is a collection of child entities.
    boolean
    Return whether this property is a lazily-fetched interleaved property.
    boolean
    True if property corresponds to a column a Cloud Spanner table or child entities stored in Cloud Spanner.

    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, isReadable, isTransient, isVersionProperty, isWritable, usePropertyAccess
  • Method Details

    • getColumnName

      String getColumnName()
      Gets the name of the column in the Google Cloud Spanner table mapped to this property.
      Returns:
      the name of the column.
    • getColumnInnerType

      Class<?> getColumnInnerType()
      Gets the inner type of the column, which is meaningful for columns of type ARRAY in Google Cloud Spanner.
      Returns:
      the inner type of the column.
    • getPrimaryKeyOrder

      OptionalInt getPrimaryKeyOrder()
      Gets the order of this column if it is part of the table's primary key. Will be empty or null if this column is not part of the primary key.
      Returns:
      an optional that is empty if no primary key order exists for the property.
    • getMaxColumnLength

      OptionalLong getMaxColumnLength()
      Gets the maximum data length of the column if provided.
      Returns:
      an optional that is empty if no maximum length was provided.
    • isMapped

      boolean isMapped()
      True if property corresponds to a column a Cloud Spanner table or child entities stored in Cloud Spanner. False otherwise.
      Returns:
      true if this property will be mapped to and from Cloud Spanner. False otherwise.
    • isEmbedded

      boolean isEmbedded()
      True if the property is an embedded class containing more columns. False otherwise.
      Returns:
      true if the property is embedded.
    • isInterleaved

      boolean isInterleaved()
      True if property is a collection of child entities. False otherwise.
      Returns:
      true if property is a collection of child entities corresponding to an interleaved child table. False otherwise.
    • isGenerateSchemaNotNull

      boolean isGenerateSchemaNotNull()
      If the column's schema should be NOT NULL when generating a schema based on an entity class.
      Returns:
      true if the column should be NOT NULL in generated DDL. false otherwise.
    • isCommitTimestamp

      boolean isCommitTimestamp()
      If the column is a Cloud Spanner commit timestamp auto-populating column. This property is always stored in Cloud Spanner as a Timestamp, and will update based on the latest commit.
      Returns:
      true if the property is an auto-populated commit timestamp. false otherwise.
    • getAnnotatedColumnItemType

      com.google.cloud.spanner.Type.Code getAnnotatedColumnItemType()
      Optionally directly specify the column type in Cloud Spanner. For ARRAY columns this refers to type of the item the array holds. If this is not specified then it is inferred.
      Returns:
      the user-specified column item type.
    • isLazyInterleaved

      boolean isLazyInterleaved()
      Return whether this property is a lazily-fetched interleaved property.
      Returns:
      true if the property is lazily-fetched. false otherwise.
    • isEagerInterleaved

      boolean isEagerInterleaved()
      Return whether this property is an eagerly-fetched interleaved property.
      Returns:
      true if the property is eagerly-fetched. false otherwise.
    • getWhere

      String getWhere()
      Returns WHERE clause of the interleaved property or empty string if no value.
      Returns:
      a WHERE clause of the interleaved property or empty string.
      See Also:
    • hasWhere

      boolean hasWhere()
      Returns true when the property has an annotation Where with a non-empty value.
      Returns:
      true when the property has an annotation Where with a non-empty value.
      See Also: