| Home >> All >> org >> roller >> business >> [ persistence Javadoc ] |
Source code: org/roller/business/persistence/Query.java
1 /* 2 * Created on Oct 18, 2003 3 */ 4 package org.roller.business.persistence; 5 6 7 import org.roller.RollerException; 8 9 import java.util.List; 10 11 /** 12 * Generalized notion of a query, see QueryText for usage example. 13 * @author Dave Johnson 14 */ 15 public interface Query 16 { 17 public static final BooleanOperator AND = new BooleanOperator(" and "); 18 public static final BooleanOperator OR = new BooleanOperator(" or "); 19 public static final Operator EQ = new Operator(" = "); 20 public static final Operator LT = new Operator(" < "); 21 public static final Operator LE = new Operator(" <= "); 22 public static final Operator GT = new Operator(" > "); 23 public static final Operator GE = new Operator(" >= "); 24 public static final Operator NE = new Operator(" != "); 25 public static final Operator LIKE = new Operator(" like "); 26 public static final Operator NOT_NULL = new Operator(" not null "); 27 public static final Operator IS_NULL = new Operator(" null "); 28 public static final SortByOperator ASC = new SortByOperator(" asc "); 29 public static final SortByOperator DESC = new SortByOperator(" desc "); 30 31 public abstract List execute() throws RollerException; 32 33 public abstract void setWhere(Condition cond); 34 35 public abstract void setSortBy(SortByOperator operator, String string); 36 37 public abstract void setLimit(int limit); 38 }