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