01: package org.drools.brms.client.modeldriven.brl;
02:
03: /**
04: * Represents a constraint, which may be part of a direct field constraint or a connective.
05: * @author Michael Neale
06: *
07: */
08: public class ISingleFieldConstraint implements PortableObject {
09:
10: /**
11: * This is used only when constraint is first created.
12: * This means that there is no value yet for the constraint.
13: */
14: public static final int TYPE_UNDEFINED = 0;
15:
16: /**
17: * This may be string, or number, anything really.
18: */
19: public static final int TYPE_LITERAL = 1;
20:
21: /**
22: * This is when it is set to a valid previously bound variable.
23: */
24: public static final int TYPE_VARIABLE = 2;
25:
26: /**
27: * This is for a "formula" that calculates a value.
28: */
29: public static final int TYPE_RET_VALUE = 3;
30:
31: /**
32: * This is not used yet. ENUMs are not suitable for business rules
33: * until we can get data driven non code enums.
34: */
35: public static final int TYPE_ENUM = 4;
36:
37: /**
38: * The fieldName and fieldBinding is not used in the case of a predicate.
39: */
40: public static final int TYPE_PREDICATE = 5;
41:
42: public String value;
43: public int constraintValueType;
44:
45: }
|