public abstract class OnmsDaoContainer<T,K extends Serializable> extends Object implements com.vaadin.data.Container, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeNotifier, VerticesUpdateManager.VerticesUpdateListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
OnmsDaoContainer.Cache |
protected static class |
OnmsDaoContainer.Page |
protected static class |
OnmsDaoContainer.Size |
protected static interface |
OnmsDaoContainer.SizeReloadStrategy |
protected static class |
OnmsDaoContainer.SortEntry |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_PAGE_SIZE |
protected static int |
DEFAULT_SIZE_RELOAD_TIME |
| Constructor and Description |
|---|
OnmsDaoContainer(Class<T> itemClass,
OnmsDao<T,K> dao) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAdditionalCriteriaOptions(Criteria criteria,
OnmsDaoContainer.Page page,
boolean doOrder) |
void |
addBeanToHibernatePropertyMapping(String key,
String value) |
boolean |
addContainerProperty(Object propertyId,
Class<?> type,
Object defaultValue) |
Object |
addItem()
Can be overridden if you want to support adding items.
|
com.vaadin.data.Item |
addItem(Object itemId)
Can be overridden if you want to support adding items.
|
Object |
addItemAfter(Object previousItemId) |
com.vaadin.data.Item |
addItemAfter(Object previousItemId,
Object newItemId) |
Object |
addItemAt(int index) |
com.vaadin.data.Item |
addItemAt(int index,
Object newItemId) |
void |
addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener) |
void |
addListener(com.vaadin.data.Container.ItemSetChangeListener listener) |
boolean |
containsId(Object itemId) |
protected List<OnmsDaoContainer.SortEntry> |
createSortEntries(Object[] propertyId,
boolean[] ascending) |
protected void |
doItemAddedCallBack(int rowNumber,
K id,
T eachBean) |
protected List<Integer> |
extractNodeIds(Collection<VertexRef> vertices)
Gets the node ids from the given vertices.
|
protected void |
fireItemSetChangedEvent() |
Object |
firstItemId() |
protected OnmsDaoContainer.Cache |
getCache() |
com.vaadin.data.Property<?> |
getContainerProperty(Object itemId,
Object propertyId) |
Collection<?> |
getContainerPropertyIds() |
protected Criteria |
getCriteria(OnmsDaoContainer.Page page,
boolean doOrder)
Creates a
Criteria object to get data from database. |
protected abstract K |
getId(T bean) |
K |
getIdByIndex(int index) |
com.vaadin.data.Item |
getItem(Object itemId) |
Class<T> |
getItemClass() |
Collection<?> |
getItemIds() |
List<K> |
getItemIds(int startIndex,
int numberOfItems) |
protected List<T> |
getItemsForCache(OnmsDao<T,K> dao,
OnmsDaoContainer.Page page) |
protected OnmsDaoContainer.Page |
getPage() |
List<Restriction> |
getRestrictions() |
Collection<?> |
getSortableContainerPropertyIds()
This function returns
getContainerPropertyIds(). |
Class<?> |
getType(Object propertyId) |
int |
indexOfId(Object itemId) |
boolean |
isFirstId(Object itemId) |
boolean |
isLastId(Object itemId) |
Object |
lastItemId() |
Object |
nextItemId(Object itemId) |
Object |
prevItemId(Object itemId) |
boolean |
removeAllItems() |
boolean |
removeContainerProperty(Object propertyId) |
boolean |
removeItem(Object itemId) |
void |
removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener) |
void |
removeListener(com.vaadin.data.Container.ItemSetChangeListener listener) |
void |
setRestrictions(List<Restriction> newRestrictions) |
int |
size() |
void |
sort(Object[] propertyId,
boolean[] ascending) |
protected void |
updateContainerPropertyIds(Map<Object,Class<?>> properties) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitverticesUpdatedprotected static final int DEFAULT_PAGE_SIZE
protected static final int DEFAULT_SIZE_RELOAD_TIME
public boolean containsId(Object itemId)
containsId in interface com.vaadin.data.Containerpublic com.vaadin.data.Property<?> getContainerProperty(Object itemId, Object propertyId)
getContainerProperty in interface com.vaadin.data.Containerpublic Collection<?> getContainerPropertyIds()
getContainerPropertyIds in interface com.vaadin.data.Containerpublic com.vaadin.data.Item getItem(Object itemId)
getItem in interface com.vaadin.data.Containerpublic Class<?> getType(Object propertyId)
getType in interface com.vaadin.data.Containerpublic boolean removeAllItems()
throws UnsupportedOperationException
removeAllItems in interface com.vaadin.data.ContainerUnsupportedOperationExceptionpublic boolean removeItem(Object itemId) throws UnsupportedOperationException
removeItem in interface com.vaadin.data.ContainerUnsupportedOperationExceptionpublic int size()
size in interface com.vaadin.data.Containerpublic Object firstItemId()
firstItemId in interface com.vaadin.data.Container.Orderedpublic Object lastItemId()
lastItemId in interface com.vaadin.data.Container.Orderedpublic boolean isFirstId(Object itemId)
isFirstId in interface com.vaadin.data.Container.Orderedpublic boolean isLastId(Object itemId)
isLastId in interface com.vaadin.data.Container.Orderedpublic Object nextItemId(Object itemId)
nextItemId in interface com.vaadin.data.Container.Orderedpublic Object prevItemId(Object itemId)
prevItemId in interface com.vaadin.data.Container.Orderedpublic Collection<?> getSortableContainerPropertyIds()
getContainerPropertyIds().getSortableContainerPropertyIds in interface com.vaadin.data.Container.Sortablepublic void sort(Object[] propertyId, boolean[] ascending)
sort in interface com.vaadin.data.Container.Sortableprotected List<OnmsDaoContainer.SortEntry> createSortEntries(Object[] propertyId, boolean[] ascending)
public void addListener(com.vaadin.data.Container.ItemSetChangeListener listener)
addListener in interface com.vaadin.data.Container.ItemSetChangeNotifierpublic void removeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
removeListener in interface com.vaadin.data.Container.ItemSetChangeNotifierpublic void addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
addItemSetChangeListener in interface com.vaadin.data.Container.ItemSetChangeNotifierpublic void removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
removeItemSetChangeListener in interface com.vaadin.data.Container.ItemSetChangeNotifierprotected void fireItemSetChangedEvent()
public void setRestrictions(List<Restriction> newRestrictions)
public List<Restriction> getRestrictions()
public void addBeanToHibernatePropertyMapping(String key, String value)
public Collection<?> getItemIds()
getItemIds in interface com.vaadin.data.Containerpublic List<K> getItemIds(int startIndex, int numberOfItems)
getItemIds in interface com.vaadin.data.Container.Indexedpublic int indexOfId(Object itemId)
indexOfId in interface com.vaadin.data.Container.Indexedpublic K getIdByIndex(int index)
getIdByIndex in interface com.vaadin.data.Container.Indexedpublic Object addItemAt(int index) throws UnsupportedOperationException
addItemAt in interface com.vaadin.data.Container.IndexedUnsupportedOperationExceptionpublic com.vaadin.data.Item addItemAt(int index,
Object newItemId)
throws UnsupportedOperationException
addItemAt in interface com.vaadin.data.Container.IndexedUnsupportedOperationExceptionpublic Object addItemAfter(Object previousItemId) throws UnsupportedOperationException
addItemAfter in interface com.vaadin.data.Container.OrderedUnsupportedOperationExceptionpublic com.vaadin.data.Item addItemAfter(Object previousItemId, Object newItemId) throws UnsupportedOperationException
addItemAfter in interface com.vaadin.data.Container.OrderedUnsupportedOperationExceptionpublic final boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException
addContainerProperty in interface com.vaadin.data.ContainerUnsupportedOperationExceptionpublic Object addItem() throws UnsupportedOperationException
addItem in interface com.vaadin.data.ContainerUnsupportedOperationExceptionpublic com.vaadin.data.Item addItem(Object itemId) throws UnsupportedOperationException
addItem in interface com.vaadin.data.ContainerUnsupportedOperationExceptionpublic final boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException
removeContainerProperty in interface com.vaadin.data.ContainerUnsupportedOperationExceptionprotected void updateContainerPropertyIds(Map<Object,Class<?>> properties)
protected Criteria getCriteria(OnmsDaoContainer.Page page, boolean doOrder)
Criteria object to get data from database.
If considerPaging is set Limit and offset values are added as restriction.page - doOrder - protected void addAdditionalCriteriaOptions(Criteria criteria, OnmsDaoContainer.Page page, boolean doOrder)
protected OnmsDaoContainer.Cache getCache()
protected OnmsDaoContainer.Page getPage()
protected List<Integer> extractNodeIds(Collection<VertexRef> vertices)
vertices - Copyright © 2015. All rights reserved.