public class BillingMgr extends BaseMgr implements BillingMgrIf
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
the log
|
templateBaseDir
Constructor and Description |
---|
BillingMgr(KKEngIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected int |
getCount(KKCriteria c)
This method is mainly used for paging.
|
PaymentSchedule |
getPaymentSchedule(int id)
Returns the payment schedule object for the
id parameter, or Null if the payment
schedule object doesn't exist in the DB. |
Subscription[] |
getSubscriptionsPerCustomer(java.lang.String sessionId)
Returns an array of Subscription objects for a customer referred to by the sessionId
parameter.
|
int |
insertSubscription(java.lang.String sessionId,
SubscriptionIf subscription)
A Subscription object is inserted into the database.
|
int |
insertSubscription(SubscriptionIf subscription)
A Subscription object is inserted into the database.
|
protected void |
manageDataDescriptor(DataDescriptorIf dataDesc,
KKCriteria c)
Provides common code to deal with the management of the DataDescriptor.
|
Subscriptions |
searchForSubscriptionsPerCustomer(java.lang.String sessionId,
DataDescriptorIf dataDesc,
SubscriptionSearchIf subscriptionSearch)
Return subscriptions matching the search criteria.
|
protected void |
setPaymentScheduleCriteriaWithStandardAttributes(KKCriteria c,
int customerId)
Set the attributes for reading a payment schedule object
|
protected void |
setSubscriptionCriteriaWithStandardAttributes(KKCriteria c)
Common code to avoid duplication
|
void |
updateSubscription(java.lang.String sessionId,
SubscriptionIf subscription)
A Subscription object identified by the subscription passed in as a parameter is updated in
the database.
|
void |
updateSubscription(SubscriptionIf subscription)
A Subscription object identified by the subscription passed in as a parameter is updated in
the database.
|
protected void |
updateSubscriptionPrivate(java.lang.String sessionId,
SubscriptionIf subscription)
A subscription object passed in as a parameter is updated
|
protected void |
validateSubscription(SubscriptionIf subscription)
Used to validate a subscription
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNow
public BillingMgr(KKEngIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic int insertSubscription(java.lang.String sessionId, SubscriptionIf subscription) throws java.lang.Exception
The methods:
insertSubscription
in interface BillingMgrIf
sessionId
- The session id of the logged in usersubscription
- The subscription object to be insertedjava.lang.Exception
- an unexpected exceptionpublic int insertSubscription(SubscriptionIf subscription) throws java.lang.Exception
The methods:
insertSubscription
in interface BillingMgrIf
subscription
- The subscription object to be insertedjava.lang.Exception
- an unexpected exceptionpublic void updateSubscription(java.lang.String sessionId, SubscriptionIf subscription) throws java.lang.Exception
updateSubscription
in interface BillingMgrIf
sessionId
- The session id of the logged in usersubscription
- The subscription object to be updatedjava.lang.Exception
- an unexpected exceptionpublic void updateSubscription(SubscriptionIf subscription) throws java.lang.Exception
updateSubscription
in interface BillingMgrIf
subscription
- The subscription object to be updatedjava.lang.Exception
- an unexpected exceptionprotected void updateSubscriptionPrivate(java.lang.String sessionId, SubscriptionIf subscription) throws java.lang.Exception
sessionId
- the sessionIdsubscription
- the subscriptionjava.lang.Exception
- an unexpected exceptionprotected void validateSubscription(SubscriptionIf subscription) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
subscription
- the subscriptioncom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public PaymentSchedule getPaymentSchedule(int id) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
id
parameter, or Null if the payment
schedule object doesn't exist in the DB.getPaymentSchedule
in interface BillingMgrIf
id
- The id of the payment schedule objectcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected void setPaymentScheduleCriteriaWithStandardAttributes(KKCriteria c, int customerId)
c
- the ccustomerId
- the customerIdpublic Subscription[] getSubscriptionsPerCustomer(java.lang.String sessionId) throws java.lang.Exception
getSubscriptionsPerCustomer
in interface BillingMgrIf
sessionId
- the sessionIdjava.lang.Exception
- an unexpected exceptionprotected void setSubscriptionCriteriaWithStandardAttributes(KKCriteria c)
c
- the cpublic Subscriptions searchForSubscriptionsPerCustomer(java.lang.String sessionId, DataDescriptorIf dataDesc, SubscriptionSearchIf subscriptionSearch) throws java.lang.Exception
searchForSubscriptionsPerCustomer
in interface BillingMgrIf
sessionId
- the sessionIddataDesc
- the dataDescsubscriptionSearch
- the subscriptionSearchjava.lang.Exception
- an unexpected exceptionprotected int getCount(KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the corg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected void manageDataDescriptor(DataDescriptorIf dataDesc, KKCriteria c)
dataDesc
- the dataDescc
- the cCopyright © 2018 DS Data Systems UK Ltd.