Package com.vaadin.featurepack.data
Interface Item
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
EntityItem<T>
- All Known Implementing Classes:
BeanItem,JPAContainerItem,PropertysetItem
Provides a mechanism for handling a set of Properties, each associated to a locally unique non-null identifier. The interface is split into subinterfaces to enable a class to implement only the functionalities it needs.
- Since:
- 3.0
- Author:
- Vaadin Ltd
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface implemented by theEditorclasses capable of editing the Item.static interfaceAnEventobject specifying the Item whose contents has been changed through thePropertyinterface.static interfaceThe listener interface for receivingPropertySetChangeEventobjects.static interfaceThe interface for adding and removingPropertySetChangeEventlisteners.static interfaceInterface implemented by viewer classes capable of using an Item as a data source. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddItemProperty(Object id, Property property) Tries to add a new Property into the Item.Gets the Property corresponding to the given Property ID stored in the Item.Collection<?> Gets the collection of IDs of all Properties stored in the Item.booleanRemoves the Property identified by ID from the Item.
-
Method Details
-
getItemProperty
Gets the Property corresponding to the given Property ID stored in the Item. If the Item does not contain the Property,nullis returned.- Parameters:
id- identifier of the Property to get- Returns:
- the Property with the given ID or
null
-
getItemPropertyIds
Collection<?> getItemPropertyIds()Gets the collection of IDs of all Properties stored in the Item.- Returns:
- unmodifiable collection containing IDs of the Properties stored the Item
-
addItemProperty
Tries to add a new Property into the Item.This functionality is optional.
- Parameters:
id- ID of the new Propertyproperty- the Property to be added and associated with the id- Returns:
trueif the operation succeeded,falseif not- Throws:
UnsupportedOperationException- if the operation is not supported.
-
removeItemProperty
Removes the Property identified by ID from the Item.This functionality is optional.
- Parameters:
id- ID of the Property to be removed- Returns:
trueif the operation succeeded- Throws:
UnsupportedOperationException- if the operation is not supported.falseif not
-