|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID> org.springframework.data.repository.core.support.ReflectionEntityInformation<T,ID>
public class ReflectionEntityInformation<T,ID extends Serializable>
EntityInformation
implementation that inspects fields for an annotation and looks up this field's value to
retrieve the id.
Constructor Summary | |
---|---|
ReflectionEntityInformation(Class<T> domainClass)
Creates a new ReflectionEntityInformation inspecting the given domain class for a field carrying the
Id annotation. |
|
ReflectionEntityInformation(Class<T> domainClass,
Class<? extends Annotation> annotation)
Creates a new ReflectionEntityInformation inspecting the given domain class for a field carrying the given
annotation. |
Method Summary | |
---|---|
ID |
getId(Object entity)
Returns the id of the given entity. |
Class<ID> |
getIdType()
Returns the type of the id of the entity. |
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 |
Constructor Detail |
---|
public ReflectionEntityInformation(Class<T> domainClass)
ReflectionEntityInformation
inspecting the given domain class for a field carrying the
Id
annotation.
domainClass
- must not be null.public ReflectionEntityInformation(Class<T> domainClass, Class<? extends Annotation> annotation)
ReflectionEntityInformation
inspecting the given domain class for a field carrying the given
annotation.
domainClass
- must not be null.annotation
- must not be null.Method Detail |
---|
public ID getId(Object entity)
EntityInformation
entity
- must never be null
public Class<ID> getIdType()
EntityInformation
|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |