Package com.highdeal.pnr.hci
Class BatchRatingGroupModel
java.lang.Object
com.highdeal.pnr.hci.BatchRatingGroupModel
- All Implemented Interfaces:
XMLMarshallable,Comparable<BatchRatingGroupModel>
public class BatchRatingGroupModel
extends Object
implements XMLMarshallable, Comparable<BatchRatingGroupModel>
This
Java class represents a batch rating group configured in the SAP CC.
The SAP CC system may handle offline and online charging services at the same time. Some subscriptions are charged in batch
using the SAP CC BART Server system whereas others may be charged using other mechanism (online mediation).
Batch rating group is used to represent a set of hybrid and/or
offline subscriptions that share common rating
(and implicitly billing) cycles.XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="batchRatingGroup">
<xs:complexType>
<xs:attribute name="id" type="xs:integer" />
<xs:attribute name="code" type="xs:string" />
<xs:attribute name="description" type="xs:string" />
</xs:complexType>
</xs:element>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final shortstatic final shortstatic final StringThe XML tag name: "batchRatingGroup" -
Constructor Summary
ConstructorsConstructorDescriptionBatchRatingGroupModel(short batchRatingGroupId, String code, String description) Creates a batch rating group uniquely identified by its batch rating group identifier (shared with SAP CC BART Server, if available) and its batch rating group code. -
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.intcompareTo(BatchRatingGroupModel batchRatingGroup) final StringReturns the batch rating group code that must be not empty and must be unique.final StringReturns the batch rating group description that must be not empty.final shortReturns the batch rating group identifier that must be unique.static StringgetName()Gets the name of the related XML element.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the batch rating group code that must be not empty and must be unique.voidsetBatchRatingGroupDescription(String description) Sets the batch rating group description that must be not empty.voidsetBatchRatingGroupId(short id) Sets the batch rating group identifier that must be unique.toString()booleanvalidate()Checks that identifier, name and description have been correctly filled in.
-
Field Details
-
OPERATION_NAME
The XML tag name: "batchRatingGroup"- See Also:
-
BATCH_RATING_GROUP_UNSET
public static final short BATCH_RATING_GROUP_UNSET- See Also:
-
DEFAULT_BATCH_RATING_GROUP_ID
public static final short DEFAULT_BATCH_RATING_GROUP_ID- See Also:
-
MAX_BATCH_RATING_GROUP_ID
public static final short MAX_BATCH_RATING_GROUP_ID- See Also:
-
-
Constructor Details
-
BatchRatingGroupModel
public BatchRatingGroupModel() -
BatchRatingGroupModel
Creates a batch rating group uniquely identified by its batch rating group identifier (shared with SAP CC BART Server, if available) and its batch rating group code.- Parameters:
batchRatingGroupId- The unique identifier of the batch rating group. This identifier must be greater thanDEFAULT_BATCH_RATING_GROUP_IDand smaller thanMAX_BATCH_RATING_GROUP_ID.code- The code of the batch rating group, must not be emptydescription- The description of the batch rating group, must not be empty
-
-
Method Details
-
getName
Gets the name of the related XML element.- Returns:
- The name
-
getBatchRatingGroupId
public final short getBatchRatingGroupId()Returns the batch rating group identifier that must be unique.- Returns:
- The batch rating group identifier
-
setBatchRatingGroupId
public void setBatchRatingGroupId(short id) Sets the batch rating group identifier that must be unique.- Parameters:
id- The batch rating group identifier
-
getBatchRatingGroupCode
Returns the batch rating group code that must be not empty and must be unique.- Returns:
- The batch rating group code
-
setBatchRatingGroupCode
Sets the batch rating group code that must be not empty and must be unique.- Parameters:
code- The batch rating group code
-
getBatchRatingGroupDescription
Returns the batch rating group description that must be not empty.- Returns:
- The batch rating group description
-
setBatchRatingGroupDescription
Sets the batch rating group description that must be not empty.- Parameters:
description- The batch rating group description
-
validate
Checks that identifier, name and description have been correctly filled in.- Returns:
trueif the batch rating group is valid,falseotherwise- Throws:
IllegalStateException
-
compareTo
- Specified by:
compareToin interfaceComparable<BatchRatingGroupModel>
-
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
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-
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
-
toString
-