com.vaadin.data.util.
Class BeanItem<BT>
java.lang.Object
com.vaadin.data.util.PropertysetItem
com.vaadin.data.util.BeanItem<BT>
All Implemented Interfaces:
Item, Item.PropertySetChangeNotifier, Serializable, Cloneable
- extends PropertysetItem
public class BeanItem<BT>
A wrapper class for adding the Item interface to any Java Bean.
Since:
3.0
Version:
6.8.18
Author:
Vaadin Ltd.
See Also:
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.data.Item |
---|
Item.Editor, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer |
Constructor Summary | |
---|---|
BeanItem(BT bean)
Creates a new instance of BeanItem and adds all properties
of a Java Bean to it. |
|
BeanItem(BT bean,
Collection<?> propertyIds)
Creates a new instance of BeanItem and adds all listed
properties of a Java Bean to it - in specified order. |
|
BeanItem(BT bean,
String[] propertyIds)
Creates a new instance of BeanItem and adds all listed
properties of a Java Bean to it - in specified order. |
Method Summary | |
---|---|
BT |
getBean()
Gets the underlying JavaBean object. |
Methods inherited from class com.vaadin.data.util.PropertysetItem |
---|
addItemProperty, addListener, clone, equals, getItemProperty, getItemPropertyIds, getListeners, hashCode, removeItemProperty, removeListener, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
BeanItem
public BeanItem(BT bean)
- Parameters:
bean
- the Java Bean to copy properties from.
Creates a new instance of BeanItem
and adds all properties
of a Java Bean to it. The properties are identified by their respective
bean names.
Note : This version only supports introspectable bean properties and
their getter and setter methods. Stand-alone is
and
are
methods are not supported.
BeanItem
public BeanItem(BT bean,
Collection<?> propertyIds)
- Parameters:
bean
- the Java Bean to copy properties from.propertyIds
- id of the property.
Creates a new instance of BeanItem
and adds all listed
properties of a Java Bean to it - in specified order. The properties are
identified by their respective bean names.
Note : This version only supports introspectable bean properties and
their getter and setter methods. Stand-alone is
and
are
methods are not supported.
BeanItem
public BeanItem(BT bean,
String[] propertyIds)
- Parameters:
bean
- the Java Bean to copy properties from.propertyIds
- ids of the properties.
Creates a new instance of BeanItem
and adds all listed
properties of a Java Bean to it - in specified order. The properties are
identified by their respective bean names.
Note : This version only supports introspectable bean properties and
their getter and setter methods. Stand-alone is
and
are
methods are not supported.
Method Detail |
---|
getBean
public BT getBean()
- Returns:
- the bean object.
Gets the underlying JavaBean object.