1 28 29 package com.caucho.amber.query; 30 31 import java.sql.ResultSet; 32 import java.sql.SQLException; 33 34 import com.caucho.util.CharBuffer; 35 36 import com.caucho.amber.type.Type; 37 38 import com.caucho.amber.entity.EntityItem; 39 40 import com.caucho.amber.connection.AmberConnectionImpl; 41 42 45 public interface AmberExpr { 46 public final static int USES_DATA = 0; 47 public final static int IS_INNER_JOIN = 1; 48 49 52 boolean isBoolean(); 53 54 57 Type getType(); 58 59 62 AmberExpr bindSelect(QueryParser parser); 63 64 67 boolean usesFrom(FromItem from, int type); 68 69 72 boolean usesFrom(FromItem from, int type, boolean isNot); 73 74 77 AmberExpr replaceJoin(JoinExpr join); 78 79 82 void generateWhere(CharBuffer cb); 83 84 87 void generateJoin(CharBuffer cb); 88 89 92 void generateSelect(CharBuffer cb); 93 94 97 public AmberExpr createBoolean() 98 throws QueryParseException; 99 100 103 public Object getObject(AmberConnectionImpl aConn, ResultSet rs, int index) 104 throws SQLException; 105 106 109 public Object getCacheObject(AmberConnectionImpl aConn, 110 ResultSet rs, int index) 111 throws SQLException; 112 113 116 public EntityItem findItem(AmberConnectionImpl aConn, 117 ResultSet rs, int index) 118 throws SQLException; 119 } 120 | Popular Tags |