|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakart.bl.BaseMgr
com.konakart.bl.RewardPointMgr
public class RewardPointMgr
Reward point manager - Uses RewardPointCore for business logic
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Fields inherited from class com.konakart.bl.BaseMgr |
|---|
templateBaseDir |
| Constructor Summary | |
|---|---|
RewardPointMgr(KKEngIf eng)
Constructor |
|
| Method Summary | |
|---|---|
int |
addPoints(int customerId,
int points,
java.lang.String code,
java.lang.String description)
Adds a number of reward points to the total for customer identified by the sessionId parameter. |
int |
addPoints(java.lang.String sessionId,
int points,
java.lang.String code,
java.lang.String description)
Adds a number of reward points to the total for customer identified by the sessionId parameter. |
int |
deletePoints(int customerId,
int points,
java.lang.String code,
java.lang.String description)
Deletes a number of reward points from the total for the customer identified by the sessionId parameter. |
int |
deletePoints(java.lang.String sessionId,
int points,
java.lang.String code,
java.lang.String description)
Deletes a number of reward points from the total for the customer identified by the sessionId parameter. |
void |
deleteReservedPoints(int customerId,
int reservationId,
java.lang.String code,
java.lang.String description)
Verifies that the reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. |
void |
deleteReservedPoints(java.lang.String sessionId,
int reservationId,
java.lang.String code,
java.lang.String description)
Verifies that the reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. |
int |
freeReservedPoints(int customerId,
int reservationId)
Verifies that the reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. |
int |
freeReservedPoints(java.lang.String sessionId,
int reservationId)
Verifies that the reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. |
protected int |
getCount(org.apache.torque.util.Criteria c)
This method is mainly used for paging. |
protected int |
getReservationId()
Get a unique reservation id from the counter table |
RewardPoints |
getRewardPoints(java.lang.String sessionId,
DataDescriptorIf dataDesc)
Gets an array of reward point objects for a customer identified by the sessionId
parameter. |
int |
pointsAvailable(int customerId)
Calculates the number of reward points available for the customer identified by the sessionId parameter. |
int |
pointsAvailable(java.lang.String sessionId)
Calculates the number of reward points available for the customer identified by the sessionId parameter. |
int |
reservePoints(int customerId,
int points)
Removes a number of reward points from the total for the customer identified by the sessionId parameter. |
int |
reservePoints(java.lang.String sessionId,
int points)
Removes a number of reward points from the total for the customer identified by the sessionId parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public RewardPointMgr(KKEngIf eng)
throws java.lang.Exception
eng -
java.lang.Exception| Method Detail |
|---|
public int pointsAvailable(java.lang.String sessionId)
throws java.lang.Exception
sessionId parameter.
pointsAvailable in interface RewardPointMgrIfsessionId -
java.lang.Exception
public int pointsAvailable(int customerId)
throws java.lang.Exception
sessionId parameter.
pointsAvailable in interface RewardPointMgrIfcustomerId -
java.lang.Exception
public int addPoints(java.lang.String sessionId,
int points,
java.lang.String code,
java.lang.String description)
throws java.lang.Exception
sessionId parameter.
addPoints in interface RewardPointMgrIfsessionId - points - code - An optional code to categorize the reason for awarding the pointsdescription - An optional description describing why the points were awarded
java.lang.Exception
public int addPoints(int customerId,
int points,
java.lang.String code,
java.lang.String description)
throws java.lang.Exception
sessionId parameter.
addPoints in interface RewardPointMgrIfcustomerId - points - code - An optional code to categorize the reason for awarding the pointsdescription - An optional description describing why the points were awarded
java.lang.Exception
public int deletePoints(java.lang.String sessionId,
int points,
java.lang.String code,
java.lang.String description)
throws java.lang.Exception
sessionId parameter.
deletePoints in interface RewardPointMgrIfsessionId - points - code - An optional code to categorize the reason for redeeming the pointsdescription - An optional description describing how the points were redeemed
java.lang.Exception
public int deletePoints(int customerId,
int points,
java.lang.String code,
java.lang.String description)
throws java.lang.Exception
sessionId parameter.
deletePoints in interface RewardPointMgrIfcustomerId - points - code - An optional code to categorize the reason for redeeming the pointsdescription - An optional description describing how the points were redeemed
java.lang.Exception
public int reservePoints(java.lang.String sessionId,
int points)
throws java.lang.Exception
sessionId parameter. The removed points are not deleted but reserved, so that
they are no longer available for spending but may be deleted once the order has been paid for
or shipped. If the order is never fulfilled, then the reserved points may be freed and
returned to the available total.
reservePoints in interface RewardPointMgrIfsessionId - points -
java.lang.Exception
public int reservePoints(int customerId,
int points)
throws java.lang.Exception
sessionId parameter. The removed points are not deleted but reserved, so that
they are no longer available for spending but may be deleted once the order has been paid for
or shipped. If the order is never fulfilled, then the reserved points may be freed and
returned to the available total.
reservePoints in interface RewardPointMgrIfcustomerId - points -
java.lang.Exception
public void deleteReservedPoints(java.lang.String sessionId,
int reservationId,
java.lang.String code,
java.lang.String description)
throws java.lang.Exception
reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. The reserved points are normally
deleted once the order has been paid for or shipped. If the order is never fulfilled, then
the reserved points may be freed and returned to the available total. Once deleted. the
points can no longer be returned to the total.
deleteReservedPoints in interface RewardPointMgrIfsessionId - reservationId - code - An optional code to categorize the reason for redeeming the pointsdescription - An optional description describing how the points were redeemed
java.lang.Exception
public void deleteReservedPoints(int customerId,
int reservationId,
java.lang.String code,
java.lang.String description)
throws java.lang.Exception
reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. The reserved points are normally
deleted once the order has been paid for or shipped. If the order is never fulfilled, then
the reserved points may be freed and returned to the available total. Once deleted. the
points can no longer be returned to the total.
deleteReservedPoints in interface RewardPointMgrIfcustomerId - reservationId - code - An optional code to categorize the reason for redeeming the pointsdescription - An optional description describing how the points were redeemed
java.lang.Exception
public int freeReservedPoints(java.lang.String sessionId,
int reservationId)
throws java.lang.Exception
reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. The reserved points may be freed
and returned to the available total using this API call. The method checks to see whether
some or all of the points have expired while they were in the reserved state.
freeReservedPoints in interface RewardPointMgrIfsessionId - reservationId -
java.lang.Exception
public int freeReservedPoints(int customerId,
int reservationId)
throws java.lang.Exception
reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. The reserved points may be freed
and returned to the available total using this API call. The method checks to see whether
some or all of the points have expired while they were in the reserved state.
freeReservedPoints in interface RewardPointMgrIfcustomerId - reservationId -
java.lang.Exception
protected int getReservationId()
throws java.lang.Exception
org.apache.torque.TorqueException
KKException
java.lang.Exception
public RewardPoints getRewardPoints(java.lang.String sessionId,
DataDescriptorIf dataDesc)
throws java.lang.Exception
sessionId
parameter.
getRewardPoints in interface RewardPointMgrIfsessionId - dataDesc -
java.lang.Exception
protected int getCount(org.apache.torque.util.Criteria c)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
c -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||