Beispiel #1
0
  @Override
  public void insertOrUpdate() {
    Base b = new Base();
    try {
      b.connect();
      b.procedureInit("Notification_insertOrUpdate", 6);
      b.setParamInt("_" + Notification.colID_Source, source.getID_Utilisateur());
      b.setParamInt("_" + Notification.colID_Dest, destinataire.getID_Utilisateur());
      b.setParamInt("_" + colID_Notif, ID_Notification);
      b.setParamBool("_" + colAccept, bAccept);
      b.setParamBool("_" + colVuSource, bVuSource);
      b.setParamBool("_" + colVuDest, bVuDest);
      ResultSet result = b.executeQuery();
      if (result.next()) {
        dtDemande = result.getDate(colDtNotif);
        ID_Notification = result.getInt(colID_Notif);
      }

    } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } finally {
      b.close();
    }
  }
Beispiel #2
0
 @Override
 public void delete() {
   Base b = new Base();
   try {
     b.connect();
     b.procedureInit("Notification_delete", 1);
     b.setParamInt(colID_Notif, ID_Notification);
     b.execute();
   } catch (SQLException e) {
     e.printStackTrace();
   } finally {
     b.close();
   }
 }