private void doUpdate(long id, DatastoreTransaction tx, E entity) { E old = newEntity(), old2 = newEntity(), post = newEntity(); get_(id, old, old2); doTriggers(beforeUpdate, TriggerAction.BEFORE_UPDATE, id, old, entity); for (int i = 0; i < tmpIndices.length && tmpIndices[i] != null; i++) { tmpIndices[i] = null; } for (PropertyInfo pr : props) { Object val = pr.get(entity); setCell(tx, id, pr, val, tmpIndices); } doTriggers(afterUpdate, TriggerAction.AFTER_UPDATE, id, old, entity); get_(id, post); // old might be changed by triggers, so use old2 as protection doComplexIndices(tmpIndices, old2, post, id); }
private void doUpdate(long id, DatastoreTransaction tx, E entity) { E old = newEntity(), old2 = newEntity(), post = newEntity(); get_(id, old, old2); doTriggers(beforeUpdate, TriggerAction.BEFORE_UPDATE, id, old, entity); for (int i = 0; i < tmpIndices.length && tmpIndices[i] != null; i++) { tmpIndices[i] = null; } for (PropertyInfo pr : props) { Object val = pr.get(entity); setCell(tx, id, pr, val, tmpIndices); } doTriggers(afterUpdate, TriggerAction.AFTER_UPDATE, id, old, entity); get_(id, post); // old might be changed by triggers, so use old2 as protection doComplexIndices(tmpIndices, old2, post, id); }
private void doUpdate(long id, DatastoreTransaction tx, E entity) { E old = newEntity(), old2 = newEntity(), post = newEntity(); get_(id, old, old2); doTriggers(beforeUpdate, TriggerAction.BEFORE_UPDATE, id, old, entity); for (int i = 0; i < tmpIndices.length && tmpIndices[i] != null; i++) { tmpIndices[i] = null; } for (PropertyInfo pr : props) { Object val = pr.get(entity); setCell(tx, id, pr, val, tmpIndices); } doTriggers(afterUpdate, TriggerAction.AFTER_UPDATE, id, old, entity); get_(id, post); // old might be changed by triggers, so use old2 as protection doComplexIndices(tmpIndices, old2, post, id); }