Exemplo n.º 1
0
 public void create(T t) throws SQLException {
   Connector.execute(getInsertDml(t));
 }
Exemplo n.º 2
0
 public List<T> where(String where) throws SQLException {
   ResultSet rs = Connector.execute(getWhereDml(where));
   return results(rs);
 }
Exemplo n.º 3
0
 public void delete(PK id) throws SQLException {
   Connector.execute(getDeleteDml(id));
 }
Exemplo n.º 4
0
 public void update(T t) throws SQLException {
   Connector.execute(getUpdateDml(t));
 }
Exemplo n.º 5
0
 public List<T> all() throws SQLException {
   return results(Connector.execute(getAllDml()));
 }
Exemplo n.º 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;
 }