コード例 #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();
 }