Пример #1
0
 private Object[] fetchAllRecords() {
   Object[] records =
       storage.findAll(
           new ObjectFilter() {
             public boolean matches(Object object) {
               return true;
             }
           },
           descriptor);
   return records;
 }
Пример #2
0
 private void removeFromRepository(Event event) {
   Element objectId = Element.of(event.source().id());
   if (storage.contains(objectId)) {
     storage.remove(objectId);
   }
 }
Пример #3
0
 private void insertIntoRepository(CollectedEvent event) {
   Object collectedStuffObject =
       descriptor.describe(event.source().id(), event.description(), event.timeStamp());
   storage.save(collectedStuffObject, descriptor, descriptor);
 }
Пример #4
0
 public long generateStuffId() {
   return storage.nextSequenceNumber();
 }