1 21 package com.db4o; 22 23 import com.db4o.types.Unversioned; 24 25 30 public class QE implements Unversioned { 31 32 static final QE DEFAULT = new QE(); 33 34 public static final int NULLS = 0; 35 public static final int SMALLER = 1; 36 public static final int EQUAL = 2; 37 public static final int GREATER = 3; 38 39 QE add(QE evaluator){ 40 return evaluator; 41 } 42 43 public boolean identity(){ 44 return false; 45 } 46 47 boolean isDefault(){ 48 return true; 49 } 50 51 boolean evaluate(QConObject a_constraint, QCandidate a_candidate, Object a_value){ 52 if(a_value == null){ 53 return a_constraint.getComparator(a_candidate) instanceof Null; 54 } 55 return a_constraint.getComparator(a_candidate).isEqual(a_value); 56 } 57 58 public boolean equals(Object obj){ 59 return obj.getClass() == this.getClass(); 60 } 61 62 boolean not(boolean res){ 64 return res; 65 } 66 67 78 public void indexBitMap(boolean[] bits){ 79 bits[QE.EQUAL] = true; 80 } 81 82 public boolean supportsIndex(){ 83 return true; 84 } 85 86 } 87 | Popular Tags |