Class MapValueLoader
java.lang.Object
net.sf.basedb.clients.web.plugins.MapValueLoader
- All Implemented Interfaces:
DataLoader<BasicItem>
Data loader implementation that load values from a map
collection. The key of the map must be specified when
constructing the data loader.
- Since:
- 3.8
- Author:
- Nicklas
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Object
private final Metadata.PropertyPath<BasicItem,
Map<?, ?>> -
Constructor Summary
ConstructorDescriptionMapValueLoader
(Metadata.PropertyPath<BasicItem, Map<?, ?>> propertyPath, Object mapKey) Load values from a map. -
Method Summary
Modifier and TypeMethodDescriptiongetData
(DbControl dc, ExportedProperty exportedProperty, BasicItem item) Get the value for the specified property.
-
Field Details
-
propertyPath
-
mapKey
-
-
Constructor Details
-
MapValueLoader
Load values from a map.- Parameters:
propertyPath
- Property path to the map collectionmapKey
- The key to use when loading the value
-
-
Method Details
-
getData
Description copied from interface:DataLoader
Get the value for the specified property.- Specified by:
getData
in interfaceDataLoader<BasicItem>
exportedProperty
- The property to get the value foritem
- The item that holds the value
-