1 10 package org.mmbase.storage.search.implementation; 11 12 import org.mmbase.storage.search.*; 13 14 21 22 public class BasicConstraint implements Constraint { 24 25 26 private boolean inverse = false; 27 28 29 protected BasicConstraint() {} 30 31 37 public BasicConstraint setInverse(boolean inverse) { 38 this.inverse = inverse; 39 return this; 40 } 41 42 public boolean isInverse() { 44 return inverse; 45 } 46 47 public int getBasicSupportLevel() { 49 return SearchQueryHandler.SUPPORT_OPTIMAL; 50 } 51 52 public boolean equals(Object obj) { 54 if (obj != null && obj.getClass() == getClass()) { 56 BasicConstraint constraint = (BasicConstraint) obj; 57 return inverse == constraint.isInverse(); 58 } else { 59 return false; 60 } 61 } 62 63 public int hashCode() { 65 return (inverse? 0: 107); 66 } 67 } 68 | Popular Tags |