Interface FieldReference
-
public interface FieldReferenceField references go along with rule conditions and are the key source of knowledge for building the Rete memory graph. Each field reference consists of a
NamedTypeand the type's property/fieldTypeField. For example, the following condition.where("$a.id > $b.type")contains two field references: one is referring the
idproperty in a named type$a, and the other is related to the fieldtypein a named type$b.If condition is a string literal, the engine will consult with
ExpressionResolverProviderto determine the condition's field references. If you decide to use Java'sPredicateor the library'sValuesPredicateas a condition, then the corresponding field references must be explicitly specified like inLhsBuilder.where(ValuesPredicate, String...)or inLhsBuilder.where(ValuesPredicate, FieldReference...)If you decide to use functional interfaces instead of literal conditions, then using String arrays is the most convenient form of providing field references:
.where(predicate, "$a.id", "$b.type")In that case, the engine will consult with the rule's declared fact types and automatically resolve these two string references into a
FieldReferencearray.
-
-
Field Summary
Fields Modifier and Type Field Description static FieldReference[]ZERO_ARRAY
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TypeFieldfield()default booleansameAs(FieldReference other)static booleansameAs(FieldReference[] refs1, FieldReference[] refs2)NamedTypetype()
-
-
-
Field Detail
-
ZERO_ARRAY
static final FieldReference[] ZERO_ARRAY
-
-
Method Detail
-
sameAs
static boolean sameAs(FieldReference[] refs1, FieldReference[] refs2)
-
field
TypeField field()
-
type
NamedType type()
-
sameAs
default boolean sameAs(FieldReference other)
-
-