org.springframework.data.mapping.model

## Interface MutablePersistentEntity<T,P extends PersistentProperty<P>>

All Superinterfaces:
  Iterable<P>, PersistentEntity<T,P>

All Known Implementing Classes:
  BasicPersistentEntity

    public interface MutablePersistentEntity<T,P extends PersistentProperty<P>>
    extends PersistentEntity<T,P>

Interface capturing mutator methods for `PersistentEntity`s.

Author:
  Oliver Gierke, Mark Paluch

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `addAssociation(Association<P> association)` Adds an `Association` to the entity.
`void` `addPersistentProperty(P property)` Adds a `PersistentProperty` to the entity.
`void` `setEvaluationContextProvider(EvaluationContextProvider provider)` Sets the `EvaluationContextProvider` to be used by the entity.
`void` `setPersistentPropertyAccessorFactory(PersistentPropertyAccessorFactory factory)` Sets the `PersistentPropertyAccessorFactory` for the entity.
`void` `verify()` Callback method to trigger validation of the `PersistentEntity`.

### Methods inherited from interface org.springframework.data.mapping.PersistentEntity

`doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation`

### Methods inherited from interface java.lang.Iterable

`forEach, iterator, spliterator`

### Method Detail

#### addPersistentProperty

    void addPersistentProperty(P property)

Adds a `PersistentProperty` to the entity.

Parameters:
  `property` -

#### addAssociation

    void addAssociation(Association<P> association)

Adds an `Association` to the entity.

Parameters:
  `association` -

#### verify

    void verify()
         throws MappingException

Callback method to trigger validation of the `PersistentEntity`. As `MutablePersistentEntity` is 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

    void setPersistentPropertyAccessorFactory(PersistentPropertyAccessorFactory factory)

Sets the `PersistentPropertyAccessorFactory` for the entity. A `PersistentPropertyAccessorFactory` creates `PersistentPropertyAccessor`s for instances of this entity.

Parameters:
  `factory` - must not be null.

#### setEvaluationContextProvider

    void setEvaluationContextProvider(EvaluationContextProvider provider)

Sets the `EvaluationContextProvider` to be used by the entity.

Parameters:
  `provider` - must not be null.