|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.chrono.hci.PeriodObjectModel
public class PeriodObjectModel
This Java class defines a period object that represents a data object
(see XML-marshallable element) valid upon a certain period of time specified by a
start timestamp and an end timestamp;
This class is necessary to handle a chronology of data elements.
Note
The timestamps can
be null, meaning that the object has no defined starting and/or ending.
ChronologyModelThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="period">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="start" type="xs:dateTime"/>
<xs:attribute name="end" type="xs:dateTime"/>
</xs:complexType>
</xs:element>
| Constructor Summary | |
|---|---|
PeriodObjectModel()
Builds an empty period object. |
|
PeriodObjectModel(java.util.Date start,
java.util.Date end,
XMLMarshallable element)
Builds a full period object for an XML-marshallable element. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String name,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
com.highdeal.util.range.TimeFrame |
asTimeFrame()
Returns this object as TimeFrame object. |
XMLMarshallable |
getElement()
Returns the element for this period. |
java.util.Date |
getEnd()
Returns the end date of the period. |
java.util.Date |
getStart()
Returns the start date of the period. |
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 |
setElement(XMLMarshallable element)
Specifies the XML-marshallable element for this period. |
void |
setEnd(java.util.Date end)
Sets the end date of the period. |
void |
setStart(java.util.Date start)
Sets the start date of the period. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PeriodObjectModel()
public PeriodObjectModel(java.util.Date start,
java.util.Date end,
XMLMarshallable element)
XML-marshallable element.
start - The start date for the elementend - The end date for the elementelement - The XML-marshallable element that is valid in this period| Method Detail |
|---|
public java.util.Date getStart()
IPeriodObjectModel
getStart in interface IPeriodObjectModelnull if
the element has always been validpublic void setStart(java.util.Date start)
IPeriodObjectModel
setStart in interface IPeriodObjectModelstart - The possibly null start date of the period for
the elementpublic java.util.Date getEnd()
IPeriodObjectModel
getEnd in interface IPeriodObjectModelnull if
the element will always be validpublic void setEnd(java.util.Date end)
IPeriodObjectModel
setEnd in interface IPeriodObjectModelend - The end date of the periodpublic com.highdeal.util.range.TimeFrame asTimeFrame()
IPeriodObjectModelTimeFrame object.
asTimeFrame in interface IPeriodObjectModelTimeFrame object.public XMLMarshallable getElement()
public void setElement(XMLMarshallable element)
XML-marshallable element for this period.
element - The XML-marshallable element for this periodpublic void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current element
public void addChild(java.lang.String name,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallablename - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||