|
Spring Data Commmons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.data.repository.support.ReflectiveEntityInformationSupport
public class ReflectiveEntityInformationSupport
IsNewAware
and IdAware
implementation that reflectively
checks a Field
or Method
annotated with the given
annotations. Subclasses usually simply have to provide the persistence
technology specific annotations.
Constructor Summary | |
---|---|
ReflectiveEntityInformationSupport(Class<?> domainClass,
Class<? extends Annotation>... annotationsToScanFor)
Creates a new ReflectiveEntityInformationSupport by inspecting
the given class for a Field or Method for and Id
annotation. |
Method Summary | |
---|---|
Object |
getId(Object entity)
Returns the id of the given entity. |
boolean |
isNew(Object entity)
Returns whether the given entity is considered to be new. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectiveEntityInformationSupport(Class<?> domainClass, Class<? extends Annotation>... annotationsToScanFor)
ReflectiveEntityInformationSupport
by inspecting
the given class for a Field
or Method
for and Id
annotation.
domainClass
- not null, must be annotated with
Entity
and carry an anootation defining the id
property.Method Detail |
---|
public boolean isNew(Object entity)
IsNewAware
isNew
in interface IsNewAware
public Object getId(Object entity)
IdAware
getId
in interface IdAware
|
Spring Data Commmons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |