Interface GenericDAOImpl.SetGeneratedValuesToEntity<T>

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.SetGeneratedValuesToEntity<T>
Receive getGeneratedKeys from preparedStatement
and update current entity for which them was generated.
It`s important for save object integrity
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    set(ResultSet rs, T entity)
    Example -
    if(rs.next()){
    entity.setId( rs.getInt(1) );
    }
  • Method Details

    • set

      void set(ResultSet rs, T entity) throws SQLException
      Example -
      if(rs.next()){
      entity.setId( rs.getInt(1) );
      }

      Only for operation of receiving data and update input entity!

      Throws:
      SQLException