|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MappingContext<E extends PersistentEntity<?,P>,P extends PersistentProperty<P>>
This interface defines the overall context including all known PersistentEntity instances and methods to obtain instances on demand. it is used internally to establish associations between entities and also at runtime to obtain entities by name.
Method Summary | |
---|---|
List<Validator> |
getEntityValidators(E entity)
Obtains a validator for the given entity TODO: Why do we need validators at the MappingContext ? |
Collection<E> |
getPersistentEntities()
Returns all PersistentEntity s held in the context. |
E |
getPersistentEntity(Class<?> type)
Returns a PersistentEntity for the given Class . |
E |
getPersistentEntity(P persistentProperty)
Returns the PersistentEntity mapped by the given PersistentProperty . |
E |
getPersistentEntity(TypeInformation<?> type)
Returns a PersistentEntity for the given TypeInformation . |
PersistentPropertyPath<P> |
getPersistentPropertyPath(PropertyPath propertyPath)
Returns all PersistentProperty s for the given path expression based on the given PropertyPath . |
Method Detail |
---|
Collection<E> getPersistentEntities()
PersistentEntity
s held in the context.
E getPersistentEntity(Class<?> type)
PersistentEntity
for the given Class
.
type
-
E getPersistentEntity(TypeInformation<?> type)
PersistentEntity
for the given TypeInformation
.
type
-
E getPersistentEntity(P persistentProperty)
PersistentEntity
mapped by the given PersistentProperty
.
persistentProperty
-
PersistentEntity
mapped by the given PersistentProperty
or null if no
PersistentEntity
exists for it or the PersistentProperty
does not refer to an entity.PersistentPropertyPath<P> getPersistentPropertyPath(PropertyPath propertyPath)
PersistentProperty
s for the given path expression based on the given PropertyPath
.
T
- type
- path
-
List<Validator> getEntityValidators(E entity)
MappingContext
?
entity
- The entity
|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |