|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.joseluismartin.vaadin.data.ContainerDataSource<T>
public class ContainerDataSource<T>
An adapter to use PageableDataSources as Vaadin Container. Use a integer as itemId and load data by page from data source on request.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.data.Container |
---|
com.vaadin.data.Container.Editor, com.vaadin.data.Container.Filter, com.vaadin.data.Container.Filterable, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeEvent, com.vaadin.data.Container.ItemSetChangeListener, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.PropertySetChangeEvent, com.vaadin.data.Container.PropertySetChangeListener, com.vaadin.data.Container.PropertySetChangeNotifier, com.vaadin.data.Container.SimpleFilterable, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Viewer |
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered |
---|
com.vaadin.data.Buffered.SourceException |
Constructor Summary | |
---|---|
ContainerDataSource()
|
|
ContainerDataSource(Class<T> entityClass)
|
|
ContainerDataSource(Class<T> entityClass,
PersistentService<T,? extends Serializable> service)
|
Method Summary | |
---|---|
boolean |
addContainerProperty(Object propertyId,
Class<?> type,
Object defaultValue)
|
Object |
addItem()
|
com.vaadin.data.Item |
addItem(Object itemId)
|
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 |
addListener(com.vaadin.data.Container.ItemSetChangeListener listener)
|
void |
commit()
|
boolean |
containsId(Object itemId)
|
void |
discard()
|
Object |
firstItemId()
|
com.vaadin.data.Property |
getContainerProperty(Object itemId,
Object propertyId)
|
Collection<?> |
getContainerPropertyIds()
|
Object |
getFilter()
|
Object |
getIdByIndex(int index)
|
com.vaadin.data.Item |
getItem(Object itemId)
|
com.vaadin.data.Item |
getItemByIndex(int index)
|
Collection<?> |
getItemIds()
|
ItemIdStrategy |
getItemIdStrategy()
|
List<Serializable> |
getKeys()
Get all keys from pageable datasource |
Page<T> |
getPage()
Gets the page |
int |
getPageContaining(int index)
|
int |
getPageSize()
Get the page size |
PersistentService<T,? extends Serializable> |
getService()
|
Collection<?> |
getSortableContainerPropertyIds()
|
List<String> |
getSortableProperties()
|
Class<?> |
getType(Object propertyId)
|
int |
indexOfId(Object itemId)
|
void |
init()
|
boolean |
isFirstId(Object itemId)
|
boolean |
isLastId(Object itemId)
|
boolean |
isModified()
|
boolean |
isReadThrough()
|
boolean |
isWriteThrough()
|
void |
itemPropertySetChange(com.vaadin.data.Item.PropertySetChangeEvent event)
|
Object |
lastItemId()
|
Object |
nextItemId(Object itemId)
|
Object |
prevItemId(Object itemId)
|
boolean |
removeAllItems()
|
boolean |
removeContainerProperty(Object propertyId)
|
boolean |
removeItem(Object itemId)
|
void |
removeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
|
boolean |
save()
Save changes to Persistent Service |
void |
setFilter(Object filter)
|
void |
setItemIdStrategy(ItemIdStrategy itemIdStrategy)
|
void |
setPage(Page<T> page)
|
void |
setPageSize(int pageSize)
Set the page size |
void |
setReadThrough(boolean readThrough)
|
void |
setService(PersistentService<T,Serializable> service)
|
void |
setSortableProperties(List<String> sortableProperties)
|
void |
setWriteThrough(boolean writeThrough)
|
int |
size()
|
void |
sort(Object[] propertyId,
boolean[] ascending)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContainerDataSource()
public ContainerDataSource(Class<T> entityClass)
public ContainerDataSource(Class<T> entityClass, PersistentService<T,? extends Serializable> service)
Method Detail |
---|
public void init()
public Object nextItemId(Object itemId)
nextItemId
in interface com.vaadin.data.Container.Ordered
public Object prevItemId(Object itemId)
prevItemId
in interface com.vaadin.data.Container.Ordered
public Object firstItemId()
firstItemId
in interface com.vaadin.data.Container.Ordered
public Object lastItemId()
lastItemId
in interface com.vaadin.data.Container.Ordered
public boolean isFirstId(Object itemId)
isFirstId
in interface com.vaadin.data.Container.Ordered
public boolean isLastId(Object itemId)
isLastId
in interface com.vaadin.data.Container.Ordered
public Object addItemAfter(Object previousItemId) throws UnsupportedOperationException
addItemAfter
in interface com.vaadin.data.Container.Ordered
UnsupportedOperationException
public com.vaadin.data.Item addItemAfter(Object previousItemId, Object newItemId) throws UnsupportedOperationException
addItemAfter
in interface com.vaadin.data.Container.Ordered
UnsupportedOperationException
public int indexOfId(Object itemId)
indexOfId
in interface com.vaadin.data.Container.Indexed
public Object getIdByIndex(int index)
getIdByIndex
in interface com.vaadin.data.Container.Indexed
public Object addItemAt(int index) throws UnsupportedOperationException
addItemAt
in interface com.vaadin.data.Container.Indexed
UnsupportedOperationException
public com.vaadin.data.Item addItemAt(int index, Object newItemId) throws UnsupportedOperationException
addItemAt
in interface com.vaadin.data.Container.Indexed
UnsupportedOperationException
public void sort(Object[] propertyId, boolean[] ascending)
sort
in interface com.vaadin.data.Container.Sortable
public Collection<?> getSortableContainerPropertyIds()
getSortableContainerPropertyIds
in interface com.vaadin.data.Container.Sortable
public com.vaadin.data.Item getItem(Object itemId)
getItem
in interface com.vaadin.data.Container
public int getPageContaining(int index)
public Collection<?> getContainerPropertyIds()
getContainerPropertyIds
in interface com.vaadin.data.Container
public Collection<?> getItemIds()
getItemIds
in interface com.vaadin.data.Container
public com.vaadin.data.Property getContainerProperty(Object itemId, Object propertyId)
getContainerProperty
in interface com.vaadin.data.Container
public Class<?> getType(Object propertyId)
getType
in interface com.vaadin.data.Container
public int size()
size
in interface com.vaadin.data.Container
public boolean containsId(Object itemId)
containsId
in interface com.vaadin.data.Container
public com.vaadin.data.Item addItem(Object itemId) throws UnsupportedOperationException
addItem
in interface com.vaadin.data.Container
UnsupportedOperationException
public Object addItem() throws UnsupportedOperationException
addItem
in interface com.vaadin.data.Container
UnsupportedOperationException
public boolean removeItem(Object itemId)
removeItem
in interface com.vaadin.data.Container
public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException
addContainerProperty
in interface com.vaadin.data.Container
UnsupportedOperationException
public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException
removeContainerProperty
in interface com.vaadin.data.Container
UnsupportedOperationException
public boolean removeAllItems() throws UnsupportedOperationException
removeAllItems
in interface com.vaadin.data.Container
UnsupportedOperationException
public PersistentService<T,? extends Serializable> getService()
public void setService(PersistentService<T,Serializable> service)
public void setPage(Page<T> page)
public List<String> getSortableProperties()
public void setSortableProperties(List<String> sortableProperties)
public void addListener(com.vaadin.data.Container.ItemSetChangeListener listener)
addListener
in interface com.vaadin.data.Container.ItemSetChangeNotifier
public void removeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
removeListener
in interface com.vaadin.data.Container.ItemSetChangeNotifier
public void setPageSize(int pageSize)
pageSize
- the page size to setpublic int getPageSize()
public Object getFilter()
Page.getFilter()
public void setFilter(Object filter)
filter
- Page.setFilter(java.lang.Object)
public List<Serializable> getKeys()
public ItemIdStrategy getItemIdStrategy()
public void setItemIdStrategy(ItemIdStrategy itemIdStrategy)
itemIdStrategy
- the itemIdStrategy to setpublic com.vaadin.data.Item getItemByIndex(int index)
index
- public void itemPropertySetChange(com.vaadin.data.Item.PropertySetChangeEvent event)
itemPropertySetChange
in interface com.vaadin.data.Item.PropertySetChangeListener
public boolean save()
public void commit() throws com.vaadin.data.Buffered.SourceException, com.vaadin.data.Validator.InvalidValueException
commit
in interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
com.vaadin.data.Validator.InvalidValueException
public void discard() throws com.vaadin.data.Buffered.SourceException
discard
in interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
public boolean isModified()
isModified
in interface com.vaadin.data.Buffered
public boolean isReadThrough()
isReadThrough
in interface com.vaadin.data.Buffered
public boolean isWriteThrough()
isWriteThrough
in interface com.vaadin.data.Buffered
public void setReadThrough(boolean readThrough) throws com.vaadin.data.Buffered.SourceException
setReadThrough
in interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
public void setWriteThrough(boolean writeThrough) throws com.vaadin.data.Buffered.SourceException, com.vaadin.data.Validator.InvalidValueException
setWriteThrough
in interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
com.vaadin.data.Validator.InvalidValueException
public Page<T> getPage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |