Interface Populator
- All Known Implementing Classes:
LinearPopulator, MappedPopulator, SimplePopulator
public interface Populator
- Author:
- indroneel
-
Method Summary
Modifier and TypeMethodDescriptionConverts anAnyDatato an object of the specified target type.populate(dxt.moe.model.AnyData data, String dataKey, TargetEntity entity, Object targetObj) Populates a target Java object using any data by invoking the provided method on the object.
-
Method Details
-
create
Converts anAnyDatato an object of the specified target type. The anydata encapsulates any one of a simple, linear or mapped data.- Parameters:
data- one of a simple, linear or mapped data to converttargetType- the target type to convert to- Returns:
- an object of the specified target type
- Throws:
dxt.moe.app.ConvertException- if the conversion fails
-
populate
Status populate(dxt.moe.model.AnyData data, String dataKey, TargetEntity entity, Object targetObj) throws dxt.moe.app.ConvertException Populates a target Java object using any data by invoking the provided method on the object. The anydata encapsulates any one of a simple, linear or mapped data.- Parameters:
data- one of a simple, linear or mapped datadataKey- The key associated with the any data.entity- the target entity that encapsulates the target object and the method to invoketargetObj- the target Java object to populate- Returns:
- a
Statusindicating the result of the population operation - Throws:
dxt.moe.app.ConvertException- if the population operation fails
-