org.compass.core.mapping.osem.builder
Class SearchableCascadeMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.osem.builder.SearchableCascadeMappingBuilder

public class SearchableCascadeMappingBuilder
extends Object

Allows to define cascading annotation which will result in certain operations done on the object that holds the property to be cascaded to its referenced objects.

Note, this is used when there are not component/reference mappings for the specified field/property but still, cascading should still be performed.

Author:
kimchy
See Also:
OSEM.cascade(String), SearchableMappingBuilder.add(SearchableCascadeMappingBuilder)

Field Summary
(package private)  PlainCascadeMapping mapping
           
 
Constructor Summary
SearchableCascadeMappingBuilder(String name)
          Constrcuts a new cascade mapping builder for the specified class property.
 
Method Summary
 SearchableCascadeMappingBuilder accessor(Accessor accessor)
          Sets the acessor the will be used for the class property.
 SearchableCascadeMappingBuilder accessor(String accessor)
          Sets the acessor the will be used for the class property.
 SearchableCascadeMappingBuilder cascade(Cascade... cascade)
          The operations that will cascade to the target association.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final PlainCascadeMapping mapping
Constructor Detail

SearchableCascadeMappingBuilder

public SearchableCascadeMappingBuilder(String name)
Constrcuts a new cascade mapping builder for the specified class property.

Method Detail

accessor

public SearchableCascadeMappingBuilder accessor(Accessor accessor)
Sets the acessor the will be used for the class property. Defaults to property (getter and optionally setter).


accessor

public SearchableCascadeMappingBuilder accessor(String accessor)
Sets the acessor the will be used for the class property. Defaults to property (getter and optionally setter). Note, this is the lookup name of a PropertyAccessor registered with Compass, with two default ones (custom ones can be easily added) named field and property.


cascade

public SearchableCascadeMappingBuilder cascade(Cascade... cascade)
The operations that will cascade to the target association. Defaults all operations being cascaded.



Copyright (c) 2004-2009 The Compass Project.