Class AbstractBeanContainer<IDTYPE,BEANTYPE>
- java.lang.Object
-
- com.vaadin.v7.data.util.AbstractContainer
-
- com.vaadin.v7.data.util.AbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
-
- com.vaadin.v7.data.util.AbstractBeanContainer<IDTYPE,BEANTYPE>
-
- Type Parameters:
IDTYPE
- The type of the item identifierBEANTYPE
- The type of the Bean
- All Implemented Interfaces:
com.vaadin.event.SerializableEventListener
,Container
,Container.Filterable
,Container.Indexed
,Container.ItemSetChangeNotifier
,Container.Ordered
,Container.PropertySetChangeNotifier
,Container.SimpleFilterable
,Container.Sortable
,Property.ValueChangeListener
,java.io.Serializable
,java.util.EventListener
- Direct Known Subclasses:
BeanContainer
,BeanItemContainer
@Deprecated public abstract class AbstractBeanContainer<IDTYPE,BEANTYPE> extends AbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>> implements Container.Filterable, Container.SimpleFilterable, Container.Sortable, Property.ValueChangeListener, Container.PropertySetChangeNotifier
Deprecated.As of 8.0, replaced byDataProvider
An abstract base class for in-memory containers for JavaBeans.The properties of the container are determined automatically by introspecting the used JavaBean class and explicitly adding or removing properties is not supported. Only beans of the same type can be added to the container.
Subclasses should implement any public methods adding items to the container, typically calling the protected methods
addItem(Object, Object)
,addItemAfter(Object, Object, Object)
andaddItemAt(int, Object, Object)
.- Since:
- 6.5
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractBeanContainer.BeanIdResolver<IDTYPE,BEANTYPE>
Deprecated.protected class
AbstractBeanContainer.PropertyBasedBeanIdResolver
Deprecated.-
Nested classes/interfaces inherited from class com.vaadin.v7.data.util.AbstractInMemoryContainer
AbstractInMemoryContainer.BaseItemAddEvent, AbstractInMemoryContainer.BaseItemRemoveEvent
-
Nested classes/interfaces inherited from class com.vaadin.v7.data.util.AbstractContainer
AbstractContainer.BaseItemSetChangeEvent, AbstractContainer.BasePropertySetChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Container
Container.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeEvent, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeEvent, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.Viewer
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Container.Indexed
Container.Indexed.ItemAddEvent, Container.Indexed.ItemRemoveEvent
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBeanContainer(java.lang.Class<? super BEANTYPE> type)
Deprecated.Constructs aAbstractBeanContainer
for beans of the given type.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
addAll(java.util.Collection<? extends BEANTYPE> collection)
Deprecated.Adds all the beans from aCollection
in one operation using the bean item identifier resolver.protected BeanItem<BEANTYPE>
addBean(BEANTYPE bean)
Deprecated.Adds a bean to the container using the bean item id resolver to find its identifier.protected BeanItem<BEANTYPE>
addBeanAfter(IDTYPE previousItemId, BEANTYPE bean)
Deprecated.Adds a bean to the container after a specified item identifier, using the bean item id resolver to find its identifier.protected BeanItem<BEANTYPE>
addBeanAt(int index, BEANTYPE bean)
Deprecated.Adds a bean at a specified (filtered view) position in the container using the bean item id resolver to find its identifier.void
addContainerFilter(Container.Filter filter)
Deprecated.Adds a filter for the container.void
addContainerFilter(java.lang.Object propertyId, java.lang.String filterString, boolean ignoreCase, boolean onlyMatchPrefix)
Deprecated.Add a filter for given property.boolean
addContainerProperty(java.lang.Object propertyId, java.lang.Class<?> type, java.lang.Object defaultValue)
Deprecated.Adds a new Property to all Items in the Container.protected boolean
addContainerProperty(java.lang.String propertyId, VaadinPropertyDescriptor<BEANTYPE> propertyDescriptor)
Deprecated.Adds a property for the container and all its items.protected BeanItem<BEANTYPE>
addItem(IDTYPE itemId, BEANTYPE bean)
Deprecated.Adds the bean to the Container.protected BeanItem<BEANTYPE>
addItemAfter(IDTYPE previousItemId, IDTYPE newItemId, BEANTYPE bean)
Deprecated.Adds the bean after the given bean.protected BeanItem<BEANTYPE>
addItemAt(int index, IDTYPE newItemId, BEANTYPE bean)
Deprecated.Adds a new bean at the given index.void
addListener(Container.PropertySetChangeListener listener)
Deprecated.As of 7.0, replaced byaddPropertySetChangeListener(com.vaadin.v7.data.Container.PropertySetChangeListener)
void
addNestedContainerBean(java.lang.String propertyId)
Deprecated.Adds a nested container properties for all sub-properties of a named property to the container.boolean
addNestedContainerProperty(java.lang.String propertyId)
Deprecated.Adds a nested container property for the container, e.g.void
addPropertySetChangeListener(Container.PropertySetChangeListener listener)
Deprecated.Implementation of the corresponding method inContainer.PropertySetChangeNotifier
, override with the corresponding public method and implement the interface to use this.protected BeanItem<BEANTYPE>
createBeanItem(BEANTYPE bean)
Deprecated.Create a BeanItem for a bean using pre-parsed bean metadata (based ongetBeanType()
).protected AbstractBeanContainer.BeanIdResolver<IDTYPE,BEANTYPE>
createBeanPropertyResolver(java.lang.Object propertyId)
Deprecated.Create an item identifier resolver using a named bean property.AbstractBeanContainer.BeanIdResolver<IDTYPE,BEANTYPE>
getBeanIdResolver()
Deprecated.Returns the resolver that finds the item ID for a bean.java.lang.Class<? super BEANTYPE>
getBeanType()
Deprecated.Returns the type of beans this Container can contain.java.util.Collection<Container.Filter>
getContainerFilters()
Deprecated.Returns the filters which have been applied to the container.Property
getContainerProperty(java.lang.Object itemId, java.lang.Object propertyId)
Deprecated.Gets the Property identified by the given itemId and propertyId from the Container.java.util.Collection<java.lang.String>
getContainerPropertyIds()
Deprecated.Gets the ID's of all Properties stored in the Container.BeanItem<BEANTYPE>
getItem(java.lang.Object itemId)
Deprecated.Gets theItem
with the given Item ID from the Container.java.util.List<IDTYPE>
getItemIds()
Deprecated.Gets the ID's of all visible (after filtering and sorting) Items stored in the Container.ItemSorter
getItemSorter()
Deprecated.Returns the ItemSorter used for comparing items in a sort.java.util.Collection<?>
getSortableContainerPropertyIds()
Deprecated.Gets the container property IDs which can be used to sort the items.java.lang.Class<?>
getType(java.lang.Object propertyId)
Deprecated.Gets the data type of all Properties identified by the given Property ID.protected BeanItem<BEANTYPE>
getUnfilteredItem(java.lang.Object itemId)
Deprecated.Get an item even if filtered out.boolean
hasContainerFilters()
Deprecated.Returns true if any filters have been applied to the container.protected void
registerNewItem(int position, IDTYPE itemId, BeanItem<BEANTYPE> item)
Deprecated.Registers a new item as having been added to the container.void
removeAllContainerFilters()
Deprecated.Remove all active filters from the container.boolean
removeAllItems()
Deprecated.Removes all Items from the Container.void
removeContainerFilter(Container.Filter filter)
Deprecated.Removes a filter from the container.void
removeContainerFilters(java.lang.Object propertyId)
Deprecated.Remove all filters from the given property.boolean
removeContainerProperty(java.lang.Object propertyId)
Deprecated.Removes a Property specified by the given Property ID from the Container.boolean
removeItem(java.lang.Object itemId)
Deprecated.Removes the Item identified byItemId
from the Container.void
removeListener(Container.PropertySetChangeListener listener)
Deprecated.As of 7.0, replaced byremovePropertySetChangeListener(Container.PropertySetChangeListener)
void
removePropertySetChangeListener(Container.PropertySetChangeListener listener)
Deprecated.Implementation of the corresponding method inContainer.PropertySetChangeNotifier
, override with the corresponding public method and implement the interface to use this.protected IDTYPE
resolveBeanId(BEANTYPE bean)
Deprecated.Use the bean resolver to get the identifier for a bean.protected void
setBeanIdResolver(AbstractBeanContainer.BeanIdResolver<IDTYPE,BEANTYPE> beanIdResolver)
Deprecated.Sets the resolver that finds the item id for a bean, or null not to use automatic resolving.void
setItemSorter(ItemSorter itemSorter)
Deprecated.Sets the ItemSorter used for comparing items in a sort.void
sort(java.lang.Object[] propertyId, boolean[] ascending)
Deprecated.Sorts the container items.void
valueChange(Property.ValueChangeEvent event)
Deprecated.Re-filter the container when one of the monitored properties changes.-
Methods inherited from class com.vaadin.v7.data.util.AbstractInMemoryContainer
addFilter, addItem, addItem, addItemAfter, addItemAfter, addItemAt, addItemAt, addItemSetChangeListener, addListener, containsId, doFilterContainer, doSort, filterAll, fireItemAdded, fireItemRemoved, fireItemsAdded, fireItemsRemoved, firstItemId, getAllItemIds, getFilteredItemIds, getFilters, getFirstVisibleItem, getIdByIndex, getItemIds, getSortablePropertyIds, getVisibleItemIds, indexOfId, internalAddItemAfter, internalAddItemAt, internalAddItemAtEnd, internalRemoveAllItems, internalRemoveItem, isFiltered, isFirstId, isLastId, isPropertyFiltered, lastItemId, nextItemId, passesFilters, prevItemId, removeAllFilters, removeFilter, removeFilters, removeItemSetChangeListener, removeListener, setAllItemIds, setFilteredItemIds, setFilters, size, sortContainer
-
Methods inherited from class com.vaadin.v7.data.util.AbstractContainer
fireContainerPropertySetChange, fireContainerPropertySetChange, fireItemSetChange, fireItemSetChange, getItemSetChangeListeners, getListeners, getPropertySetChangeListeners, setItemSetChangeListeners, setPropertySetChangeListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.v7.data.Container
addItem, addItem, containsId, size
-
Methods inherited from interface com.vaadin.v7.data.Container.Ordered
addItemAfter, addItemAfter, firstItemId, isFirstId, isLastId, lastItemId, nextItemId, prevItemId
-
-
-
-
Constructor Detail
-
AbstractBeanContainer
protected AbstractBeanContainer(java.lang.Class<? super BEANTYPE> type)
Deprecated.Constructs aAbstractBeanContainer
for beans of the given type.- Parameters:
type
- the type of the beans that will be added to the container.- Throws:
java.lang.IllegalArgumentException
- Iftype
is null
-
-
Method Detail
-
getType
public java.lang.Class<?> getType(java.lang.Object propertyId)
Deprecated.Description copied from interface:Container
Gets the data type of all Properties identified by the given Property ID.
-
createBeanItem
protected BeanItem<BEANTYPE> createBeanItem(BEANTYPE bean)
Deprecated.Create a BeanItem for a bean using pre-parsed bean metadata (based ongetBeanType()
).- Parameters:
bean
-- Returns:
- created
BeanItem
or null if bean is null
-
getBeanType
public java.lang.Class<? super BEANTYPE> getBeanType()
Deprecated.Returns the type of beans this Container can contain. This comes from the bean type constructor parameter, and bean metadata (including container properties) is based on this.- Returns:
-
getContainerPropertyIds
public java.util.Collection<java.lang.String> getContainerPropertyIds()
Deprecated.Description copied from interface:Container
Gets the ID's of all Properties stored in the Container. The ID's cannot be modified through the returned collection.- Specified by:
getContainerPropertyIds
in interfaceContainer
- Returns:
- unmodifiable collection of Property IDs
-
removeAllItems
public boolean removeAllItems()
Deprecated.Description copied from interface:Container
Removes all Items from the Container.Note that Property ID and type information is preserved. This functionality is optional.
- Specified by:
removeAllItems
in interfaceContainer
- Overrides:
removeAllItems
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Returns:
true
if the operation succeeded,false
if not
-
getItem
public BeanItem<BEANTYPE> getItem(java.lang.Object itemId)
Deprecated.Description copied from interface:Container
Gets theItem
with the given Item ID from the Container. If the Container does not contain the requested Item,null
is returned.Containers should not return Items that are filtered out.
-
getUnfilteredItem
protected BeanItem<BEANTYPE> getUnfilteredItem(java.lang.Object itemId)
Deprecated.Description copied from class:AbstractInMemoryContainer
Get an item even if filtered out. For internal use only.- Specified by:
getUnfilteredItem
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Returns:
-
getItemIds
public java.util.List<IDTYPE> getItemIds()
Deprecated.Description copied from interface:Container
Gets the ID's of all visible (after filtering and sorting) Items stored in the Container. The ID's cannot be modified through the returned collection.If the container is
Container.Ordered
, the collection returned by this method should follow that order. If the container isContainer.Sortable
, the items should be in the sorted order.Calling this method for large lazy containers can be an expensive operation and should be avoided when practical.
- Specified by:
getItemIds
in interfaceContainer
- Overrides:
getItemIds
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Returns:
- unmodifiable collection of Item IDs
-
getContainerProperty
public Property getContainerProperty(java.lang.Object itemId, java.lang.Object propertyId)
Deprecated.Description copied from interface:Container
Gets the Property identified by the given itemId and propertyId from the Container. If the Container does not contain the item or it is filtered out, or the Container does not have the Property,null
is returned.- Specified by:
getContainerProperty
in interfaceContainer
- Parameters:
itemId
- ID of the visible Item which contains the PropertypropertyId
- ID of the Property to retrieve- Returns:
- Property with the given ID or
null
-
removeItem
public boolean removeItem(java.lang.Object itemId)
Deprecated.Description copied from interface:Container
Removes the Item identified byItemId
from the Container.Containers that support filtering should also allow removing an item that is currently filtered out.
This functionality is optional.
- Specified by:
removeItem
in interfaceContainer
- Overrides:
removeItem
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Parameters:
itemId
- ID of the Item to remove- Returns:
true
if the operation succeeded,false
if not
-
valueChange
public void valueChange(Property.ValueChangeEvent event)
Deprecated.Re-filter the container when one of the monitored properties changes.- Specified by:
valueChange
in interfaceProperty.ValueChangeListener
- Parameters:
event
- value change event object
-
addContainerFilter
public void addContainerFilter(java.lang.Object propertyId, java.lang.String filterString, boolean ignoreCase, boolean onlyMatchPrefix)
Deprecated.Description copied from interface:Container.SimpleFilterable
Add a filter for given property.The API
Container.Filterable.addContainerFilter(Filter)
is recommended instead of this method. ASimpleStringFilter
can be used with the new API to implement the old string filtering functionality.The filter accepts items for which toString() of the value of the given property contains or starts with given filterString. Other items are not visible in the container when filtered.
If a container has multiple filters, only items accepted by all filters are visible.
- Specified by:
addContainerFilter
in interfaceContainer.SimpleFilterable
- Parameters:
propertyId
- Property for which the filter is applied to.filterString
- String that must match the value of the propertyignoreCase
- Determine if the casing can be ignored when comparing strings.onlyMatchPrefix
- Only match prefixes; no other matches are included.
-
removeAllContainerFilters
public void removeAllContainerFilters()
Deprecated.Description copied from interface:Container.Filterable
Remove all active filters from the container.- Specified by:
removeAllContainerFilters
in interfaceContainer.Filterable
- Specified by:
removeAllContainerFilters
in interfaceContainer.SimpleFilterable
-
removeContainerFilters
public void removeContainerFilters(java.lang.Object propertyId)
Deprecated.Description copied from interface:Container.SimpleFilterable
Remove all filters from the given property.- Specified by:
removeContainerFilters
in interfaceContainer.SimpleFilterable
- Parameters:
propertyId
- for which to remove filters
-
addContainerFilter
public void addContainerFilter(Container.Filter filter) throws UnsupportedFilterException
Deprecated.Description copied from interface:Container.Filterable
Adds a filter for the container.If a container has multiple filters, only items accepted by all filters are visible.
- Specified by:
addContainerFilter
in interfaceContainer.Filterable
- Throws:
UnsupportedFilterException
- if the filter is not supported by the container
-
removeContainerFilter
public void removeContainerFilter(Container.Filter filter)
Deprecated.Description copied from interface:Container.Filterable
Removes a filter from the container.This requires that the equals() method considers the filters as equivalent (same instance or properly implemented equals() method).
- Specified by:
removeContainerFilter
in interfaceContainer.Filterable
-
hasContainerFilters
public boolean hasContainerFilters()
Deprecated.Description copied from class:AbstractInMemoryContainer
Returns true if any filters have been applied to the container.- Overrides:
hasContainerFilters
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Returns:
- true if the container has filters applied, false otherwise
-
getContainerFilters
public java.util.Collection<Container.Filter> getContainerFilters()
Deprecated.Description copied from interface:Container.Filterable
Returns the filters which have been applied to the container.- Specified by:
getContainerFilters
in interfaceContainer.Filterable
- Overrides:
getContainerFilters
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Returns:
- A collection of filters which have been applied to the container. An empty collection if no filters have been applied.
-
getSortableContainerPropertyIds
public java.util.Collection<?> getSortableContainerPropertyIds()
Deprecated.Description copied from interface:Container.Sortable
Gets the container property IDs which can be used to sort the items.- Specified by:
getSortableContainerPropertyIds
in interfaceContainer.Sortable
- Returns:
- the IDs of the properties that can be used for sorting the container
-
sort
public void sort(java.lang.Object[] propertyId, boolean[] ascending)
Deprecated.Description copied from interface:Container.Sortable
Sorts the container items.Sorting a container can irreversibly change the order of its items or only change the order temporarily, depending on the container.
- Specified by:
sort
in interfaceContainer.Sortable
- Parameters:
propertyId
- Array of container property IDs, whose values are used to sort the items in container as primary, secondary, ... sorting criterion. All of the item IDs must be in the collection returned byContainer.Sortable.getSortableContainerPropertyIds()
ascending
- Array of sorting order flags corresponding to each property ID used in sorting. If this array is shorter than propertyId array, ascending order is assumed for items where the order is not specified. Usetrue
to sort in ascending order,false
to use descending order.
-
getItemSorter
public ItemSorter getItemSorter()
Deprecated.Description copied from class:AbstractInMemoryContainer
Returns the ItemSorter used for comparing items in a sort. SeeAbstractInMemoryContainer.setItemSorter(ItemSorter)
for more information.- Overrides:
getItemSorter
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Returns:
- The ItemSorter used for comparing two items in a sort.
-
setItemSorter
public void setItemSorter(ItemSorter itemSorter)
Deprecated.Description copied from class:AbstractInMemoryContainer
Sets the ItemSorter used for comparing items in a sort. TheItemSorter.compare(Object, Object)
method is called with item ids to perform the sorting. A default ItemSorter is used if this is not explicitly set.- Overrides:
setItemSorter
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Parameters:
itemSorter
- The ItemSorter used for comparing two items in a sort (not null).
-
registerNewItem
protected void registerNewItem(int position, IDTYPE itemId, BeanItem<BEANTYPE> item)
Deprecated.Description copied from class:AbstractInMemoryContainer
Registers a new item as having been added to the container. This can involve storing the item or any relevant information about it in internal container-specific collections if necessary, as well as registering listeners etc. The full identifier list inAbstractInMemoryContainer
has already been updated to reflect the new item when this method is called.- Overrides:
registerNewItem
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
-
addItem
protected BeanItem<BEANTYPE> addItem(IDTYPE itemId, BEANTYPE bean)
Deprecated.Adds the bean to the Container. Note: the behavior of this method changed in Vaadin 6.6 - now items are added at the very end of the unfiltered container and not after the last visible item if filtering is used.- See Also:
Container.addItem(Object)
-
addItemAfter
protected BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId, IDTYPE newItemId, BEANTYPE bean)
Deprecated.Adds the bean after the given bean.
-
addItemAt
protected BeanItem<BEANTYPE> addItemAt(int index, IDTYPE newItemId, BEANTYPE bean)
Deprecated.Adds a new bean at the given index. The bean is used both as the item contents and as the item identifier.- Parameters:
index
- Index at which the bean should be added.newItemId
- The item id for the bean to add to the container.bean
- The bean to add to the container.- Returns:
- Returns the new BeanItem or null if the operation fails.
-
addBean
protected BeanItem<BEANTYPE> addBean(BEANTYPE bean) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
Deprecated.Adds a bean to the container using the bean item id resolver to find its identifier. A bean id resolver must be set before calling this method.- Parameters:
bean
- the bean to add- Returns:
- a BeanItem if item added or null
- Throws:
java.lang.IllegalStateException
- if no bean identifier resolver has been setjava.lang.IllegalArgumentException
- if an identifier cannot be resolved for the bean- See Also:
addItem(Object, Object)
-
addBeanAfter
protected BeanItem<BEANTYPE> addBeanAfter(IDTYPE previousItemId, BEANTYPE bean) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
Deprecated.Adds a bean to the container after a specified item identifier, using the bean item id resolver to find its identifier. A bean id resolver must be set before calling this method.- Parameters:
previousItemId
- the identifier of the bean after which this bean should be added, null to add to the beginningbean
- the bean to add- Returns:
- a BeanItem if item added or null
- Throws:
java.lang.IllegalStateException
- if no bean identifier resolver has been setjava.lang.IllegalArgumentException
- if an identifier cannot be resolved for the bean- See Also:
addItemAfter(Object, Object, Object)
-
addBeanAt
protected BeanItem<BEANTYPE> addBeanAt(int index, BEANTYPE bean) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
Deprecated.Adds a bean at a specified (filtered view) position in the container using the bean item id resolver to find its identifier. A bean id resolver must be set before calling this method.- Parameters:
index
- the index (in the filtered view) at which to add the itembean
- the bean to add- Returns:
- a BeanItem if item added or null
- Throws:
java.lang.IllegalStateException
- if no bean identifier resolver has been setjava.lang.IllegalArgumentException
- if an identifier cannot be resolved for the bean- See Also:
addItemAfter(Object, Object, Object)
-
addAll
protected void addAll(java.util.Collection<? extends BEANTYPE> collection) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
Deprecated.Adds all the beans from aCollection
in one operation using the bean item identifier resolver. More efficient than adding them one by one. A bean id resolver must be set before calling this method. Note: the behavior of this method changed in Vaadin 6.6 - now items are added at the very end of the unfiltered container and not after the last visible item if filtering is used.- Parameters:
collection
- The collection of beans to add. Must not be null.- Throws:
java.lang.IllegalStateException
- if no bean identifier resolver has been setjava.lang.IllegalArgumentException
- if the resolver returns a null itemId for one of the beans in the collection
-
resolveBeanId
protected IDTYPE resolveBeanId(BEANTYPE bean)
Deprecated.Use the bean resolver to get the identifier for a bean.- Parameters:
bean
-- Returns:
- resolved bean identifier, null if could not be resolved
- Throws:
java.lang.IllegalStateException
- if no bean resolver is set
-
setBeanIdResolver
protected void setBeanIdResolver(AbstractBeanContainer.BeanIdResolver<IDTYPE,BEANTYPE> beanIdResolver)
Deprecated.Sets the resolver that finds the item id for a bean, or null not to use automatic resolving. Methods that add a bean without specifying an id must not be called if no resolver has been set. Note that methods taking an explicit id can be used whether a resolver has been defined or not.- Parameters:
beanIdResolver
- to use or null to disable automatic id resolution
-
getBeanIdResolver
public AbstractBeanContainer.BeanIdResolver<IDTYPE,BEANTYPE> getBeanIdResolver()
Deprecated.Returns the resolver that finds the item ID for a bean.- Returns:
- resolver used or null if automatic item id resolving is disabled
-
createBeanPropertyResolver
protected AbstractBeanContainer.BeanIdResolver<IDTYPE,BEANTYPE> createBeanPropertyResolver(java.lang.Object propertyId)
Deprecated.Create an item identifier resolver using a named bean property.- Parameters:
propertyId
- property identifier, which must map to a getter in BEANTYPE- Returns:
- created resolver
-
addListener
@Deprecated public void addListener(Container.PropertySetChangeListener listener)
Deprecated.As of 7.0, replaced byaddPropertySetChangeListener(com.vaadin.v7.data.Container.PropertySetChangeListener)
- Specified by:
addListener
in interfaceContainer.PropertySetChangeNotifier
- Overrides:
addListener
in classAbstractContainer
-
addPropertySetChangeListener
public void addPropertySetChangeListener(Container.PropertySetChangeListener listener)
Deprecated.Description copied from class:AbstractContainer
Implementation of the corresponding method inContainer.PropertySetChangeNotifier
, override with the corresponding public method and implement the interface to use this.- Specified by:
addPropertySetChangeListener
in interfaceContainer.PropertySetChangeNotifier
- Overrides:
addPropertySetChangeListener
in classAbstractContainer
- Parameters:
listener
- The new Listener to be registered- See Also:
Container.PropertySetChangeNotifier.addListener(Container.PropertySetChangeListener)
-
removeListener
@Deprecated public void removeListener(Container.PropertySetChangeListener listener)
Deprecated.As of 7.0, replaced byremovePropertySetChangeListener(Container.PropertySetChangeListener)
- Specified by:
removeListener
in interfaceContainer.PropertySetChangeNotifier
- Overrides:
removeListener
in classAbstractContainer
-
removePropertySetChangeListener
public void removePropertySetChangeListener(Container.PropertySetChangeListener listener)
Deprecated.Description copied from class:AbstractContainer
Implementation of the corresponding method inContainer.PropertySetChangeNotifier
, override with the corresponding public method and implement the interface to use this.- Specified by:
removePropertySetChangeListener
in interfaceContainer.PropertySetChangeNotifier
- Overrides:
removePropertySetChangeListener
in classAbstractContainer
- Parameters:
listener
- Listener to be removed- See Also:
Container.PropertySetChangeNotifier.removeListener(Container. PropertySetChangeListener)
-
addContainerProperty
public boolean addContainerProperty(java.lang.Object propertyId, java.lang.Class<?> type, java.lang.Object defaultValue) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from interface:Container
Adds a new Property to all Items in the Container. The Property ID, data type and default value of the new Property are given as parameters.This functionality is optional.
- Specified by:
addContainerProperty
in interfaceContainer
- Overrides:
addContainerProperty
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Parameters:
propertyId
- ID of the Propertytype
- Data type of the new PropertydefaultValue
- The value all created Properties are initialized to- Returns:
true
if the operation succeeded,false
if not- Throws:
java.lang.UnsupportedOperationException
- if the container does not support explicitly adding container properties
-
addContainerProperty
protected final boolean addContainerProperty(java.lang.String propertyId, VaadinPropertyDescriptor<BEANTYPE> propertyDescriptor)
Deprecated.Adds a property for the container and all its items. Primarily for internal use, may change in future versions.- Parameters:
propertyId
-propertyDescriptor
-- Returns:
- true if the property was added
-
addNestedContainerProperty
public boolean addNestedContainerProperty(java.lang.String propertyId)
Deprecated.Adds a nested container property for the container, e.g. "manager.address.street". All intermediate getters must exist and should return non-null values when the property value is accessed. If an intermediate getter returns null, a null value will be returned.- Parameters:
propertyId
-- Returns:
- true if the property was added
- See Also:
NestedMethodProperty
-
addNestedContainerBean
public void addNestedContainerBean(java.lang.String propertyId)
Deprecated.Adds a nested container properties for all sub-properties of a named property to the container. The named property itself is removed from the model as its subproperties are added. All intermediate getters must exist and should return non-null values when the property value is accessed. If an intermediate getter returns null, a null value will be returned.- Parameters:
propertyId
-- See Also:
NestedMethodProperty
,addNestedContainerProperty(String)
-
removeContainerProperty
public boolean removeContainerProperty(java.lang.Object propertyId) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from interface:Container
Removes a Property specified by the given Property ID from the Container. Note that the Property will be removed from all Items in the Container.This functionality is optional.
- Specified by:
removeContainerProperty
in interfaceContainer
- Overrides:
removeContainerProperty
in classAbstractInMemoryContainer<IDTYPE,java.lang.String,BeanItem<BEANTYPE>>
- Parameters:
propertyId
- ID of the Property to remove- Returns:
true
if the operation succeeded,false
if not- Throws:
java.lang.UnsupportedOperationException
- if the container does not support removing container properties
-
-