+
+ public static final Creator<Approval> v2_0_17 = new Creator<Approval>() {
+ @Override
+ public Approval create(Row row) {
+ return new Approval(row.getUUID(0), row.getUUID(1), row.getString(2),
+ row.getString(3),row.getString(4),row.getString(5),row.getString(6),row.getString(7),
+ row.getLong(8)/1000);
+ }
+
+ @Override
+ public String select() {
+ return "select id,ticket,approver,user,memo,operation,status,type,WRITETIME(status) from authz.approval";
+ }
+ };
+
+ public static final Visitor<Approval> FullLoad = new Visitor<Approval>() {
+ @Override
+ public void visit(Approval app) {
+ List<Approval> ln;
+ list.add(app);
+
+ String person = app.getApprover();
+ if (person!=null) {
+ ln = byApprover.get(person);
+ if (ln==null) {
+ ln = new ArrayList<>();
+ byApprover.put(app.getApprover(), ln);
+ }
+ ln.add(app);
+ }
+
+ person = app.getUser();
+ if (person!=null) {
+ ln = byUser.get(person);
+ if (ln==null) {
+ ln = new ArrayList<>();
+ byUser.put(app.getUser(), ln);
+ }
+ ln.add(app);
+ }
+ UUID ticket = app.getTicket();
+ if (ticket!=null) {
+ ln = byTicket.get(ticket);
+ if (ln==null) {
+ ln = new ArrayList<>();
+ byTicket.put(app.getTicket(), ln);
+ }
+ ln.add(app);
+ }
+ }
+ };
+
+ public Approval(UUID id, UUID ticket, String approver,// Date last_notified,