예제 #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 void update(AcGlobalAuditLog e) {
   e.validate();
   JwSqlUpdate st = composeUpdate(e);
   int i = execute(st);
   if (i != 1) error("Unable to update AcGlobalAuditLog.  Rows updated: %s.", i);
 }