예제 #1
0
  public JwSqlInsert _checkAndComposeInsert(JwList<AcGlobalAuditLog> v, boolean insertIds) {
    for (AcGlobalAuditLog e : v) {
      defaultUpdateCount(e);
      e.validate();
      verifyNoMatching(e);
    }

    JwSqlInsert st = createInsert();
    st.setTable(TABLE);
    populateInsertColumns(st, insertIds);

    for (AcGlobalAuditLog e : v) {
      st.startNewRow();
      if (insertIds) st.addIntegerValue(e.getId());
      st.addTimestampValue(e.getModifiedUtcTs());
      st.addStringValue(e.getUser());
      st.addIntegerValue(e.getType());
      st.addStringValue(e.getTypeName());
      st.addStringValue(e.getSubject1());
      st.addStringValue(e.getSubject2());
      st.addStringValue(e.getSubject3());
      st.addStringValue(e.getOldValue());
      st.addStringValue(e.getNewValue());
    }
    return st;
  }
예제 #2
0
 public JwSqlUpdate composeUpdate(AcGlobalAuditLog e) {
   JwSqlUpdate st = createUpdate();
   st.setTable(TABLE);
   st.setValue(MODIFIED_UTC_TS, e.getModifiedUtcTs());
   st.setValue(USER, e.getUser());
   st.setValue(TYPE, e.getType());
   st.setValue(TYPE_NAME, e.getTypeName());
   st.setValue(SUBJECT_1, e.getSubject1());
   st.setValue(SUBJECT_2, e.getSubject2());
   st.setValue(SUBJECT_3, e.getSubject3());
   st.setValue(OLD_VALUE, e.getOldValue());
   st.setValue(NEW_VALUE, e.getNewValue());
   st.where().isEqual(ID, e.getId());
   return st;
 }