org.drools.ide.common.client.modeldriven.brl
Class CompositeFieldConstraint

java.lang.Object
  extended by org.drools.ide.common.client.modeldriven.brl.CompositeFieldConstraint
All Implemented Interfaces:
Serializable, FieldConstraint, HasConstraints, PortableObject

public class CompositeFieldConstraint
extends Object
implements FieldConstraint, HasConstraints

This is a field constraint that may span multiple fields.

See Also:
Serialized Form

Field Summary
static String COMPOSITE_TYPE_AND
          Means that ALL of the children constraints must resolve to be true.
static String COMPOSITE_TYPE_OR
          Means that any of the children can resolve to be true.
 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)
           
 FieldConstraint getConstraint(int index)
           
 int getNumberOfConstraints()
           
 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 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 String COMPOSITE_TYPE_AND
Means that ALL of the children constraints must resolve to be true.

See Also:
Constant Field Values

compositeJunctionType

public 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)
Specified by:
addConstraint in interface HasConstraints

removeConstraint

public void removeConstraint(int idx)
Specified by:
removeConstraint in interface HasConstraints

getConstraint

public FieldConstraint getConstraint(int index)
Specified by:
getConstraint in interface HasConstraints

getNumberOfConstraints

public int getNumberOfConstraints()
Specified by:
getNumberOfConstraints in interface HasConstraints


Copyright © 2001-2011 JBoss by Red Hat. All Rights Reserved.