|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MappingContext
This interface defines the overall context including all known PersistentEntity instances and methods to obtain instances on demand
This interface is used internally to establish associations between entities and also at runtime to obtain entities by name
The generic type parameters T & R are used to specify the mapped form of a class (example Table) and property (example Column) respectively.
Used instances of the Datastore
interface to
discover how to persist objects
Nested Class Summary | |
---|---|
static interface |
MappingContext.Listener
Implementors can register for events when the mapping context changes |
Method Summary | |
---|---|
void |
addEntityValidator(PersistentEntity entity,
org.springframework.validation.Validator validator)
Adds a validator to be used by the entity for validation |
void |
addMappingContextListener(MappingContext.Listener listener)
Adds a new mapping context listener instance |
PersistentEntity |
addPersistentEntity(Class javaClass)
Adds a PersistentEntity instance |
void |
addTypeConverter(org.springframework.core.convert.converter.Converter converter)
Add a converter used to convert property values to and from the datastore |
PersistentEntity |
getChildEntityByDiscriminator(PersistentEntity root,
String discriminator)
Obtains a child of the given root entity using the given discriminator |
org.springframework.core.convert.support.GenericConversionService |
getConversionService()
Obtains the ConversionService instance to use for type conversion |
org.springframework.validation.Validator |
getEntityValidator(PersistentEntity entity)
Obtains a validator for the given entity |
MappingFactory |
getMappingFactory()
Obtains the MappingFactory instance |
MappingConfigurationStrategy |
getMappingSyntaxStrategy()
Returns the syntax reader used to interpret the entity mapping syntax |
Collection<PersistentEntity> |
getPersistentEntities()
Obtains a list of PersistentEntity instances |
PersistentEntity |
getPersistentEntity(String name)
Obtains a PersistentEntity by name |
ProxyFactory |
getProxyFactory()
Factory used for creating proxies |
boolean |
isPersistentEntity(Class type)
Returns whether the specified class is a persistent entity |
boolean |
isPersistentEntity(Object value)
Returns whether the specified value is a persistent entity |
void |
setProxyFactory(ProxyFactory factory)
Factory to use for creating proxies |
Method Detail |
---|
Collection<PersistentEntity> getPersistentEntities()
PersistentEntity getPersistentEntity(String name)
name
- The name of the entity
PersistentEntity getChildEntityByDiscriminator(PersistentEntity root, String discriminator)
root
- The root entitydiscriminator
- The discriminator
PersistentEntity addPersistentEntity(Class javaClass)
javaClass
- The Java class representing the entity
void addEntityValidator(PersistentEntity entity, org.springframework.validation.Validator validator)
entity
- The PersistentEntityvalidator
- The validatorvoid addTypeConverter(org.springframework.core.convert.converter.Converter converter)
converter
- The converter to addorg.springframework.core.convert.support.GenericConversionService getConversionService()
org.springframework.validation.Validator getEntityValidator(PersistentEntity entity)
entity
- The entity
MappingConfigurationStrategy getMappingSyntaxStrategy()
MappingFactory getMappingFactory()
boolean isPersistentEntity(Class type)
type
- The type to check
boolean isPersistentEntity(Object value)
value
- The value to check
ProxyFactory getProxyFactory()
void setProxyFactory(ProxyFactory factory)
factory
- The proxy factoryvoid addMappingContextListener(MappingContext.Listener listener)
listener
- The listener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |