|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
com.konakartadmin.bl.AdminBatchBaseMgr
com.konakartadmin.bl.AdminCustomerBatchMgr
public class AdminCustomerBatchMgr
The CustomerBatchMgr
Nested Class Summary | |
---|---|
protected class |
AdminCustomerBatchMgr.CustRetList
A return object containing a list of Customers and the last customer Id processed |
Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
AdminBaseMgr.StaticData |
Field Summary |
---|
Fields inherited from class com.konakartadmin.bl.AdminBatchBaseMgr |
---|
log |
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
Constructor Summary | |
---|---|
AdminCustomerBatchMgr(KKAdminIf eng)
|
Method Summary | |
---|---|
void |
countCustomersBatch(java.lang.String logName,
java.lang.String appendLogStr)
This batch is a simple example that can be used to demonstrate how the ExecuteMultiStoreBatch class can be used to execute batch jobs for each store. |
protected int |
deleteCustomer(AdminCustomer cust,
com.konakart.bl.KKCriteria sessionCrit,
com.konakart.bl.KKCriteria sessionDelCrit,
AdminCustomerMgrIf custMgr)
|
void |
deleteTemporaryDataBatch(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String numDaysStr)
This batch is used to delete temporary data in order to keep your KonaKart store running efficiently. |
void |
expiredRewardPointBatch(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String numDaysStr)
This batch is used to expire reward points after a certain time limit, which is entered as a number of days in the numDays parameter. |
protected com.konakart.bl.KKCriteria |
getCustomerCriteria(int size,
int[] permanentCustTypes)
Get the criteria object to search for customers |
protected AdminCustomerBatchMgr.CustRetList |
getCustomers(com.konakart.bl.KKCriteria c,
int custId)
The method returns a null list within the return object when all of the customers have been read. |
protected com.konakart.bl.KKCriteria |
getSessionCriteria()
Get the criteria object to search for a customer's session |
int |
getTimeInSecs()
Utility method to return the current time in seconds |
protected java.util.List<AdminOrder> |
getUnpaidOrders(com.konakart.bl.KKCriteria c)
The method returns null when all of the orders have been read. |
protected boolean |
hasSessionExpired(int expiryInSecs)
|
java.lang.String |
removeExpiredCustomersBatch(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String recordFetchSizeStr,
java.lang.String permanentCustTypesStr)
Each existing customer is read from the database in a loop, and for each customer object we detect whether it has one or more expired session records and no non expired record. |
Methods inherited from class com.konakartadmin.bl.AdminBatchBaseMgr |
---|
executeQuery, getBoolean, getInt, getIntArray, getLogName, validateTemplate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdminCustomerBatchMgr(KKAdminIf eng) throws java.lang.Exception
eng
-
java.lang.Exception
Method Detail |
---|
public java.lang.String removeExpiredCustomersBatch(java.lang.String logName, java.lang.String appendLogStr, java.lang.String recordFetchSizeStr, java.lang.String permanentCustTypesStr) throws java.lang.Exception
logName
- The name of the log which shouldn't include the path or extension. i.e. It should
be myLog rather than /logs/myLog.txt.appendLogStr
- If set to false, a new log will be created every time the batch job is run.
Otherwise new data will be appended to the existing log. It defaults to false.recordFetchSizeStr
- It the batch involves reading many records in a loop, this determines the maximum
number read in any one loop. It defaults to 100.permanentCustTypesStr
- An array of customer types that won't be deleted. They are in a format "3-6-8"
where "-" is a delimiter between the integers.
java.lang.Exception
protected int deleteCustomer(AdminCustomer cust, com.konakart.bl.KKCriteria sessionCrit, com.konakart.bl.KKCriteria sessionDelCrit, AdminCustomerMgrIf custMgr) throws java.lang.Exception
java.lang.Exception
protected boolean hasSessionExpired(int expiryInSecs)
protected AdminCustomerBatchMgr.CustRetList getCustomers(com.konakart.bl.KKCriteria c, int custId) throws java.lang.Exception
c
-
java.lang.Exception
protected com.konakart.bl.KKCriteria getSessionCriteria()
protected com.konakart.bl.KKCriteria getCustomerCriteria(int size, int[] permanentCustTypes)
size
- permanentCustTypes
-
public void expiredRewardPointBatch(java.lang.String logName, java.lang.String appendLogStr, java.lang.String numDaysStr) throws java.lang.Exception
numDays
parameter. The expired attribute of each expired
reward points record is set to non zero by the batch.
logName
- The name of the log which shouldn't include the path or extension. i.e. It should
be myLog rather than /logs/myLog.txt.appendLogStr
- If set to false, a new log will be created every time the batch job is run.
Otherwise new data will be appended to the existing log. It defaults to false.numDaysStr
- If current time - numDays is greater than the date when the reward point
transaction was added, then the points added in that transaction are expired.
java.lang.Exception
public void deleteTemporaryDataBatch(java.lang.String logName, java.lang.String appendLogStr, java.lang.String numDaysStr) throws java.lang.Exception
logName
- The name of the log which shouldn't include the path or extension. i.e. It should
be myLog rather than /logs/myLog.txt.appendLogStr
- If set to false, a new log will be created every time the batch job is run.
Otherwise new data will be appended to the existing log. It defaults to false.numDaysStr
- kk_cookie records are deleted if current time - numDays is greater than the date
when the cookie was last read or actually created (for the case when it has never
been read).
java.lang.Exception
public int getTimeInSecs()
protected java.util.List<AdminOrder> getUnpaidOrders(com.konakart.bl.KKCriteria c) throws java.lang.Exception
c
-
java.lang.Exception
public void countCustomersBatch(java.lang.String logName, java.lang.String appendLogStr) throws java.lang.Exception
It simply counts the number of customers in the store and writes out this number.
logName
- The name of the log which shouldn't include the path or extension. i.e. It should
be myLog rather than /logs/myLog.txt.appendLogStr
- If set to false, a new log will be created every time the batch job is run.
Otherwise new data will be appended to the existing log. It defaults to false.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |