Spring Data Core

org.springframework.data.mapping.model
Interface MutablePersistentEntity<T,P extends PersistentProperty<P>>

All Superinterfaces:
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 PersistentEntitys.

Author:
Oliver Gierke

Method Summary
 void addAssociation(Association<P> association)
          Adds an Association to the entity.
 void addPersistentProperty(P property)
          Adds a PersistentProperty to the entity.
 void verify()
          Callback method to trigger validation of the PersistentEntity.
 
Methods inherited from interface org.springframework.data.mapping.PersistentEntity
doWithAssociations, doWithProperties, getIdProperty, getName, getPersistenceConstructor, getPersistentProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isConstructorArgument, isIdProperty, isVersionProperty
 

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

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.