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, getPropertyPathAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, iterator, requiresPropertyPopulation, returnPropertyIfBetterIdPropertyCandidateOrNull, setEvaluationContextProvider, setPersistentPropertyAccessorFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactory
doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, 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
public 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()
DatastorePersistentEntity
kindName
in interface DatastorePersistentEntity<T>
public DatastorePersistentProperty getIdPropertyOrFail()
DatastorePersistentEntity
DatastoreDataException
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()
DatastorePersistentEntity
getDiscriminationFieldName
in interface DatastorePersistentEntity<T>
null
if this persistent entity
doesn't have one.public List<String> getCompatibleDiscriminationValues()
DatastorePersistentEntity
getCompatibleDiscriminationValues
in interface DatastorePersistentEntity<T>
public String getDiscriminatorValue()
DatastorePersistentEntity
getDiscriminatorValue
in interface DatastorePersistentEntity<T>
null
if there is no value for this type.public void doWithColumnBackedProperties(org.springframework.data.mapping.PropertyHandler<DatastorePersistentProperty> handler)
DatastorePersistentEntity
PropertyHandler
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)
DatastorePersistentEntity
PropertyHandler
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.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.