Interface MutablePersistentEntity<T, P extends PersistentProperty<P>>
- All Superinterfaces:
Aware, EnvironmentAware, Iterable<P>, PersistentEntity<T,P>
- All Known Implementing Classes:
BasicPersistentEntity
public interface MutablePersistentEntity<T, P extends PersistentProperty<P>>
extends PersistentEntity<T,P>, EnvironmentAware
Interface capturing mutator methods for
PersistentEntitys.- Author:
- Oliver Gierke, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssociation(Association<P> association) Adds anAssociationto the entity.voidaddPersistentProperty(P property) Adds aPersistentPropertyto the entity.voidSets theEvaluationContextProviderto be used by the entity.voidSets thePersistentPropertyAccessorFactoryfor the entity.voidverify()Callback method to trigger validation of thePersistentEntity.Methods inherited from interface EnvironmentAware
setEnvironmentMethods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface PersistentEntity
doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation
-
Method Details
-
addPersistentProperty
Adds aPersistentPropertyto the entity.- Parameters:
property-
-
addAssociation
Adds anAssociationto the entity.- Parameters:
association-
-
verify
Callback method to trigger validation of thePersistentEntity. AsMutablePersistentEntityis not immutable there might be some verification steps necessary after the object has reached is final state.- Throws:
MappingException- in case the entity is invalid
-
setPersistentPropertyAccessorFactory
Sets thePersistentPropertyAccessorFactoryfor the entity. APersistentPropertyAccessorFactorycreatesPersistentPropertyAccessors for instances of this entity.- Parameters:
factory- must not be null.
-
setEvaluationContextProvider
Sets theEvaluationContextProviderto be used by the entity.- Parameters:
provider- must not be null.
-