public void delete(NotificationData notificationData) {

    // 开启事务
    db.beginTransaction();
    try {
      db.delete("stutb", "AlarmId=?", new String[] {notificationData.getAlarmId()}); // 删除所有名字中带有丰的人
      db.setTransactionSuccessful();
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      db.endTransaction();
    }
  }
 public void update(NotificationData notificationData) {
   // 开启事务
   db.beginTransaction();
   try {
     ContentValues values = new ContentValues();
     values.put("isread", notificationData.getIsead());
     db.update(
         "stutb",
         values,
         "AlarmId=?",
         new String[] {notificationData.getAlarmId()}); // 将全部id>3的人的性别改成女
     db.setTransactionSuccessful();
   } catch (Exception e) {
     e.printStackTrace();
   } finally {
     db.endTransaction();
   }
 }
 public void insert(NotificationData notificationData) {
   // 开启事务
   db.beginTransaction();
   try {
     ContentValues values = new ContentValues();
     values.put("AlarmId", notificationData.getAlarmId());
     values.put("UserName", notificationData.getUserName());
     values.put("AlarmType", String.valueOf(notificationData.getAlarmType()));
     values.put("PriorityLevel", String.valueOf(notificationData.getPriorityLevel()));
     values.put("Area", notificationData.getArea());
     values.put("CreateTime", notificationData.getCreateTime());
     values.put("isRead", notificationData.getIsead());
     db.insert("stutb", null, values);
     db.setTransactionSuccessful();
   } catch (Exception e) {
     e.printStackTrace();
   } finally {
     db.endTransaction();
   }
 }