Facebook
From Gruff Cockroach, 3 Years ago, written in Java.
Embed
Download Paste or View Raw
Hits: 61
  1. public class DetailRowMapper implements RowMapper<Detail> {
  2.     public Detail mapRow(ResultSet rs, int rowNumber) throws SQLException{
  3.         return new Detail(rs.getInt("detailID"), rs.getInt("personID"), rs.getInt("houseID"));
  4.     }
  5. }
  6.  
  7.  
  8. import lombok.AllArgsConstructor;
  9. import lombok.Data;
  10. import lombok.NoArgsConstructor;
  11. @AllArgsConstructor
  12. @NoArgsConstructor
  13. @Data
  14. public class Detail {
  15.  
  16.     private int detailID;
  17.         private int personID;
  18.         private int houseID;
  19.    
  20.  
  21. }
  22.  
  23.  
  24. public interface DetailDao{
  25.  
  26.         int addDetail(int houseID, int personID);
  27.  
  28.         List<Occupants> findHouseOccupantsByID(int houseID);
  29.        
  30.         int deleteDetailByID(int personID);
  31.        
  32.         int MoveOccupantByID(int destinationID, int personID);
  33.