|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistentEntity<T,P extends PersistentProperty<P>>
Represents a persistent entity
Method Summary | |
---|---|
void |
doWithAssociations(AssociationHandler<P> handler)
Applies the given AssociationHandler to all Association contained in this PersistentEntity . |
void |
doWithProperties(PropertyHandler<P> handler)
Applies the given PropertyHandler to all PersistentProperty s contained in this
PersistentEntity . |
P |
getIdProperty()
Returns the id property of the PersistentEntity . |
String |
getName()
The entity name including any package prefix |
P |
getPersistentProperty(String name)
Obtains a PersistentProperty instance by name. |
PreferredConstructor<T> |
getPreferredConstructor()
Returns the PreferredConstructor to be used to instantiate objects of this PersistentEntity . |
Class<T> |
getType()
Returns the resolved Java type of this entity. |
Object |
getTypeAlias()
Returns the alias to be used when storing type information. |
TypeInformation<T> |
getTypeInformation()
Returns the TypeInformation backing this PersistentEntity . |
Method Detail |
---|
String getName()
PreferredConstructor<T> getPreferredConstructor()
PreferredConstructor
to be used to instantiate objects of this PersistentEntity
.
P getIdProperty()
PersistentEntity
. Must never return null as a
PersistentEntity
instance must not be created if there is no id property.
PersistentEntity
.P getPersistentProperty(String name)
name
- The name of the property
PersistentProperty
or null if it doesn't existClass<T> getType()
Object getTypeAlias()
TypeInformation<T> getTypeInformation()
TypeInformation
backing this PersistentEntity
.
void doWithProperties(PropertyHandler<P> handler)
PropertyHandler
to all PersistentProperty
s contained in this
PersistentEntity
.
handler
- must not be null.void doWithAssociations(AssociationHandler<P> handler)
AssociationHandler
to all Association
contained in this PersistentEntity
.
handler
- must not be null.
|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |