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