public class MapValueLoader extends Object implements DataLoader<BasicItem>
Modifier and Type | Field and Description |
---|---|
private Object |
mapKey |
private Metadata.PropertyPath<BasicItem,Map<?,?>> |
propertyPath |
Constructor and Description |
---|
MapValueLoader(Metadata.PropertyPath<BasicItem,Map<?,?>> propertyPath,
Object mapKey)
Load values from a map.
|
Modifier and Type | Method and Description |
---|---|
Object |
getData(DbControl dc,
ExportedProperty exportedProperty,
BasicItem item)
Get the value for the specified property.
|
private final Metadata.PropertyPath<BasicItem,Map<?,?>> propertyPath
private final Object mapKey
public MapValueLoader(Metadata.PropertyPath<BasicItem,Map<?,?>> propertyPath, Object mapKey)
propertyPath
- Property path to the map collectionmapKey
- The key to use when loading the valuepublic Object getData(DbControl dc, ExportedProperty exportedProperty, BasicItem item)
DataLoader
getData
in interface DataLoader<BasicItem>
exportedProperty
- The property to get the value foritem
- The item that holds the value