Previous detailUpNext detail
Detail 6.1.3Detail 6.1Detail 6.1.5

Detail 6.1.4: Whole field predicates

Differences

A difference predicate uses match predicates to determine when two (non-null) field values are neither exactly nor approximately the same. In essence:

  A difference predicates == !(a group of match predicates)

A difference predicate is constructed by specifying the match predicates that will be used to test for exact or approximate matches. If these don't fire, and if the field values are not null, then a difference predicate returns true.

Basic construction:

  final Method m = Cdc1Record.class.getMethod("getLastName", (Class<?>[])null);
  Predicate<Cdc1Record>[] matchPredicates = new Predicate<Cdc1Record>[5] {
      new ExactMatchPredicate<EXPORT_TYPE_JAVA, Cdc1Record>("A", m, null),
      new NysiisPredicate<Cdc1Record>("B", m),
      new SoundexPredicate<Cdc1Record>("C", m),
      new EditDistancePredicate<Cdc1Record>("D", m, 3),
      new JaroWinklerPredicate<Cdc1Record>("E", m)
  }
  String name = "someDifferencePredicateName";
  Predicate<Cdc1Record> p =
      new DifferencePredicate<EXPORT_TYPE_JAVA, Cdc1Record>(name, matchPredicates);

Field swaps

Nicknames and synonyms

Placeholders

Value frequencies


Previous detailUpNext detail
Detail 6.1.3Detail 6.1Detail 6.1.5