public List selectActiveFromVolunteerId(String volunteerId) { String sql = "select active.activeId,volunteerActive.volunteerId,activeTitle,activeHours,activeDate,confirmPeople,volunteerActive.activeContent,volunteerActive.evaluation from active inner join volunteerActive on active.activeId=volunteerActive.activeId where volunteerId=" + volunteerId; DbManager db = new DbManager(); return db.select(sql, null, new VolunteerActiveRowMapper()); }
public boolean delete(Object[] obj) { // TODO Auto-generated method stub System.out.println(obj[0] + " " + obj[1]); String sql = "delete from volunteerActive where activeId=? and volunteerId=? "; DbManager db = new DbManager(); return db.execute(sql, obj); }
public boolean add(Object[] obj) { // TODO Auto-generated method stub String sql = "insert into volunteerActive" + " (activeId,volunteerId," + "activeDate,activeContent,activeHours,confirmPeople,evaluation) " + "values (?,?,?,?,?,?,?) "; DbManager db = new DbManager(); return db.execute(sql, obj); }
public boolean update(Object[] obj) { // TODO Auto-generated method stub // "update active set activeTitle=?,activeContent=?,activePublisher=? where activeId=?"; // String sql = "update volunteerActive set // activeDate='?',activeContent='?',activeHours=?,confirmPeople='?' where activeId=? and // volunteerId=?" ; String sql = "update volunteerActive set activeDate=?,activeContent=?,activeHours=?,confirmPeople=?,evaluation=? where activeId=? and volunteerId=?"; DbManager db = new DbManager(); return db.execute(sql, obj); }