Class SubscriptionSnapshotHolderModel

java.lang.Object
com.highdeal.pnr.hci.SubscriptionSnapshotHolderModel
All Implemented Interfaces:
XMLMarshallable

public class SubscriptionSnapshotHolderModel extends Object implements XMLMarshallable
This class represents either the root subscription or a sub-subscription inside a counter snapshot, and contains the list of included counters.

It contains the following information:

  • The code of the subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions).
  • The last snapshot date of the subscription (only for root subscriptions).
  • The maximum number of days in the past (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot) (only for root subscriptions).
  • The last export date of the subscription (only for root subscriptions) - Deprecated since version 2.0 of SAP CC

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="subscriptionSnapshotHolder">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="counter" minOccurs="0" maxOccurs="unbounded" />
       <xs:element ref="subscriptionSnapshotHolder" minOccurs="0" maxOccurs="unbounded" />
       <xs:element ref="chargeSnapshotHolder" minOccurs="0" maxOccurs="unbounded" />
     </xs:sequence>
     <xs:attribute name="code" type="xs:string" />
     <xs:attribute name="lastSnapshotDate" type="xs:dateTime" />
     <xs:attribute name="lastSnapshotDays" type="xs:int" />
     <xs:attribute name="lastExportDate" type="xs:dateTime" />
   </xs:complexType>
 </xs:element>

  • Field Details

  • Constructor Details

  • Method Details

    • getCode

      public String getCode()
      Gets the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions).
      Returns:
      the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions)
    • setCode

      public void setCode(String code)
      Sets the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions).
      Parameters:
      code - the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions)
    • getLastSnapshotDate

      public Date getLastSnapshotDate()
      Gets the last snapshot date of the subscription (only for root subscriptions).
      Returns:
      the last snapshot date of the subscription
    • setLastSnapshotDate

      public void setLastSnapshotDate(Date lastSnapshotDate)
      Sets the last snapshot date of the subscription (only for root subscriptions).
      Parameters:
      lastSnapshotDate - the last snapshot date of the subscription
    • getLastSnapshotDays

      public int getLastSnapshotDays()
      Gets the maximum number of days in the past (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot) (only for root subscriptions).
      Returns:
      the maximum number of days in the past for the subscription snapshot holder
    • setLastSnapshotDays

      public void setLastSnapshotDays(int lastSnapshotDays)
      Sets the maximum number of days in the past (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot) (only for root subscriptions).
      Parameters:
      lastSnapshotDays - the maximum number of days in the past for the subscription snapshot holder
    • getLastExportDate

      @Deprecated public Date getLastExportDate()
      Deprecated.
      Deprecated since version 2.0 of SAP CC
      Gets the last export date of the associated subscription
      Returns:
      the last export date of the associated subscription
    • setLastExportDate

      @Deprecated public void setLastExportDate(Date lastExportDate)
      Deprecated.
      Deprecated since version 2.0 of SAP CC
      Sets the last export date of the associated subscription
      Parameters:
      lastExportDate - the last export date of the associated subscription
    • getCounters

      public List<CounterModel> getCounters()
      Gets the list of counters contained in the snapshot holder.
      Returns:
      the list of counters contained in the snapshot holder
    • setCounters

      public void setCounters(List<CounterModel> counters)
      Sets the list of counters contained in the snapshot holder.
      Parameters:
      counters - the list of counters contained in the snapshot holder
    • addCounter

      public void addCounter(CounterModel counter)
      Add a counter to the snapshot holder
      Parameters:
      counter - the counter to add to the snasphot holder
    • getSubscriptionsSnapshotHolders

      public List<SubscriptionSnapshotHolderModel> getSubscriptionsSnapshotHolders()
      Gets the list of subscription snapshot holders (for sub-subscriptions) contained in the snapshot holder.
      Returns:
      the list of subscription snapshot holders contained in the snapshot holder.
    • setSubscriptionsSnapshotHolders

      public void setSubscriptionsSnapshotHolders(List<SubscriptionSnapshotHolderModel> subscriptionsSnapshotHolders)
      Sets the list of subscription snapshot holders (for sub-subscriptions) contained in the snapshot holder.
      Parameters:
      subscriptionsSnapshotHolders - the list of subscription snapshot holders contained in the snapshot holder.
    • addSubscriptionSnapshotHolder

      public void addSubscriptionSnapshotHolder(SubscriptionSnapshotHolderModel subscriptionsSnapshotHolder)
      Adds a subscription snapshot holder to the subscription snapshot holder
      Parameters:
      subscriptionsSnapshotHolder - the subscription snapshot holder to add
    • getChargesSnapshotHolders

      public List<ChargeSnapshotHolderModel> getChargesSnapshotHolders()
      Gets the list of charge snapshot holders (for charge activations) contained in the snapshot holder.
      Returns:
      the list of charge snapshot holders contained in the snapshot holder
    • setChargesSnapshotHolders

      public void setChargesSnapshotHolders(List<ChargeSnapshotHolderModel> chargesSnapshotHolders)
      Sets the list of charge snapshot holders (for charge activations) contained in the snapshot holder.
      Parameters:
      chargesSnapshotHolders - the list of charge snapshot holders contained in the snapshot holder
    • addChargeSnapshotHolder

      public void addChargeSnapshotHolder(ChargeSnapshotHolderModel chargeSnapshotHolder)
      Adds a charge snapshot holder to the subscription snapshot holder
      Parameters:
      chargeSnapshotHolder - the charge snapshot holder to add
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • 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.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • setAttributes

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

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