|
Spring Data Core | |||||||||
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. |
PreferredConstructor<T,P> |
getPersistenceConstructor()
Returns the PreferredConstructor to be used to instantiate objects of this PersistentEntity . |
P |
getPersistentProperty(String name)
Obtains a PersistentProperty instance by name. |
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 . |
P |
getVersionProperty()
Returns the version property of the PersistentEntity . |
boolean |
hasIdProperty()
Returns whether the PersistentEntity has an id property. |
boolean |
hasVersionProperty()
Returns whether the PersistentEntity has a version property. |
boolean |
isConstructorArgument(PersistentProperty<?> property)
Returns whether the given PersistentProperty is referred to by a constructor argument of the
PersistentEntity . |
boolean |
isIdProperty(PersistentProperty<?> property)
Returns whether the given PersistentProperty is the id property of the entity. |
boolean |
isVersionProperty(PersistentProperty<?> property)
Returns whether the given PersistentProperty is the version property of the entity. |
Method Detail |
---|
String getName()
PreferredConstructor<T,P> getPersistenceConstructor()
PreferredConstructor
to be used to instantiate objects of this PersistentEntity
.
EntityInstantiator
or handled by custom conversion mechanisms entirely.boolean isConstructorArgument(PersistentProperty<?> property)
PersistentProperty
is referred to by a constructor argument of the
PersistentEntity
.
property
-
PersistentProperty
is referred to by a constructor argument or false
if not or null.boolean isIdProperty(PersistentProperty<?> property)
PersistentProperty
is the id property of the entity.
property
-
boolean isVersionProperty(PersistentProperty<?> property)
PersistentProperty
is the version property of the entity.
property
-
P getIdProperty()
PersistentEntity
. Can be null in case this is an entity
completely handled by a custom conversion.
PersistentEntity
.P getVersionProperty()
PersistentEntity
. Can be null in case no version property is
available on the entity.
PersistentEntity
.P getPersistentProperty(String name)
PersistentProperty
instance by name.
name
- The name of the property
PersistentProperty
or null if it doesn't exist.boolean hasIdProperty()
PersistentEntity
has an id property. If this call returns true,
getIdProperty()
will return a non-null value.
boolean hasVersionProperty()
PersistentEntity
has a version property. If this call returns true,
getVersionProperty()
will return a non-null value.
Class<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 Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |