Package com.highdeal.hci
Class AdditionalInfoModel
java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.hci.AdditionalInfoModel
- All Implemented Interfaces:
ITagNameProvider,IXMLMarshallable,XMLMapping,XMLMarshallable
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:
- A
namewhich identifies an unique additional information inside theData. - A
descriptionallowing a better understanding about the presence of this additional information inside theData. - A value:
- A string value
- A date value
- A number value
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an additional information.AdditionalInfoModel(String name, DescriptionModel description, ValueType type, Object value) Creates an additional information. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Class<?>getClass(String nsUri, String tag, XMLAttributes atts) Returns theJava classfor a specifiedXML tagand its attributes in a namespace.Gets the description of the additional information.getName()Gets thenameof the additional information defined by the user.Gets the XML tag name of the HCI model.getType()Gets the type of the value.voidmarshalAttributes(XMLOutputter output) Gives an XML representation of the attributes of an object.voidmarshalChildren(XMLOutputter output) Gives an XML representation of the child objects of an object.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetDateValue(Date value) voidsetDescription(String description) Sets the description of the additional information.voidSets thenameof the additional information defined by the user.voidsetNumberValue(BigDecimal value) voidsetStringValue(String value) voidSets the type of the value.Methods inherited from class com.highdeal.hci.HCIModelAdapter
marshal
-
Field Details
-
TAG_NAME
The value of that constant is the XML tag name of theAdditionalInfoModel.- See Also:
-
-
Constructor Details
-
AdditionalInfoModel
public AdditionalInfoModel()Creates an additional information. -
AdditionalInfoModel
Creates an additional information.- Parameters:
name- thenameof the additional informationdescription- the description of the additional informationtype- the type of the value of the additional informationvalue- the value of the additional information
-
-
Method Details
-
getName
Gets thenameof the additional information defined by the user. Thenameis unique within theChargePlanModel.- Returns:
- the name of the additional information defined by the user.
-
setName
Sets thenameof the additional information defined by the user. Thenameis unique within theChargePlanModel.- Parameters:
name- the name of the additional information defined by the user.
-
getDescription
Gets the description of the additional information. Allow a better understanding about the presence of this additional information inside theChargePlanModel.- Returns:
- the description of the additional information.
-
setDescription
Sets the description of the additional information. Allow a better understanding about the presence of this additional information inside theChargePlanModel.- Parameters:
description- the description of the additional information.
-
getType
Gets the type of the value. When the type isnull, then the value isnull. When the value isnull, then the type isn't necessarynull.- Returns:
- the type of the value
-
setType
Sets the type of the value. When the type given in argument is different of the internaltype, then the value is set tonull.- Parameters:
type- the type of the value.
-
getStringValue
- Returns:
- the value as a
Stringif thetypeisValueType.STRING,nullotherwise.
-
setStringValue
- Parameters:
value- theStringvalue
-
getDateValue
- Returns:
- the value as a
Dateif thetypeisValueType.DATE,nullotherwise.
-
setDateValue
- Parameters:
value- theDatevalue
-
getNumberValue
- Returns:
- the value as a
BigDecimalif thetypeisValueType.NUMBER,nullotherwise.
-
setNumberValue
- Parameters:
value- theBigDecimalvalue
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
marshalAttributes
Description copied from interface:IXMLMarshallableGives an XML representation of the attributes of an object.- Specified by:
marshalAttributesin interfaceIXMLMarshallable- Parameters:
output- TheXML outputto marshal the object attributes into
-
marshalChildren
Description copied from interface:IXMLMarshallableGives an XML representation of the child objects of an object.- Specified by:
marshalChildrenin interfaceIXMLMarshallable- Parameters:
output- TheXML outputto marshal the child objects into
-
getTagName
Description copied from interface:ITagNameProviderGets the XML tag name of the HCI model.- Specified by:
getTagNamein interfaceITagNameProvider- Returns:
- The XML tag name
-
getClass
Description copied from interface:XMLMappingReturns theJava classfor a specifiedXML tagand its attributes in a namespace.- Specified by:
getClassin interfaceXMLMapping- Parameters:
nsUri- The unique resource identifier of the namespace of the XML tagtag- The local part of the XML tagatts- The attributes of the XML tag- Returns:
- A
Java classwith a default constructor
-