T - the type of the persistent entitypublic class DatastorePersistentEntityImpl<T> extends org.springframework.data.mapping.model.BasicPersistentEntity<T,DatastorePersistentProperty> implements DatastorePersistentEntity<T>
| Constructor and Description |
|---|
DatastorePersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information,
DatastoreMappingContext datastoreMappingContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doWithColumnBackedProperties(org.springframework.data.mapping.PropertyHandler<DatastorePersistentProperty> handler)
Applies the given
PropertyHandler to all
DatastorePersistentProperty contained in this
DatastorePersistentEntity that are stored as columns in the table for this
entity. |
void |
doWithDescendantProperties(org.springframework.data.mapping.PropertyHandler<DatastorePersistentProperty> handler)
Applies the given
PropertyHandler to all
DatastorePersistentProperty contained in this
DatastorePersistentEntity that are properties backed by descendants. |
List<String> |
getCompatibleDiscriminationValues()
Get the discrimination values corresponding to this persistent entity ad its supertypes.
|
String |
getDiscriminationFieldName()
Get the name of the field for subtype discrimination if there is one.
|
String |
getDiscriminatorValue()
Get the discrimination value corresponding to this persistent entity type.
|
DatastorePersistentProperty |
getIdPropertyOrFail()
Gets the ID property, and will throw
DatastoreDataException if the entity
does not have an ID property. |
protected boolean |
hasTableName() |
String |
kindName()
Gets the name of the Datastore Kind.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
verify() |
addAssociation, addPersistentProperty, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getEvaluationContext, getFallbackIsNewStrategy, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPropertyAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, iterator, requiresPropertyPopulation, returnPropertyIfBetterIdPropertyCandidateOrNull, setEvaluationContextProvider, setPersistentPropertyAccessorFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactorydoWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulationforEach, iterator, spliteratorpublic DatastorePersistentEntityImpl(org.springframework.data.util.TypeInformation<T> information, DatastoreMappingContext datastoreMappingContext)
information - type information about the underlying entity type.datastoreMappingContext - a mapping context used to get metadata for related
persistent entities.protected boolean hasTableName()
public String kindName()
DatastorePersistentEntitykindName in interface DatastorePersistentEntity<T>public DatastorePersistentProperty getIdPropertyOrFail()
DatastorePersistentEntityDatastoreDataException if the entity
does not have an ID property.getIdPropertyOrFail in interface DatastorePersistentEntity<T>public void verify()
verify in interface org.springframework.data.mapping.model.MutablePersistentEntity<T,DatastorePersistentProperty>verify in class org.springframework.data.mapping.model.BasicPersistentEntity<T,DatastorePersistentProperty>public String getDiscriminationFieldName()
DatastorePersistentEntitygetDiscriminationFieldName in interface DatastorePersistentEntity<T>null if this persistent entity
doesn't have one.public List<String> getCompatibleDiscriminationValues()
DatastorePersistentEntitygetCompatibleDiscriminationValues in interface DatastorePersistentEntity<T>public String getDiscriminatorValue()
DatastorePersistentEntitygetDiscriminatorValue in interface DatastorePersistentEntity<T>null if there is no value for this type.public void doWithColumnBackedProperties(org.springframework.data.mapping.PropertyHandler<DatastorePersistentProperty> handler)
DatastorePersistentEntityPropertyHandler to all
DatastorePersistentProperty contained in this
DatastorePersistentEntity that are stored as columns in the table for this
entity. This means properties backed by descendants or references to entities of
other Kinds are not provided to the handler.doWithColumnBackedProperties in interface DatastorePersistentEntity<T>handler - must not be null.public void doWithDescendantProperties(org.springframework.data.mapping.PropertyHandler<DatastorePersistentProperty> handler)
DatastorePersistentEntityPropertyHandler to all
DatastorePersistentProperty contained in this
DatastorePersistentEntity that are properties backed by descendants.doWithDescendantProperties in interface DatastorePersistentEntity<T>handler - must not be null.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2021 Pivotal Software, Inc.. All rights reserved.