T - Property data typepublic abstract class PropertyValueGenerator<T> extends Object implements Serializable
| Constructor and Description |
|---|
PropertyValueGenerator() |
| Modifier and Type | Method and Description |
|---|---|
SortOrder[] |
getSortProperties(SortOrder order)
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()
Return Property type for this generator.
|
abstract T |
getValue(Item item,
Object itemId,
Object propertyId)
Returns value for given Item.
|
Container.Filter |
modifyFilter(Container.Filter filter)
Return an updated filter that should be compatible with the underlying
container.
|
public abstract T getValue(Item item, Object itemId, Object propertyId)
item - currently handled itemitemId - item id for currently handled itempropertyId - id for this propertypublic abstract Class<T> getType()
Property.getType() is called for generated property.public SortOrder[] getSortProperties(SortOrder order)
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.
order - a sort order for this propertypublic Container.Filter modifyFilter(Container.Filter filter) throws UnsupportedFilterException
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.
filter - original filter for this propertyUnsupportedFilterException - if the implementation doesn't support modifying the provided
filterCopyright © 2023 Vaadin Ltd. All rights reserved.