public class CleanDatabaseJobModel extends SchedulableJobModel
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.
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>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME
XML tag name of this model: "cleanDatabaseJob"
|
STATUS_ACTIVE, STATUS_INACTIVE| Constructor and Description |
|---|
CleanDatabaseJobModel()
Builds an empty job model.
|
CleanDatabaseJobModel(java.lang.Long delay,
java.lang.Long pollingPeriod,
java.lang.String recurrence,
int status,
java.lang.String description)
Public constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
java.lang.Long |
getDelay()
Gets the delay.
|
java.lang.String |
getJobClassName()
Gets the class name of this job.
|
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 |
setDelay(java.lang.Long delay)
Sets the delay.
|
_getJobID, _getLastActivationDate, _setJobID, _setLastActivationDate, compareTo, getDescription, getPollingPeriod, getRecurrence, getRecurrenceAsString, getStatus, innerMarshall, innerSetAttributes, parseStatus, setDescription, setPollingPeriod, setRecurrence, setRecurrenceAsString, setStatus, statusToString, toStringpublic static final java.lang.String NAME
public CleanDatabaseJobModel()
public CleanDatabaseJobModel(java.lang.Long delay,
java.lang.Long pollingPeriod,
java.lang.String recurrence,
int status,
java.lang.String description)
delay - pollingPeriod - recurrence - status - description - public void setDelay(java.lang.Long delay)
delay - The delaypublic java.lang.Long getDelay()
public java.lang.String getJobClassName()
getJobClassName in class SchedulableJobModelpublic void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallableoutput - The XML output to marshal the object into