Interface DatastorePersistentEntity<T>

Type Parameters:
T - the type of the property described by this persistent property
All Superinterfaces:
org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.Aware, Iterable<DatastorePersistentProperty>, org.springframework.data.mapping.model.MutablePersistentEntity<T,DatastorePersistentProperty>, org.springframework.data.mapping.PersistentEntity<T,DatastorePersistentProperty>
All Known Implementing Classes:
DatastorePersistentEntityImpl

public interface DatastorePersistentEntity<T> extends org.springframework.data.mapping.model.MutablePersistentEntity<T,DatastorePersistentProperty>, org.springframework.context.ApplicationContextAware
Persistent entity for Google Cloud Datastore.
Since:
1.1
  • Method Summary

    Modifier and Type
    Method
    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.
    Get the discrimination values corresponding to this persistent entity ad its supertypes.
    Get the name of the field for subtype discrimination if there is one.
    Get the discrimination value corresponding to this persistent entity type.
    Gets the ID property, and will throw DatastoreDataException if the entity does not have an ID property.
    Gets the name of the Datastore Kind.

    Methods inherited from interface org.springframework.context.ApplicationContextAware

    setApplicationContext

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator

    Methods inherited from interface org.springframework.data.mapping.model.MutablePersistentEntity

    addAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactory, verify

    Methods inherited from interface org.springframework.data.mapping.PersistentEntity

    doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation
  • Method Details

    • kindName

      String kindName()
      Gets the name of the Datastore Kind.
      Returns:
      the name of the Datastore Kind that stores these entities.
    • getIdPropertyOrFail

      DatastorePersistentProperty getIdPropertyOrFail()
      Gets the ID property, and will throw DatastoreDataException if the entity does not have an ID property.
      Returns:
      the ID property.
    • getDiscriminationFieldName

      String getDiscriminationFieldName()
      Get the name of the field for subtype discrimination if there is one.
      Returns:
      the name of the discrimination field. null if this persistent entity doesn't have one.
    • getDiscriminatorValue

      String getDiscriminatorValue()
      Get the discrimination value corresponding to this persistent entity type.
      Returns:
      the value or null if there is no value for this type.
    • getCompatibleDiscriminationValues

      List<String> getCompatibleDiscriminationValues()
      Get the discrimination values corresponding to this persistent entity ad its supertypes.
      Returns:
      the list of values where the first item is this entity's discrimination value
    • doWithColumnBackedProperties

      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. This means properties backed by descendants or references to entities of other Kinds are not provided to the handler.
      Parameters:
      handler - must not be null.
    • doWithDescendantProperties

      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.
      Parameters:
      handler - must not be null.