info.joseluismartin.vaadin.data
Class EntityItemIdStrategy

java.lang.Object
  extended by info.joseluismartin.vaadin.data.EntityItemIdStrategy
All Implemented Interfaces:
com.vaadin.data.Container.ItemSetChangeListener, ItemIdStrategy, Serializable

public class EntityItemIdStrategy
extends Object
implements ItemIdStrategy

Author:
Jose Luis Martin - (jlm@joseluismartin.info)
See Also:
Serialized Form

Constructor Summary
EntityItemIdStrategy()
           
 
Method Summary
 void containerItemSetChange(com.vaadin.data.Container.ItemSetChangeEvent event)
          
 Object firstItemId()
          
 Object getIdByIndex(int index)
          Get an id by index
 Collection<?> getItemIds()
          Gets a collection of all itemIds
 int indexOfId(Object itemId)
          Gets the index of an itemId
 void itemLoaded(int index, com.vaadin.data.Item item)
          
 Object lastItemId()
          
 void setContainerDataSource(ContainerDataSource<?> containerDataSource)
          Set the containerDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityItemIdStrategy

public EntityItemIdStrategy()
Method Detail

firstItemId

public Object firstItemId()

Specified by:
firstItemId in interface ItemIdStrategy
Returns:
the first itemId

getIdByIndex

public Object getIdByIndex(int index)
Get an id by index

Specified by:
getIdByIndex in interface ItemIdStrategy
Parameters:
index - the index
Returns:
Id

getItemIds

public Collection<?> getItemIds()
Gets a collection of all itemIds

Specified by:
getItemIds in interface ItemIdStrategy
Returns:
collection with all itemIds

indexOfId

public int indexOfId(Object itemId)
Gets the index of an itemId

Specified by:
indexOfId in interface ItemIdStrategy
Parameters:
itemId - the itemId

lastItemId

public Object lastItemId()

Specified by:
lastItemId in interface ItemIdStrategy
Returns:
the las itemId

setContainerDataSource

public void setContainerDataSource(ContainerDataSource<?> containerDataSource)
Set the containerDataSource

Specified by:
setContainerDataSource in interface ItemIdStrategy

itemLoaded

public void itemLoaded(int index,
                       com.vaadin.data.Item item)

Specified by:
itemLoaded in interface ItemIdStrategy

containerItemSetChange

public void containerItemSetChange(com.vaadin.data.Container.ItemSetChangeEvent event)

Specified by:
containerItemSetChange in interface com.vaadin.data.Container.ItemSetChangeListener


Copyright © 2012 JDAL. All Rights Reserved.