Пример #1
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;
 }
Пример #2
0
 public AcGlobalAuditLog read(JwSqlResultSet rs) {
   AcGlobalAuditLog e;
   e = getAccess().newGlobalAuditLog();
   e.setId(rs.getInteger());
   e.setModifiedUtcTs(rs.getTimestamp());
   e.setUser(rs.getString());
   e.setType(rs.getInteger());
   e.setTypeName(rs.getString());
   e.setSubject1(rs.getString());
   e.setSubject2(rs.getString());
   e.setSubject3(rs.getString());
   e.setOldValue(rs.getString());
   e.setNewValue(rs.getString());
   return e;
 }
Пример #3
0
 public void generateIds(JwList<AcGlobalAuditLog> v) {
   Integer i = getNextId();
   for (AcGlobalAuditLog e : v) e.setId(i++);
 }
Пример #4
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);
 }
Пример #5
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;
  }