Class CleanDatabaseJobModel

java.lang.Object
com.highdeal.bart.hci.SchedulableJobModel
com.highdeal.bart.hci.CleanDatabaseJobModel
All Implemented Interfaces:
XMLMarshallable, Comparable<SchedulableJobModel>

public class CleanDatabaseJobModel extends 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 Details

  • 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

      public void setDelay(Long delay)
      Sets the delay.
      Parameters:
      delay - The delay
    • getDelay

      public Long getDelay()
      Gets the delay.
      Returns:
      The delay
    • getJobClassName

      public String getJobClassName()
      Gets the class name of this job.
      Specified by:
      getJobClassName in class SchedulableJobModel
      Returns:
      The class name of job
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Parameters:
      atts - The XML attributes of the current element
    • addChild

      public void addChild(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.
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Parameters:
      cData - The character data to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Parameters:
      output - The XML output to marshal the object into