Class ModelObjectTranslator

java.lang.Object
com.powerupsoftwareengineering.java.immutable.web.model.translator.ModelObjectTranslator

public final class ModelObjectTranslator extends Object
The ModelObjectTranslator class is a translator that will convert model objects between the domain model and web model representations.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    fromXml(com.powerupsoftwareengineering.java.immutable.jaxb.JaxbModelObject jaxbModelObject, com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs.Builder<?> builder)
    Translates the fields from the web model object representation to the domain object representation.
    static void
    toXml(com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs modelObject, com.powerupsoftwareengineering.java.immutable.jaxb.JaxbModelObject jaxbModelObject)
    Translates the fields from the domain model representation to the web model object representation.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • fromXml

      public static void fromXml(com.powerupsoftwareengineering.java.immutable.jaxb.JaxbModelObject jaxbModelObject, com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs.Builder<?> builder)
      Translates the fields from the web model object representation to the domain object representation.
      Parameters:
      jaxbModelObject - Web model object representation to be translated.
      builder - Builder for the domain object representation to be populated.
    • toXml

      public static void toXml(com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs modelObject, com.powerupsoftwareengineering.java.immutable.jaxb.JaxbModelObject jaxbModelObject)
      Translates the fields from the domain model representation to the web model object representation.
      Parameters:
      modelObject - Domain model object representation to be translated.
      jaxbModelObject - Web object representation to be populated.