Match operation validator
The match operation validator validates the
parameter inputs to the match operation. To implement a validator, you
must create a class that extends abstract MatchOpValidator in the gw.rating.rtm.validation package. For an example validator, see RangeMatchOpMaxInclValidator class
in the gw.rating.rtm.validation
package.
NoOpValidator when creating the
MatchOperationFactory
for the new match operation. For an example, see ExactMatchOpFactory in the gw.rating.rtm.matchop package.A new match operation validator must implement the following methods.
Validate Method
This method signature is:
function validate(List<Comparable>) : boolean Returns true if all values are valid from
the point of view of this match operation. For example, an exact match
accepts any value, so it always returns true. See step 4
in Configure a new match operation.
A range match operation accepts a list
of two values where either value can be null or the first value is less
then the second value. Otherwise, return false.
Validate Pair Method
This method signature is:
function validatePair(List<Comparable>, List<Comparable>) : boolean Validates two sets of values
against each other and returns true
if both sets are valid with regards to each other.
This method is mainly used to identify overlaps and other value conflicts. For example, for the range match operation validator, this function checks if two numeric (or date) ranges have no overlap.
