T - the type of the persistent entitypublic class SpannerPersistentEntityImpl<T> extends org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty> implements SpannerPersistentEntity<T>
| Type | Property and Description |
|---|---|
boolean |
hasId |
| Constructor and Description |
|---|
SpannerPersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information)
Deprecated.
remove on next major release. use
SpannerPersistentEntityImpl(TypeInformation,
SpannerMappingContext, SpannerEntityProcessor) instead. |
SpannerPersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information,
SpannerMappingContext spannerMappingContext,
SpannerEntityProcessor spannerEntityProcessor)
Creates a
SpannerPersistentEntityImpl. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPersistentProperty(SpannerPersistentProperty property) |
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 SpannerPersistentPropertys 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 SpannerPersistentPropertys 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.
|
<B> org.springframework.data.mapping.PersistentPropertyAccessor<B> |
getPropertyAccessor(B object) |
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. |
protected boolean |
hasAnnotatedTableName() |
boolean |
hasEagerlyLoadedProperties()
Returns true if the entity has at least one eagerly load interleaved property.
|
boolean |
hasIdProperty() |
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. |
boolean |
isJsonProperty(Class<?> type) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
String |
tableName()
Gets the name of the Cloud Spanner table.
|
void |
verify() |
addAssociation, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getEvaluationContext, getEvaluationContext, getFallbackIsNewStrategy, getIdentifierAccessor, getInstanceCreatorMetadata, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPropertyPathAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasVersionProperty, isAnnotationPresent, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, iterator, requiresPropertyPopulation, returnPropertyIfBetterIdPropertyCandidateOrNull, setEvaluationContextProvider, setPersistentPropertyAccessorFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAssociation, setEvaluationContextProvider, setPersistentPropertyAccessorFactorydoWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getInstanceCreatorMetadata, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulationforEach, iterator, spliteratorpublic boolean hasIdProperty
hasIdProperty in interface org.springframework.data.mapping.PersistentEntity<T,SpannerPersistentProperty>hasIdProperty in class org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty>@Deprecated public SpannerPersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information)
SpannerPersistentEntityImpl(TypeInformation,
SpannerMappingContext, SpannerEntityProcessor) instead.SpannerPersistentEntityImpl.information - type information about the underlying entity type.public SpannerPersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information, SpannerMappingContext spannerMappingContext, SpannerEntityProcessor spannerEntityProcessor)
SpannerPersistentEntityImpl.information - type information about the underlying entity type.spannerMappingContext - a mapping context that can be used to create persistent entities
from properties of this entityspannerEntityProcessor - an entity processor used to create keys by converting and
combining id properties, as well as to convert keys to property valuesprotected boolean hasAnnotatedTableName()
public void addPersistentProperty(SpannerPersistentProperty property)
addPersistentProperty in interface org.springframework.data.mapping.model.MutablePersistentEntity<T,SpannerPersistentProperty>addPersistentProperty in class org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty>public SpannerCompositeKeyProperty getIdProperty()
getIdProperty in interface SpannerPersistentEntity<T>getIdProperty in interface org.springframework.data.mapping.PersistentEntity<T,SpannerPersistentProperty>getIdProperty in class org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty>public void doWithInterleavedProperties(org.springframework.data.mapping.PropertyHandler<SpannerPersistentProperty> handler)
SpannerPersistentEntityPropertyHandler to all SpannerPersistentPropertys contained
in this SpannerPersistentProperty that are collections of child entities.doWithInterleavedProperties in interface SpannerPersistentEntity<T>handler - must not be null.public void doWithColumnBackedProperties(org.springframework.data.mapping.PropertyHandler<SpannerPersistentProperty> handler)
SpannerPersistentEntityPropertyHandler to all SpannerPersistentPropertys contained
in this SpannerPersistentProperty that are stored as columns in the table for this
entity.doWithColumnBackedProperties in interface SpannerPersistentEntity<T>handler - must not be null.public boolean hasIdProperty()
hasIdProperty in interface org.springframework.data.mapping.PersistentEntity<T,SpannerPersistentProperty>hasIdProperty in class org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty>public void verify()
verify in interface org.springframework.data.mapping.model.MutablePersistentEntity<T,SpannerPersistentProperty>verify in class org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty>public SpannerPersistentProperty[] getPrimaryKeyProperties()
SpannerPersistentEntitygetPrimaryKeyProperties in interface SpannerPersistentEntity<T>public List<SpannerPersistentProperty> getFlattenedPrimaryKeyProperties()
SpannerPersistentEntitygetFlattenedPrimaryKeyProperties in interface SpannerPersistentEntity<T>public SpannerMappingContext getSpannerMappingContext()
SpannerPersistentEntitygetSpannerMappingContext in interface SpannerPersistentEntity<T>public SpannerEntityWriter getSpannerEntityProcessor()
SpannerPersistentEntitygetSpannerEntityProcessor in interface SpannerPersistentEntity<T>public String tableName()
SpannerPersistentEntitytableName in interface SpannerPersistentEntity<T>public boolean hasMultiFieldKey()
SpannerPersistentEntityhasMultiFieldKey in interface SpannerPersistentEntity<T>public boolean hasEagerlyLoadedProperties()
SpannerPersistentEntityhasEagerlyLoadedProperties in interface SpannerPersistentEntity<T>Interleaved.lazy()public String getWhere()
SpannerPersistentEntityWhere annotation from the entity's class or inherited from
parents or an empty string when no annotation found.getWhere in interface SpannerPersistentEntity<T>Where from the entity's class or inherited from parents or an
empty string when no annotation found.SpannerPersistentEntity.hasWhere()public boolean hasWhere()
SpannerPersistentEntityWhere with a non-empty value.hasWhere in interface SpannerPersistentEntity<T>Where with a non-empty value.SpannerPersistentEntity.getWhere()public Set<String> columns()
SpannerPersistentEntitycolumns in interface SpannerPersistentEntity<T>public boolean isJsonProperty(Class<?> type)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansException@NonNull
public <B> org.springframework.data.mapping.PersistentPropertyAccessor<B> getPropertyAccessor(@NonNull
B object)
getPropertyAccessor in interface org.springframework.data.mapping.PersistentEntity<T,SpannerPersistentProperty>getPropertyAccessor in class org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty>public String getPrimaryKeyColumnName()
SpannerPersistentEntitygetPrimaryKeyColumnName in interface SpannerPersistentEntity<T>Copyright © 2023. All rights reserved.