Esempio n. 1
0
 boolean evaluate(QConObject constraint, InternalCandidate candidate, Object obj) {
   if (obj != null) {
     if (obj instanceof ByteArrayBuffer) {
       obj = StringHandler.readString(candidate.transaction().context(), (ByteArrayBuffer) obj);
     }
     String candidateStringValue = obj.toString();
     String stringConstraint = constraint.getObject().toString();
     if (!caseSensitive) {
       candidateStringValue = candidateStringValue.toLowerCase();
       stringConstraint = stringConstraint.toLowerCase();
     }
     return compareStrings(candidateStringValue, stringConstraint);
   }
   return constraint.getObject() == null;
 }
Esempio n. 2
0
 boolean evaluate(InternalCandidate candidate) {
   if (!candidate.fieldIsAvailable()) {
     visitOnNull(candidate.getRoot());
   }
   return true;
 }