Field 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 NamedType and the type's
property/field TypeField. For example, the following condition
.where("$a.id > $b.type")
contains two field references: one is referring the id property in a named type
$a, and the other is related to the field type in a named type $b.
If condition is a string literal, the engine will consult with ExpressionResolverProvider
to determine the condition's field references. If you decide to use Java's Predicate
or the library's ValuesPredicate as a condition, then the corresponding field references must be
explicitly specified like in LhsBuilder.where(ValuesPredicate, String...) or in
LhsBuilder.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 FieldReference array.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfield()default booleansameAs(FieldReference other) static booleansameAs(FieldReference[] refs1, FieldReference[] refs2) type()