Interface GenericDAOImpl.DBStatementOperations<T>

Type Parameters:
T - Type of Entity
Enclosing class:
GenericDAOImpl<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface protected static interface GenericDAOImpl.DBStatementOperations<T>
Substitute Values in DB Queries through statement
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Example -
    int k = 1;
    pstmt.setString(k++, object.getName());
    pstmt.setLong(k, object.getId());
  • Method Details

    • substituteValuesInStatement

      void substituteValuesInStatement(PreparedStatement stmt, T entity) throws SQLException
      Example -
      int k = 1;
      pstmt.setString(k++, object.getName());
      pstmt.setLong(k, object.getId());

      Do not execute stmt or do any other DB operation!!!

      Throws:
      SQLException