Package com.vaadin.v7.data.util
Class PropertyValueGenerator<T>
- java.lang.Object
-
- com.vaadin.v7.data.util.PropertyValueGenerator<T>
-
- Type Parameters:
T
- Property data type
- All Implemented Interfaces:
Serializable
@Deprecated public abstract class PropertyValueGenerator<T> extends Object implements Serializable
Deprecated.As of 8.0, no direct replacement available. You can use any bean directly as an item forBinder
orDataProvider
and access item properties with lambdas likebinder.forField(component).bind(...)
ornew Grid<Bean>(dataProvider).addColumn(bean->bean.getSomething())
.PropertyValueGenerator for GeneratedPropertyContainer.- Since:
- 7.4
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyValueGenerator()
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SortOrder[]
getSortProperties(SortOrder order)
Deprecated.Translates sorting of the generated property in a specific direction to a set of property ids and directions in the underlying container.abstract Class<T>
getType()
Deprecated.Return Property type for this generator.abstract T
getValue(Item item, Object itemId, Object propertyId)
Deprecated.Returns value for given Item.Container.Filter
modifyFilter(Container.Filter filter)
Deprecated.Return an updated filter that should be compatible with the underlying container.
-
-
-
Method Detail
-
getValue
public abstract T getValue(Item item, Object itemId, Object propertyId)
Deprecated.Returns value for given Item. Used by GeneratedPropertyContainer when generating new properties.- Parameters:
item
- currently handled itemitemId
- item id for currently handled itempropertyId
- id for this property- Returns:
- generated value
-
getType
public abstract Class<T> getType()
Deprecated.Return Property type for this generator. This function is called whenProperty.getType()
is called for generated property.- Returns:
- type of generated property
-
getSortProperties
public SortOrder[] getSortProperties(SortOrder order)
Deprecated.Translates sorting of the generated property in a specific direction to a set of property ids and directions in the underlying container.SortOrder is similar to (or the same as) the SortOrder already defined for Grid.
The default implementation of this method returns an empty array, which means that the property will not be included in getSortableContainerPropertyIds(). Attempting to sort by that column throws UnsupportedOperationException. Returning null is not allowed.
- Parameters:
order
- a sort order for this property- Returns:
- an array of sort orders describing how this property is sorted
-
modifyFilter
public Container.Filter modifyFilter(Container.Filter filter) throws UnsupportedFilterException
Deprecated.Return an updated filter that should be compatible with the underlying container.This function is called when setting a filter for this generated property. Returning null from this function causes GeneratedPropertyContainer to discard the filter and not use it.
By default this function throws UnsupportedFilterException.
- Parameters:
filter
- original filter for this property- Returns:
- modified filter that is compatible with the underlying container
- Throws:
UnsupportedFilterException
- if the implementation doesn't support modifying the provided filter
-
-