public boolean Insert(PublisherDA aPublisherDA) { try { CallableStatement call = conn.prepareCall("{call spd_Publisher_Insert(?,?,?)}"); call.setString(1, aPublisherDA.getName()); call.setString(2, aPublisherDA.getAddress()); call.setString(3, aPublisherDA.getPhoneNumber()); if (call.executeUpdate() == 1) { return true; } else { return false; } } catch (SQLException ex) { Logger.getLogger(PublisherBO.class.getName()).log(Level.SEVERE, null, ex); return false; } }
public boolean Delete(PublisherDA aPublisherDA) { try { CallableStatement call = conn.prepareCall("{call spd_Publisher_Delete(?)}"); call.setInt(1, aPublisherDA.getIDPublisher()); if (call.executeUpdate() == 1) { return true; } else { return false; } } catch (SQLException ex) { Logger.getLogger(PublisherBO.class.getName()).log(Level.SEVERE, null, ex); return false; } }