org.drools.brms.client.modeldriven.brl
Class CompositeFieldConstraint

java.lang.Object
  extended by org.drools.brms.client.modeldriven.brl.CompositeFieldConstraint
All Implemented Interfaces:
FieldConstraint, PortableObject

public class CompositeFieldConstraint
extends java.lang.Object
implements FieldConstraint

This is a field constraint that may span multiple fields.

Author:
Michael Neale

Field Summary
static java.lang.String COMPOSITE_TYPE_AND
          Means that ALL of the children constraints must resolve to be true.
static java.lang.String COMPOSITE_TYPE_OR
          Means that any of the children can resolve to be true.
 java.lang.String compositeJunctionType
          The type of composite that it is.
 FieldConstraint[] constraints
          This is the child field constraints of the composite.
 
Constructor Summary
CompositeFieldConstraint()
           
 
Method Summary
 void addConstraint(FieldConstraint constraint)
           
 void removeConstraint(int idx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPOSITE_TYPE_OR

public static final java.lang.String COMPOSITE_TYPE_OR
Means that any of the children can resolve to be true.

See Also:
Constant Field Values

COMPOSITE_TYPE_AND

public static final java.lang.String COMPOSITE_TYPE_AND
Means that ALL of the children constraints must resolve to be true.

See Also:
Constant Field Values

compositeJunctionType

public java.lang.String compositeJunctionType
The type of composite that it is.


constraints

public FieldConstraint[] constraints
This is the child field constraints of the composite. They may be single constraints, or composite themselves. If this composite is it at the "top level" - then there is no need to look at the compositeType property (as they are all children that are "anded" together anyway in the fact pattern that contains it).

Constructor Detail

CompositeFieldConstraint

public CompositeFieldConstraint()
Method Detail

addConstraint

public void addConstraint(FieldConstraint constraint)

removeConstraint

public void removeConstraint(int idx)