|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.mapping.AbstractMappingContext<E,P>
public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>
Base class to build mapping metadata and thus create instances of PersistentEntity and PersistentProperty.
| Constructor Summary | |
|---|---|
AbstractMappingContext()
|
|
| Method Summary | ||
|---|---|---|
protected E |
addPersistentEntity(Class<?> type)
Adds the given type to the MappingContext. |
|
protected E |
addPersistentEntity(TypeInformation<?> typeInformation)
Adds the given TypeInformation to the MappingContext. |
|
void |
afterPropertiesSet()
|
|
protected abstract
|
createPersistentEntity(TypeInformation<T> typeInformation)
|
|
protected abstract P |
createPersistentProperty(Field field,
PropertyDescriptor descriptor,
E owner)
|
|
List<Validator> |
getEntityValidators(E entity)
Obtains a validator for the given entity TODO: Why do we need validators at the MappingContext? |
|
Collection<E> |
getPersistentEntities()
Obtains a list of PersistentEntity instances |
|
E |
getPersistentEntity(Class<?> type)
|
|
E |
getPersistentEntity(TypeInformation<?> type)
|
|
void |
setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
|
|
void |
setCustomSimpleTypes(List<Class<?>> customSimpleTypes)
|
|
void |
setInitialEntitySet(Set<? extends Class<?>> initialEntitySet)
Sets the Set of types to populate the context initially. |
|
void |
setStrict(boolean strict)
Configures whether the MappingContext is in strict mode which means, that it will throw
MappingExceptions in case one tries to lookup a PersistentEntity not already in the context. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractMappingContext()
| Method Detail |
|---|
public void setCustomSimpleTypes(List<Class<?>> customSimpleTypes)
customSimpleTypes - the customSimpleTypes to setpublic void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface ApplicationEventPublisherAwarepublic void setInitialEntitySet(Set<? extends Class<?>> initialEntitySet)
Set of types to populate the context initially.
initialEntitySet - public void setStrict(boolean strict)
MappingContext is in strict mode which means, that it will throw
MappingExceptions in case one tries to lookup a PersistentEntity not already in the context. This
defaults to false so that unknown types will be transparently added to the MappingContext if not known
in advance.
strict - public Collection<E> getPersistentEntities()
MappingContext
getPersistentEntities in interface MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>public E getPersistentEntity(Class<?> type)
getPersistentEntity in interface MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>public E getPersistentEntity(TypeInformation<?> type)
getPersistentEntity in interface MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>protected E addPersistentEntity(Class<?> type)
MappingContext.
type -
protected E addPersistentEntity(TypeInformation<?> typeInformation)
TypeInformation to the MappingContext.
typeInformation -
public List<Validator> getEntityValidators(E entity)
MappingContextMappingContext?
getEntityValidators in interface MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>entity - The entity
protected abstract <T> E createPersistentEntity(TypeInformation<T> typeInformation)
protected abstract P createPersistentProperty(Field field,
PropertyDescriptor descriptor,
E owner)
public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBean
|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||