public class SpannerPersistentPropertyImpl extends org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<SpannerPersistentProperty> implements SpannerPersistentProperty
SpannerPersistentProperty
, which is a property
of a SpannerPersistentEntity
stored in a Cloud Spanner table.Type | Property and Description |
---|---|
boolean |
isId
Gets the value of the property idProperty.
|
Modifier and Type | Method and Description |
---|---|
protected org.springframework.data.mapping.Association<SpannerPersistentProperty> |
createAssociation() |
Type.Code |
getAnnotatedColumnItemType()
Optionally directly specify the column type in Cloud Spanner.
|
Class<?> |
getColumnInnerType()
Gets the inner type of the column, which is meaningful for columns of type ARRAY in
Google Cloud Spanner.
|
String |
getColumnName()
Gets the name of the column in the Cloud Spanner table mapped to this property.
|
OptionalLong |
getMaxColumnLength()
Gets the maximum data length of the column if provided.
|
Iterable<? extends org.springframework.data.util.TypeInformation<?>> |
getPersistentEntityTypes()
Only provides types that are also annotated with
Table . |
OptionalInt |
getPrimaryKeyOrder()
Gets the order of this column if it is part of the table's primary key.
|
String |
getWhere()
Returns
WHERE clause of the interleaved property or empty string if no value. |
boolean |
hasWhere()
Returns true when the property has an annotation
Where with a non-empty value. |
boolean |
isCommitTimestamp()
If the column is a Cloud Spanner commit timestamp auto-populating column.
|
boolean |
isEagerInterleaved()
Return whether this property is an eagerly-fetched interleaved property.
|
boolean |
isEmbedded()
True if the property is an embedded class containing more columns.
|
boolean |
isGenerateSchemaNotNull()
If the column's schema should be NOT NULL when generating a schema based on an
entity class.
|
boolean |
isIdProperty()
Gets the value of the property idProperty.
|
boolean |
isInterleaved()
True if property is a collection of child entities.
|
boolean |
isLazyInterleaved()
Return whether this property is a lazily-fetched interleaved property.
|
boolean |
isMapped()
True if property corresponds to a column a Cloud Spanner
table or child entities stored in Cloud Spanner.
|
findAnnotation, findPropertyOrOwnerAnnotation, getAssociationTargetType, getSpelExpression, isAnnotationPresent, isAssociation, isTransient, isVersionProperty, isWritable, toString, usePropertyAccess
equals, getActualType, getAssociation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getProperty, getRawType, getSetter, getType, getTypeInformation, getWither, hashCode, isArray, isCollectionLike, isEntity, isImmutable, isMap
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findAnnotation, findPropertyOrOwnerAnnotation, getAccessorForOwner, getActualType, getAssociation, getAssociationTargetType, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getRawType, getRequiredAnnotation, getRequiredAssociation, getRequiredField, getRequiredGetter, getRequiredSetter, getRequiredWither, getSetter, getSpelExpression, getType, getTypeInformation, getWither, hasActualTypeAnnotation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isEntity, isImmutable, isMap, isTransient, isVersionProperty, isWritable, usePropertyAccess
public boolean isIdProperty
isIdProperty
in interface org.springframework.data.mapping.PersistentProperty<SpannerPersistentProperty>
isIdProperty
in class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<SpannerPersistentProperty>
public Iterable<? extends org.springframework.data.util.TypeInformation<?>> getPersistentEntityTypes()
Table
.getPersistentEntityTypes
in interface org.springframework.data.mapping.PersistentProperty<SpannerPersistentProperty>
getPersistentEntityTypes
in class org.springframework.data.mapping.model.AbstractPersistentProperty<SpannerPersistentProperty>
protected org.springframework.data.mapping.Association<SpannerPersistentProperty> createAssociation()
createAssociation
in class org.springframework.data.mapping.model.AbstractPersistentProperty<SpannerPersistentProperty>
public String getColumnName()
FieldNamingStrategy
passed in to the
SpannerPersistentPropertyImpl(Property, PersistentEntity,
SimpleTypeHolder, FieldNamingStrategy)
constructor. This is by default the by defaultgetColumnName
in interface SpannerPersistentProperty
org.springframework.data.mapping.MappingException
- if the resolution failspublic Class<?> getColumnInnerType()
SpannerPersistentProperty
getColumnInnerType
in interface SpannerPersistentProperty
public OptionalInt getPrimaryKeyOrder()
SpannerPersistentProperty
getPrimaryKeyOrder
in interface SpannerPersistentProperty
public boolean isMapped()
SpannerPersistentProperty
isMapped
in interface SpannerPersistentProperty
public boolean isEmbedded()
SpannerPersistentProperty
isEmbedded
in interface SpannerPersistentProperty
public boolean isInterleaved()
SpannerPersistentProperty
isInterleaved
in interface SpannerPersistentProperty
public OptionalLong getMaxColumnLength()
SpannerPersistentProperty
getMaxColumnLength
in interface SpannerPersistentProperty
public boolean isGenerateSchemaNotNull()
SpannerPersistentProperty
isGenerateSchemaNotNull
in interface SpannerPersistentProperty
true
if the column should be NOT NULL in generated DDL.
false
otherwise.public boolean isCommitTimestamp()
SpannerPersistentProperty
isCommitTimestamp
in interface SpannerPersistentProperty
true
if the property is an auto-populated commit timestamp.
false
otherwise.public String getWhere()
SpannerPersistentProperty
WHERE
clause of the interleaved property or empty string if no value.getWhere
in interface SpannerPersistentProperty
WHERE
clause of the interleaved property or empty string.SpannerPersistentProperty.hasWhere()
public boolean hasWhere()
SpannerPersistentProperty
Where
with a non-empty value.hasWhere
in interface SpannerPersistentProperty
Where
with a non-empty value.SpannerPersistentProperty.getWhere()
public Type.Code getAnnotatedColumnItemType()
SpannerPersistentProperty
getAnnotatedColumnItemType
in interface SpannerPersistentProperty
public boolean isLazyInterleaved()
SpannerPersistentProperty
isLazyInterleaved
in interface SpannerPersistentProperty
true
if the property is lazily-fetched. false
otherwise.public boolean isEagerInterleaved()
SpannerPersistentProperty
isEagerInterleaved
in interface SpannerPersistentProperty
true
if the property is eagerly-fetched. false
otherwise.public boolean isIdProperty()
isIdProperty
in interface org.springframework.data.mapping.PersistentProperty<SpannerPersistentProperty>
isIdProperty
in class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<SpannerPersistentProperty>
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.