Example #1
0
 public void create(T t) throws SQLException {
   Connector.execute(getInsertDml(t));
 }
Example #2
0
 public List<T> where(String where) throws SQLException {
   ResultSet rs = Connector.execute(getWhereDml(where));
   return results(rs);
 }
Example #3
0
 public void delete(PK id) throws SQLException {
   Connector.execute(getDeleteDml(id));
 }
Example #4
0
 public void update(T t) throws SQLException {
   Connector.execute(getUpdateDml(t));
 }
Example #5
0
 public List<T> all() throws SQLException {
   return results(Connector.execute(getAllDml()));
 }
Example #6
0
 public T get(PK id) throws SQLException {
   ResultSet rs = Connector.execute(getSelectDml(id));
   List<T> results = results(rs);
   return results.size() > 0 ? results.get(0) : null;
 }