public class EventCollectionDAO extends Object implements EventDAO
Constructor and Description |
---|
EventCollectionDAO(Collection<? extends Event> evts)
Deprecated.
use
create(Collection) instead |
Modifier and Type | Method and Description |
---|---|
static EventDAO |
create(Collection<? extends Event> evts)
Create a new data source from a collection of events.
|
static EventDAO |
fromCursor(Cursor<Event> eventCursor)
Create a new data source from a cursor of events.
|
static EventDAO |
loadAndWrap(EventDAO eventDAO)
Create a new data source from EventDAO.
|
Cursor<Event> |
streamEvents()
Stream all events.
|
<E extends Event> |
streamEvents(Class<E> type)
Stream all events of a given type.
|
<E extends Event> |
streamEvents(Class<E> type,
SortOrder order)
Stream all events of a given type in a specified order.
|
String |
toString() |
@Deprecated public EventCollectionDAO(Collection<? extends Event> evts)
create(Collection)
insteadevts
- The events to use.public static EventDAO create(Collection<? extends Event> evts)
evts
- The events collection to be used.public static EventDAO fromCursor(@WillClose Cursor<Event> eventCursor)
eventCursor
- The event cursor to be used.public static EventDAO loadAndWrap(EventDAO eventDAO)
eventDAO
- The EventDAO to be used.public Cursor<Event> streamEvents()
EventDAO
streamEvents
in interface EventDAO
public <E extends Event> Cursor<E> streamEvents(Class<E> type)
EventDAO
streamEvents
in interface EventDAO
type
- The event type.public <E extends Event> Cursor<E> streamEvents(Class<E> type, SortOrder order)
EventDAO
streamEvents
in interface EventDAO
type
- The event type.order
- The order.