Class MappedPopulator

java.lang.Object
dxt.moe.lib.mod2obj.MappedPopulator
All Implemented Interfaces:
Populator

public class MappedPopulator extends Object implements Populator
Author:
indroneel
  • Constructor Details

    • MappedPopulator

      public MappedPopulator(Populators populators)
  • Method Details

    • create

      public Object create(dxt.moe.model.AnyData data, Class<?> targetType) throws dxt.moe.app.ConvertException
      /////////////////////////////////////////////////////////////////////////////////////////////
      Specified by:
      create in interface Populator
      Parameters:
      data - one of a simple, linear or mapped data to convert
      targetType - the target type to convert to
      Returns:
      an object of the specified target type
      Throws:
      dxt.moe.app.ConvertException - if the conversion fails
    • populate

      public Status populate(dxt.moe.model.AnyData data, String dataKey, TargetEntity entity, Object targetObj) throws dxt.moe.app.ConvertException
      Description copied from interface: Populator
      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.
      Specified by:
      populate in interface Populator
      Parameters:
      data - one of a simple, linear or mapped data
      dataKey - The key associated with the any data.
      entity - the target entity that encapsulates the target object and the method to invoke
      targetObj - the target Java object to populate
      Returns:
      a Status indicating the result of the population operation
      Throws:
      dxt.moe.app.ConvertException - if the population operation fails