예제 #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();
 }