Class FieldAndGetterReflectionEntityInformation<T,​ID>

  • All Implemented Interfaces:
    org.springframework.data.repository.core.EntityInformation<T,​ID>, org.springframework.data.repository.core.EntityMetadata<T>
    Direct Known Subclasses:
    DynamoDBIdIsHashAndRangeKeyEntityInformationImpl, DynamoDBIdIsHashKeyEntityInformationImpl

    public class FieldAndGetterReflectionEntityInformation<T,​ID>
    extends org.springframework.data.repository.core.support.AbstractEntityInformation<T,​ID>
    EntityInformation implementation that inspects getters for an annotation and invokes this getter's value to retrieve the id.
    Author:
    Michael Lavelle, Sebastian Just
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.reflect.Method method  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ID getId​(T entity)  
      java.lang.Class<ID> getIdType()  
      • Methods inherited from class org.springframework.data.repository.core.support.AbstractEntityInformation

        getJavaType, isNew
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.data.repository.core.EntityInformation

        getRequiredId
    • Field Detail

      • method

        protected java.lang.reflect.Method method
    • Constructor Detail

      • FieldAndGetterReflectionEntityInformation

        public FieldAndGetterReflectionEntityInformation​(@NonNull
                                                         java.lang.Class<T> domainClass,
                                                         @NonNull
                                                         java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
        Creates a new FieldAndGetterReflectionEntityInformation inspecting the given domain class for a getter carrying the given annotation.
        Parameters:
        domainClass - must not be null.
        annotation - must not be null.
    • Method Detail

      • getId

        public ID getId​(T entity)
      • getIdType

        public java.lang.Class<ID> getIdType()