1 28 29 package com.caucho.amber; 30 31 import java.lang.reflect.InvocationTargetException ; 32 import java.lang.reflect.Method ; 33 import java.sql.ResultSet ; 34 import java.sql.SQLException ; 35 import java.util.List ; 36 import java.util.Map ; 37 38 41 public interface AmberQuery { 42 45 public void init(com.caucho.amber.manager.AmberConnection aConn); 46 47 50 public String getQueryString(); 51 52 55 public void setString(int index, String v); 56 57 60 public void setByte(int index, byte v); 61 62 65 public void setShort(int index, short v); 66 67 70 public void setInt(int index, int v); 71 72 75 public void setLong(int index, long v); 76 77 80 public void setDouble(int index, double v); 81 82 85 public void setFloat(int index, float v); 86 87 90 public void setTimestamp(int index, java.sql.Timestamp v); 91 92 95 public void setDate(int index, java.sql.Date v); 96 97 100 public void setObject(int index, Object v); 101 102 105 public void setNull(int index, int type); 106 107 110 public void setFirstResult(int index); 111 112 115 public void setMaxResults(int index); 116 117 120 public ResultSet executeQuery() 121 throws SQLException ; 122 123 126 public int executeUpdate() 127 throws SQLException ; 128 129 132 public void setCacheMaxAge(long ms); 133 134 137 public Object getSingleResult() 138 throws SQLException ; 139 140 143 public List <Object > list() 144 throws SQLException ; 145 146 149 public void list(List <Object > list) 150 throws SQLException ; 151 152 155 public void list(Map <Object , Object > map, 156 Method methodGetMapKey) 157 throws SQLException , 158 IllegalAccessException , 159 InvocationTargetException ; 160 161 164 public void setLoadOnQuery(boolean isLoad); 165 } 166 | Popular Tags |