Class MappingTableRowModel

java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.mappingtable.hci.MappingTableRowModel
All Implemented Interfaces:
com.highdeal.filter.domain.ISearchableObject, ITagNameProvider, IXMLMarshallable, XMLMapping, XMLMarshallable, com.highdeal.mappingtable.domain.IMappingTableRowDuplicateCheck

public class MappingTableRowModel extends HCIModelAdapter implements XMLMapping, com.highdeal.filter.domain.ISearchableObject, com.highdeal.mappingtable.domain.IMappingTableRowDuplicateCheck
This Java class represents a row in a mapping table (or in a subscriber mapping table); This row is identified by a unique key and is defined for a certain period of time.

Note

A row includes two sets of data values:

  • A first set that corresponds to the input columns declared in the reference mapping table class
  • A second set that corresponds to the output columns declared in the reference table class.
All these values are organized in a sequence named 'column'.

Its validity period is defined with the start and end dates.

Important Note

You can manage different versions of a row in a table.

Related Operations

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:complexType name="MappingTableRow">
   <xs:sequence>
     <xs:element name="column" type="MappingTableColumn" minOccurs="0" maxOccurs="unbounded" />  <!-- input/output data values in the row -->
   </xs:sequence>
   <xs:attribute name="id" type="xs:string" />  <!-- identifier of a row -->
   <xs:attribute name="version" type="xs:long" use="optional" />
   <xs:attribute name="start" type="xs:dateTime" />
   <xs:attribute name="end" type="xs:dateTime" />
 </xs:complexType>

 <xs:element name="mappingTableRow" type="MappingTableRow"/>

  • Field Details

  • Constructor Details

    • MappingTableRowModel

      public MappingTableRowModel()
      Default MappingTableRow model.
  • Method Details

    • getId

      public String getId()
      Gets the identifier of the row.
      Specified by:
      getId in interface com.highdeal.mappingtable.domain.IMappingTableRowDuplicateCheck
      Returns:
      A String that contains the identifier of the row
    • setId

      public void setId(String id)
      Sets the identifier of the row.
      Parameters:
      id - The identifier of the row
    • getStartDate

      public Date getStartDate()
      Gets the start date of the row.
      Specified by:
      getStartDate in interface com.highdeal.mappingtable.domain.IMappingTableRowDuplicateCheck
      Returns:
      A date representing the start date of the row
    • setStartDate

      public void setStartDate(Date startDate)
      Sets the start date of the row.
      Parameters:
      startDate - The date from when the row begin
    • getEndDate

      public Date getEndDate()
      Gets the end date of the row.
      Specified by:
      getEndDate in interface com.highdeal.mappingtable.domain.IMappingTableRowDuplicateCheck
      Returns:
      A Date that indicate when the row finish
    • setEndDate

      public void setEndDate(Date endDate)
      Sets the end date of the row.
      Parameters:
      endDate - The date when the row is finished
    • getVersion

      public Long getVersion()
      Gets the version of the mapping table row. It is incremented by one each time the mapping table row is modified.
      Returns:
      the version of the mapping table row
    • setVersion

      public void setVersion(Long version)
      Sets the version of the mapping table row.
      Parameters:
      version - the version of the mapping table row
    • getColumns

      public List<MappingTableColumnModel> getColumns()
      Gets all the columns contained in the row.
      Returns:
      A list that contains all the column values of the row
    • getTagName

      public String getTagName()
      Description copied from interface: ITagNameProvider
      Gets the XML tag name of the HCI model.
      Specified by:
      getTagName in interface ITagNameProvider
      Returns:
      The XML tag name
    • 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
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • marshalAttributes

      public void marshalAttributes(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the attributes of an object.
      Specified by:
      marshalAttributes in interface IXMLMarshallable
      Parameters:
      output - The XML output to marshal the object attributes into
    • marshalChildren

      public void marshalChildren(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the child objects of an object.
      Specified by:
      marshalChildren in interface IXMLMarshallable
      Parameters:
      output - The XML output to marshal the child objects into
    • getClass

      public Class<?> getClass(String nsUri, String tag, XMLAttributes atts)
      Description copied from interface: XMLMapping
      Returns the Java class for a specified XML tag and its attributes in a namespace.
      Specified by:
      getClass in interface XMLMapping
      Parameters:
      nsUri - The unique resource identifier of the namespace of the XML tag
      tag - The local part of the XML tag
      atts - The attributes of the XML tag
      Returns:
      A Java class with a default constructor
    • getValue

      public Object getValue(AttributeDescriptionModel field)
      Specified by:
      getValue in interface com.highdeal.filter.domain.ISearchableObject
    • getOid

      public String getOid()
      Specified by:
      getOid in interface com.highdeal.filter.domain.ISearchableObject
    • export

      public XMLMarshallable export()
      Specified by:
      export in interface com.highdeal.filter.domain.ISearchableObject