Spring Data Commons

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 setIdProperty(P property)
          Sets the id property for 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, getPersistentProperty, getPreferredConstructor, getType, getTypeInformation
 

Method Detail

setIdProperty

void setIdProperty(P property)
Sets the id property for the entity.

Parameters:
property -

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()
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.


Spring Data Commons

Copyright © 2011. All Rights Reserved.