T - the type of the persistent entitypublic class SpannerPersistentEntityImpl<T> extends org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty> implements SpannerPersistentEntity<T>
| Constructor and Description |
|---|
SpannerPersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information)
Creates a
SpannerPersistentEntityImpl. |
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() |
SpannerPersistentProperty[] |
getPrimaryKeyProperties()
Gets the primary key properties in order.
|
org.springframework.data.mapping.PersistentPropertyAccessor |
getPropertyAccessor(Object 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.
|
protected boolean |
hasAnnotatedTableName() |
boolean |
hasIdProperty() |
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, getFallbackIsNewStrategy, getIdentifierAccessor, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, iterator, requiresPropertyPopulation, returnPropertyIfBetterIdPropertyCandidateOrNull, setEvaluationContextProvider, setPersistentPropertyAccessorFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAssociation, setEvaluationContextProvider, setPersistentPropertyAccessorFactorydoWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulationforEach, iterator, spliteratorpublic SpannerPersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information)
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 Set<String> columns()
SpannerPersistentEntitycolumns in interface SpannerPersistentEntity<T>public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic org.springframework.data.mapping.PersistentPropertyAccessor getPropertyAccessor(Object object)
getPropertyAccessor in interface org.springframework.data.mapping.PersistentEntity<T,SpannerPersistentProperty>getPropertyAccessor in class org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty>Copyright © 2021 Pivotal Software, Inc.. All rights reserved.