com.highdeal.hci
Class AdditionalInfoModel

java.lang.Object
  extended by com.highdeal.hci.HCIModelAdapter
      extended by com.highdeal.hci.AdditionalInfoModel
All Implemented Interfaces:
ITagNameProvider, IXMLMarshallable, XMLMapping, XMLMarshallable

public class AdditionalInfoModel
extends HCIModelAdapter
implements XMLMapping

The AdditionalInfoModel represents an information used as search criteria to find Data.

AdditionalInfoModel is an element of the Data. It is unique by its name in the Data. The content of the information is set in the value of the AdditionalInfoModel. The value can be a string, a date or a number.

The main goal of this element inside the Data is to be used as a search criteria in the Search Operations. to find Data in the system. A search criteria is applicable on the name and the value of the AdditionInfoModel. That's useful for external system.

The AdditionalInfoModel is composed of:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:complexType name="AdditionalInfoType">
    <xs:sequence>
      <xs:element name="description" type="DescriptionType" minOccurs="0" maxOccurs="1" />
      <xs:choice>
        <xs:element ref="string" />
        <xs:element ref="date" />
        <xs:element ref="number" />
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" />
  </xs:complexType>


Field Summary
static java.lang.String TAG_NAME
          The value of that constant is the XML tag name of the AdditionalInfoModel.
 
Constructor Summary
AdditionalInfoModel()
           
 
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.
 java.lang.Class<?> getClass(java.lang.String nsUri, java.lang.String tag, XMLAttributes atts)
          Returns the Java class for a specified XML tag and its attributes in a namespace.
 java.util.Date getDateValue()
          Gets the value as a Date if the type is ValueType.DATE.
 java.lang.String getDescription()
          Gets the description of the additional information.
 java.lang.String getName()
          Gets the name of the additional information defined by the user.
 java.math.BigDecimal getNumberValue()
          Gets the value as a BigDecimal if the type is ValueType.NUMBER.
 java.lang.String getStringValue()
          Gets the value as a String if the type is ValueType.STRING.
 java.lang.String getTagName()
          Gets the XML tag name of the HCI model.
 ValueType getType()
          Gets the type of the value.
 void marshalAttributes(XMLOutputter output)
          Gives an XML representation of the attributes of an object.
 void marshalChildren(XMLOutputter output)
          Gives an XML representation of the child objects of an object.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setDateValue(java.util.Date value)
          Sets the Date value and set the type to ValueType.DATE.
 void setDescription(java.lang.String description)
          Sets the description of the additional information.
 void setName(java.lang.String name)
          Sets the name of the additional information defined by the user.
 void setNumberValue(java.math.BigDecimal value)
          Sets the BigDecimal value and set the type to ValueType.NUMBER.
 void setStringValue(java.lang.String value)
          Sets a String value and set the type to ValueType.STRING.
 void setType(ValueType type)
          Sets the type of the value.
 
Methods inherited from class com.highdeal.hci.HCIModelAdapter
marshal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The value of that constant is the XML tag name of the AdditionalInfoModel.

See Also:
Constant Field Values
Constructor Detail

AdditionalInfoModel

public AdditionalInfoModel()
Method Detail

getName

public java.lang.String getName()
Gets the name of the additional information defined by the user. The name is unique within the ChargePlanModel.

Returns:
the name of the additional information defined by the user.

setName

public void setName(java.lang.String name)
Sets the name of the additional information defined by the user. The name is unique within the ChargePlanModel.

Parameters:
name - the name of the additional information defined by the user.

getDescription

public java.lang.String getDescription()
Gets the description of the additional information. Allow a better understanding about the presence of this additional information inside the ChargePlanModel.

Returns:
the description of the additional information.

setDescription

public void setDescription(java.lang.String description)
Sets the description of the additional information. Allow a better understanding about the presence of this additional information inside the ChargePlanModel.

Parameters:
description - the description of the additional information.

getType

public ValueType getType()
Gets the type of the value. When the type is null, then the value is null. When the value is null, then the type isn't necessary null.

Returns:
the type of the value

setType

public void setType(ValueType type)
Sets the type of the value. When the type given in argument is different of the internal type, then the value is set to null.

Parameters:
type - the type of the value.

getStringValue

public java.lang.String getStringValue()
Gets the value as a String if the type is ValueType.STRING.

Returns:
the value as a String if the type is ValueType.STRING, null otherwise.

setStringValue

public void setStringValue(java.lang.String value)
Sets a String value and set the type to ValueType.STRING.

Parameters:
value - the String value

getDateValue

public java.util.Date getDateValue()
Gets the value as a Date if the type is ValueType.DATE.

Returns:
the value as a Date if the type is ValueType.DATE, null otherwise.

setDateValue

public void setDateValue(java.util.Date value)
Sets the Date value and set the type to ValueType.DATE.

Parameters:
value - the Date value

getNumberValue

public java.math.BigDecimal getNumberValue()
Gets the value as a BigDecimal if the type is ValueType.NUMBER.

Returns:
the value as a BigDecimal if the type is ValueType.NUMBER, null otherwise.

setNumberValue

public void setNumberValue(java.math.BigDecimal value)
Sets the BigDecimal value and set the type to ValueType.NUMBER.

Parameters:
value - the BigDecimal value

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

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

getTagName

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

getClass

public java.lang.Class<?> getClass(java.lang.String nsUri,
                                   java.lang.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

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