org.compass.core.mapping
Interface CascadeMapping

All Known Implementing Classes:
AbstractRefAliasMapping, ComponentMapping, IdComponentMapping, ParentMapping, PlainCascadeMapping, ReferenceMapping

public interface CascadeMapping

Cascade mappings responsible for getting objects for cascading operations as well as marking which operations are allowed to be cascaded.

Author:
kimchy

Nested Class Summary
static class CascadeMapping.Cascade
          A cascade enumeration of operations allowed for cascading.
 
Method Summary
 CascadeMapping.Cascade[] getCascades()
           
 Object getCascadeValue(Object root)
          Returns the value that should be cascaded basde on the root object.
 void setCascades(CascadeMapping.Cascade[] cascades)
           
 boolean shouldCascade(CascadeMapping.Cascade cascade)
          Returns true if cascading should be performed for the cascade parameter.
 boolean shouldCascadeCreate()
          Returns true if cascading should be performed for create operations.
 boolean shouldCascadeDelete()
          Returns true if cascading should be performed for delete operations.
 boolean shouldCascadeSave()
          Returns true if cascading should be performed for save operations.
 

Method Detail

getCascadeValue

Object getCascadeValue(Object root)
                       throws CompassException
Returns the value that should be cascaded basde on the root object.

Parameters:
root - The root object to extract the cascaded value from
Returns:
The cascaded value to cascade
Throws:
CompassException

setCascades

void setCascades(CascadeMapping.Cascade[] cascades)

getCascades

CascadeMapping.Cascade[] getCascades()

shouldCascadeDelete

boolean shouldCascadeDelete()
Returns true if cascading should be performed for delete operations.


shouldCascadeCreate

boolean shouldCascadeCreate()
Returns true if cascading should be performed for create operations.


shouldCascadeSave

boolean shouldCascadeSave()
Returns true if cascading should be performed for save operations.


shouldCascade

boolean shouldCascade(CascadeMapping.Cascade cascade)
Returns true if cascading should be performed for the cascade parameter.



Copyright (c) 2004-2008 The Compass Project.