Package com.highdeal.bart.hci
Class CleanDatabaseJobModel
java.lang.Object
com.highdeal.bart.hci.SchedulableJobModel
com.highdeal.bart.hci.CleanDatabaseJobModel
- All Implemented Interfaces:
XMLMarshallable,Comparable<SchedulableJobModel>
This
Java class represents a job for cleaning the back-end database and extends the abstract class SchedulableJobModel.
You use this job to clean old CDRs, CDR acquisition sessions, and batch rating/charging sessions.
This database cleaning job is similar to a SchedulableJobModel but the delay is managed differently. Each time the job is launched, the
delay is removed from the current date. All CDRs which have an acquisition date older than this delay are deleted.
Caution
This job is not the same as the database job "purge and archive"; using both job can lead to conflicts.
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="cleanDatabaseJob">
<xs:complexType>
<xs:attribute name="pollingPeriod" type="xs:string"/>
<xs:attribute name="recurrence" type="xs:string"/>
<xs:attribute name="delay" type="xs:string"/>
<xs:attribute name="status" type="cleanDatabaseJobStatusType"/>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="jobID" type="xs:long"/>
</xs:complexType>
</xs:element><xs:simpleType name="cleanDatabaseJobStatusType">
<xs:restriction base="xs:string">
<xs:enumeration value="active"/>
<xs:enumeration value="inactive"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML tag name of this model: "cleanDatabaseJob"Fields inherited from class com.highdeal.bart.hci.SchedulableJobModel
STATUS_ACTIVE, STATUS_INACTIVE -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty job model.CleanDatabaseJobModel(Long delay, Long pollingPeriod, String recurrence, int status, String description) Public constructor -
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.getDelay()Gets the delay.Gets the class name of this job.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 delay.Methods inherited from class com.highdeal.bart.hci.SchedulableJobModel
_getJobID, _getLastActivationDate, _setJobID, _setLastActivationDate, compareTo, getDescription, getPollingPeriod, getRecurrence, getRecurrenceAsString, getStatus, innerMarshall, innerSetAttributes, parseStatus, setDescription, setPollingPeriod, setRecurrence, setRecurrenceAsString, setStatus, statusToString, toString
-
Field Details
-
NAME
XML tag name of this model: "cleanDatabaseJob"- See Also:
-
-
Constructor Details
-
CleanDatabaseJobModel
public CleanDatabaseJobModel()Builds an empty job model. -
CleanDatabaseJobModel
public CleanDatabaseJobModel(Long delay, Long pollingPeriod, String recurrence, int status, String description) Public constructor- Parameters:
delay-pollingPeriod-recurrence-status-description-
-
-
Method Details
-
setDelay
Sets the delay.- Parameters:
delay- The delay
-
getDelay
Gets the delay.- Returns:
- The delay
-
getJobClassName
Gets the class name of this job.- Specified by:
getJobClassNamein classSchedulableJobModel- Returns:
- The class name of job
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Parameters:
output- TheXML outputto marshal the object into
-