T
- type of queried objects (e.g. Message
)ET
- enumeration type corresponding to the queried objects (e.g. MessageType
)public abstract class LazyPulseQuery<ET,T> extends Object implements org.vaadin.addons.lazyquerycontainer.Query
Query
implementation for accessing Pulse-related objects via corresponding services.
Converts objects into PropertysetItem
s, supporting sorting and grouping by entity types.Constructor and Description |
---|
LazyPulseQuery(PulseQueryDefinition<ET> queryDefinition) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateMessagesPerType() |
com.vaadin.data.Item |
constructItem() |
protected abstract T |
createGroupingEntry(ET type) |
boolean |
deleteAllItems() |
protected abstract List<T> |
getEntries(List<ET> types,
int limit,
int offset) |
protected abstract long |
getEntriesAmount(List<ET> types) |
protected List<T> |
getEntriesOfType(ET type,
Range range) |
protected List<T> |
getObjects(int startIndex,
int count) |
protected PulseQueryDefinition<ET> |
getQueryDefinition() |
protected Map<String,Boolean> |
getSortCriteria()
Aggregates query sorting criteria into a map with property names as keys, and
boolean values where
true stands for ascending sorting direction. |
List<com.vaadin.data.Item> |
loadItems(int startIndex,
int count) |
protected abstract void |
mapObjectToItem(T object,
com.vaadin.data.Item item) |
void |
saveItems(List<com.vaadin.data.Item> addedItems,
List<com.vaadin.data.Item> modifiedItems,
List<com.vaadin.data.Item> removedItems) |
int |
size() |
public LazyPulseQuery(PulseQueryDefinition<ET> queryDefinition)
protected abstract void mapObjectToItem(T object, com.vaadin.data.Item item)
public int size()
size
in interface org.vaadin.addons.lazyquerycontainer.Query
public List<com.vaadin.data.Item> loadItems(int startIndex, int count)
loadItems
in interface org.vaadin.addons.lazyquerycontainer.Query
public com.vaadin.data.Item constructItem()
constructItem
in interface org.vaadin.addons.lazyquerycontainer.Query
protected PulseQueryDefinition<ET> getQueryDefinition()
protected void calculateMessagesPerType()
protected Map<String,Boolean> getSortCriteria()
boolean
values where
true
stands for ascending sorting direction.public void saveItems(List<com.vaadin.data.Item> addedItems, List<com.vaadin.data.Item> modifiedItems, List<com.vaadin.data.Item> removedItems)
saveItems
in interface org.vaadin.addons.lazyquerycontainer.Query
public boolean deleteAllItems()
deleteAllItems
in interface org.vaadin.addons.lazyquerycontainer.Query
Copyright © 2015 Magnolia International Ltd.. All rights reserved.