Example #1
0
  @NotNull
  private BeanChange createInsert(long startId) {
    Map<String, ValuePair> values = new LinkedHashMap<>();
    values.put("name", new ValuePair("rob", null));
    values.put("modified", new ValuePair(new Timestamp(System.currentTimeMillis()), null));

    BeanChange bean = new BeanChange("mytable", startId + 1, ChangeType.INSERT, null);
    bean.setValues(values);
    return bean;
  }
Example #2
0
  @NotNull
  private BeanChange createUpdate(long startId) {
    Map<String, ValuePair> values = new LinkedHashMap<>();
    values.put("name", new ValuePair("jim", "steve"));
    values.put("nowHasVal", new ValuePair("wasNull", null));
    values.put("nowNull", new ValuePair(null, "hadVal"));

    values.put("modified", new ValuePair(new Timestamp(System.currentTimeMillis()), null));

    BeanChange bean = new BeanChange("mytable", startId + 2, ChangeType.UPDATE, null);
    bean.setValues(values);
    return bean;
  }