org.qi4j.library.eventsourcing.domain.source.helper
Class Events

java.lang.Object
  extended by org.qi4j.library.eventsourcing.domain.source.helper.Events

public class Events
extends Object

Helper methods for working with Iterables of DomainEvents and UnitOfWorkDomainEventsValue.


Constructor Summary
Events()
           
 
Method Summary
static UnitOfWorkEventsVisitor adapter(EventVisitor eventVisitor)
           
static Specification<UnitOfWorkDomainEventsValue> afterDate(Date afterDate)
           
static Specification<UnitOfWorkDomainEventsValue> beforeDate(Date afterDate)
           
static Specification<UnitOfWorkDomainEventsValue> byUser(String... by)
           
static Iterable<DomainEventValue> events(Iterable<UnitOfWorkDomainEventsValue> transactions)
           
static Iterable<DomainEventValue> events(UnitOfWorkDomainEventsValue... unitOfWorkDomainValues)
           
static boolean matches(Specification<DomainEventValue> specification, Iterable<UnitOfWorkDomainEventsValue> transactions)
           
static Specification<DomainEventValue> onEntities(String... entities)
           
static Specification<DomainEventValue> onEntityTypes(String... entityTypes)
           
static Specification<DomainEventValue> paramIs(String name, String value)
           
static EventVisitor playEvents(DomainEventPlayer player, Object eventHandler, UnitOfWorkFactory uowf, Usecase usecase)
           
static Specification<DomainEventValue> withNames(Class eventClass)
           
static Specification<DomainEventValue> withNames(Iterable<String> names)
           
static Specification<DomainEventValue> withNames(String... names)
           
static Specification<UnitOfWorkDomainEventsValue> withUsecases(String... names)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Events

public Events()
Method Detail

events

public static Iterable<DomainEventValue> events(Iterable<UnitOfWorkDomainEventsValue> transactions)

events

public static Iterable<DomainEventValue> events(UnitOfWorkDomainEventsValue... unitOfWorkDomainValues)

adapter

public static UnitOfWorkEventsVisitor adapter(EventVisitor eventVisitor)

matches

public static boolean matches(Specification<DomainEventValue> specification,
                              Iterable<UnitOfWorkDomainEventsValue> transactions)

afterDate

public static Specification<UnitOfWorkDomainEventsValue> afterDate(Date afterDate)

beforeDate

public static Specification<UnitOfWorkDomainEventsValue> beforeDate(Date afterDate)

withUsecases

public static Specification<UnitOfWorkDomainEventsValue> withUsecases(String... names)

byUser

public static Specification<UnitOfWorkDomainEventsValue> byUser(String... by)

withNames

public static Specification<DomainEventValue> withNames(Iterable<String> names)

withNames

public static Specification<DomainEventValue> withNames(String... names)

withNames

public static Specification<DomainEventValue> withNames(Class eventClass)

onEntities

public static Specification<DomainEventValue> onEntities(String... entities)

onEntityTypes

public static Specification<DomainEventValue> onEntityTypes(String... entityTypes)

paramIs

public static Specification<DomainEventValue> paramIs(String name,
                                                      String value)

playEvents

public static EventVisitor playEvents(DomainEventPlayer player,
                                      Object eventHandler,
                                      UnitOfWorkFactory uowf,
                                      Usecase usecase)