- Enclosing class:
- CriteriaSerDe
private static class CriteriaSerDe.CriteriaBinding
extends Object
Handles the Criteria binding during the (de)serialization process. This
is done because the Criteria itself, maintains a slightly different
model. The conversion between the models was being performed in the
getter/setter of the rules. Different implementations of JAXB functioned
differently (calling the setter vs calling the getter and adding to it)
and at times would not work. Another approach would have been to convert
between the models using a JAXB adapter. Unfortunately, this would have
required updates to all of the clients of Criteria. Keeping the binding
simple and initializing the Criteria with it seemed most appropriate.