com.highdeal.pnr.hci
Class TranslationInstanceModel

java.lang.Object
  extended by com.highdeal.pnr.hci.TranslationInstanceModel
All Implemented Interfaces:
XMLMarshallable

public class TranslationInstanceModel
extends java.lang.Object
implements XMLMarshallable

This class represents a translation table instance.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="tableInstance">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="row" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="tableCode" type="xs:string" use="required"/>
     <xs:attribute name="name" type="xs:string"/>
     <xs:attribute name="isPrivate" type="xs:boolean" default="false"/>
     <xs:attribute name="instanceName" type="xs:string"/>
   </xs:complexType>
 </xs:element>


Constructor Summary
TranslationInstanceModel()
          Builds an empty TranslationInstanceModel.
TranslationInstanceModel(java.lang.String tableCode)
          Builds a TranslationInstanceModel from a translation table code.
TranslationInstanceModel(java.lang.String name, java.lang.String tableCode, boolean isPrivate, java.lang.String instanceName)
          Builds a TranslationInstanceModel from a translation table code.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 boolean getIfDatesAreUsed()
           
 java.lang.String getInstanceName()
          Returns the mapped instance name.
 java.lang.String getName()
          Returns the name of the instance.
 java.util.Vector<TranslationRowModel> getRows()
          Gets the rows.
 java.lang.String getTableCode()
          Gets the table code.
 boolean isPrivate()
          Returns the visibility of the instance.
 boolean isValid(TranslationTableModel tm)
          Returns true if the translation table is valid.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setInstanceName(java.lang.String instanceName)
          Sets the mapped instance name.
 void setName(java.lang.String name)
          Sets the name of the instance.
 void setPrivate(boolean isPrivate)
          Sets the instance visibility.
 void setTableCode(java.lang.String code)
          Sets the table code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslationInstanceModel

public TranslationInstanceModel()
Builds an empty TranslationInstanceModel.


TranslationInstanceModel

public TranslationInstanceModel(java.lang.String name,
                                java.lang.String tableCode,
                                boolean isPrivate,
                                java.lang.String instanceName)
Builds a TranslationInstanceModel from a translation table code.

Parameters:
name -
tableCode -
isPrivate -
instanceName -

TranslationInstanceModel

public TranslationInstanceModel(java.lang.String tableCode)
Builds a TranslationInstanceModel from a translation table code.

Parameters:
tableCode -
Method Detail

getTableCode

public java.lang.String getTableCode()
Gets the table code.

Returns:
the table code.

setTableCode

public void setTableCode(java.lang.String code)
Sets the table code.

Parameters:
code - the table code.

getName

public java.lang.String getName()
Returns the name of the instance.

Returns:
the name of the instance.

setName

public void setName(java.lang.String name)
Sets the name of the instance.

Parameters:
name - the name of the instance.

getRows

public java.util.Vector<TranslationRowModel> getRows()
Gets the rows.

Returns:
a Vector of TranslationRowModel representing rows.

getInstanceName

public java.lang.String getInstanceName()
Returns the mapped instance name.

Returns:
the name of the mapped instance.

setInstanceName

public void setInstanceName(java.lang.String instanceName)
Sets the mapped instance name.

Parameters:
instanceName - the name of the mapped instance.

isPrivate

public boolean isPrivate()
Returns the visibility of the instance.

Returns:
true if the instance is private.

setPrivate

public void setPrivate(boolean isPrivate)
Sets the instance visibility.

Parameters:
isPrivate - the level of the visibility.

isValid

public boolean isValid(TranslationTableModel tm)
Returns true if the translation table is valid.

Parameters:
tm - the translation table Model.
Returns:
true if the translation table is valid, false otherwise.

getIfDatesAreUsed

public boolean getIfDatesAreUsed()

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

addCharacterData

public void addCharacterData(java.lang.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

addChild

public void addChild(java.lang.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

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
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)