Пример #1
0
 private void finish(List<Long> newIds, Entity e) {
   adapter.store(e); // store sets the id for the entity if it is new.
   newIds.add(e.getId());
 }
Пример #2
0
 private Entity getEntity(Long id) {
   Entity e = adapter.getById(id);
   if (e == null) e = adapter.create();
   return e;
 }