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)
Creates a
SpannerPersistentEntityImpl. |
SpannerPersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information,
SpannerMappingContext spannerMappingContext,
SpannerEntityWriter spannerEntityWriter)
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 |
getSpannerEntityWriter()
Gets a SpannerEntityWriter 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 boolean hasIdProperty
hasIdProperty in interface org.springframework.data.mapping.PersistentEntity<T,SpannerPersistentProperty>hasIdProperty in class org.springframework.data.mapping.model.BasicPersistentEntity<T,SpannerPersistentProperty>public 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, SpannerEntityWriter spannerEntityWriter)
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 entityspannerEntityWriter - an entity writer used to create keys by converting and
combining id properties.protected 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 getSpannerEntityWriter()
SpannerPersistentEntitygetSpannerEntityWriter 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 © 2019 Pivotal Software, Inc.. All rights reserved.