Class OutPropertyUpdateComponentModel

java.lang.Object
com.highdeal.pnr.hci.RateComponentModel
com.highdeal.pnr.hci.OutPropertyUpdateComponentModel
All Implemented Interfaces:
XMLMarshallable, ContextualNode

public class OutPropertyUpdateComponentModel extends RateComponentModel
This class represents a rate component that updates a Macro ouput property.
  • Field Details

  • Constructor Details

    • OutPropertyUpdateComponentModel

      public OutPropertyUpdateComponentModel()
      Builds an empty OutPropertyUpdateComponentModel.
    • OutPropertyUpdateComponentModel

      public OutPropertyUpdateComponentModel(String propertyName, String outPropertyName, int outPropertyType, BigDecimal outDefaultNumber, Date outDefaultDate, String outDefaultString, boolean updateBeforeChild)
      Builds an OutPropertyUpdateComponentModel. See setOutPropertyType
      Parameters:
      propertyName - the source property name.
      outPropertyName - the output property name.
      outPropertyType - the output property type.
      outDefaultNumber - the output default Number value.
      outDefaultDate - the output default Date value.
      outDefaultString - the output default String value.
      updateBeforeChild - true if the update is performed before to execute the child.
  • Method Details

    • setPropertyName

      public void setPropertyName(String name)
      Sets the property name.
      Parameters:
      name - the property name.
    • getPropertyName

      public String getPropertyName()
      Gets the property name.
      Returns:
      the property name.
    • setOutPropertyName

      public void setOutPropertyName(String name)
      Sets the out property name.
      Parameters:
      name - the out property name.
    • getOutPropertyName

      public String getOutPropertyName()
      Gets the out property name.
      Returns:
      the out property name.
    • setOutPropertyType

      public void setOutPropertyType(int type)
      Sets the out property type. Allowed values are :
      Parameters:
      type - the out property.
    • getOutPropertyType

      public int getOutPropertyType()
      Gets the out property type. Returned values are :
      Returns:
      the out property.
    • getNumberValue

      public BigDecimal getNumberValue()
      Gets the number value.
      Returns:
      the number value.
    • setNumberValue

      public void setNumberValue(BigDecimal number)
      Sets the number value.
      Parameters:
      number - the number value.
    • getStringValue

      public String getStringValue()
      Gets the string value.
      Returns:
      the string value.
    • setStringValue

      public void setStringValue(String s)
      Sets the string value.
      Parameters:
      s - the string value.
    • getDateValue

      public Date getDateValue()
      Gets the date value.
      Returns:
      the date value.
    • setDateValue

      public void setDateValue(Date d)
      Sets the date value.
      Parameters:
      d - the date value.
    • isUpdateBeforeChild

      public boolean isUpdateBeforeChild()
    • setUpdateBeforeChild

      public void setUpdateBeforeChild(boolean updateBeforeChild)
    • getMaxChildCount

      public int getMaxChildCount()
      Gets the maximum child count (1). Only one child is allowed for this component.
      Specified by:
      getMaxChildCount in class RateComponentModel
      Returns:
      the maximum child count.
    • checkValidity

      public boolean checkValidity()
      Returns true if the component is valid. Component is valid if all the following conditions are met:
      • The out property is not null and is valid in the context with the specified type,
      • The source property is not null and is valid in the context with the specified type,
      • The default value for the specified type is not null.
      Specified by:
      checkValidity in class RateComponentModel
      Returns:
      true if the component is valid, false otherwise.
    • getPropertyReferences

      public List<com.highdeal.pnr.hci.PropertyReference> getPropertyReferences()
      Description copied from class: RateComponentModel
      Returns the list of the properties that are used in this component.
      Specified by:
      getPropertyReferences in class RateComponentModel
      Returns:
      the list of the properties that are used in this component
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Specified by:
      addChild in interface XMLMarshallable
      Overrides:
      addChild in class RateComponentModel
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Specified by:
      marshal in interface XMLMarshallable
      Overrides:
      marshal in class RateComponentModel
      Parameters:
      output - The XML output to marshal the object into