T
- the underlying persistent entity typepublic interface SpannerPersistentEntity<T> extends org.springframework.data.mapping.model.MutablePersistentEntity<T,SpannerPersistentProperty>, org.springframework.context.ApplicationContextAware
MutablePersistentEntity
stored in a Cloud Spanner
table.Modifier and Type | Method and Description |
---|---|
Set<String> |
columns()
Gets the column names stored for this entity.
|
void |
doWithColumnBackedProperties(org.springframework.data.mapping.PropertyHandler<SpannerPersistentProperty> handler)
Applies the given
PropertyHandler to all SpannerPersistentProperty s contained
in this SpannerPersistentProperty that are stored as columns in the table for this
entity. |
void |
doWithInterleavedProperties(org.springframework.data.mapping.PropertyHandler<SpannerPersistentProperty> handler)
Applies the given
PropertyHandler to all SpannerPersistentProperty s contained
in this SpannerPersistentProperty that are collections of child entities. |
List<SpannerPersistentProperty> |
getFlattenedPrimaryKeyProperties()
Gets the primary key properties in order.
|
SpannerCompositeKeyProperty |
getIdProperty() |
String |
getPrimaryKeyColumnName()
Returns a primary key column name; if there are multiple primary key columns, returns first
one.
|
SpannerPersistentProperty[] |
getPrimaryKeyProperties()
Gets the primary key properties in order.
|
SpannerEntityWriter |
getSpannerEntityProcessor()
Gets a SpannerEntityProcessor that can be used to create Cloud Spanner keys from one or more
persistent properties.
|
SpannerMappingContext |
getSpannerMappingContext()
Gets the SpannerMappingContext that can be used to create persistent entities of types that
appear as properties of this entity.
|
String |
getWhere()
Returns the value of the
Where annotation from the entity's class or inherited from
parents or an empty string when no annotation found. |
boolean |
hasEagerlyLoadedProperties()
Returns true if the entity has at least one eagerly load interleaved property.
|
boolean |
hasMultiFieldKey()
Returns true if the entity has a muti-field key.
|
boolean |
hasWhere()
Returns true when the entity has an annotation
Where with a non-empty value. |
String |
tableName()
Gets the name of the Cloud Spanner table.
|
addAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactory, verify
doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation
forEach, iterator, spliterator
String tableName()
Set<String> columns()
SpannerPersistentProperty[] getPrimaryKeyProperties()
List<SpannerPersistentProperty> getFlattenedPrimaryKeyProperties()
SpannerMappingContext getSpannerMappingContext()
SpannerEntityWriter getSpannerEntityProcessor()
SpannerCompositeKeyProperty getIdProperty()
getIdProperty
in interface org.springframework.data.mapping.PersistentEntity<T,SpannerPersistentProperty>
void doWithInterleavedProperties(org.springframework.data.mapping.PropertyHandler<SpannerPersistentProperty> handler)
PropertyHandler
to all SpannerPersistentProperty
s contained
in this SpannerPersistentProperty
that are collections of child entities.handler
- must not be null.void doWithColumnBackedProperties(org.springframework.data.mapping.PropertyHandler<SpannerPersistentProperty> handler)
PropertyHandler
to all SpannerPersistentProperty
s contained
in this SpannerPersistentProperty
that are stored as columns in the table for this
entity.handler
- must not be null.boolean hasMultiFieldKey()
String getPrimaryKeyColumnName()
boolean hasEagerlyLoadedProperties()
Interleaved.lazy()
String getWhere()
Where
annotation from the entity's class or inherited from
parents or an empty string when no annotation found.Where
from the entity's class or inherited from parents or an
empty string when no annotation found.hasWhere()
boolean hasWhere()
Where
with a non-empty value.Where
with a non-empty value.getWhere()
Copyright © 2022. All rights reserved.