|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakart.bl.RewardPointCore
public class RewardPointCore
Reward point core which is used by both the RewardPointMgr and the AdminRewardPointMgr
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
|
static int |
TX_TYPE_ADD_POINTS
Transaction type |
static int |
TX_TYPE_REMOVE_POINTS
Transaction type |
Constructor Summary | |
---|---|
RewardPointCore()
Constructor |
Method Summary | |
---|---|
int |
addPoints(int customerId,
int points,
java.lang.String code,
java.lang.String description,
KKCriteria crit)
Adds a number of reward points to the total for customer identified by the sessionId parameter. |
protected void |
checkRequired(java.lang.Object param,
java.lang.String paramType,
java.lang.String paramName)
Throws an exception with a proper message if the required parameter is null or null or empty for the case of a string. |
int |
deletePoints(int customerId,
int points,
java.lang.String code,
java.lang.String description,
KKCriteria crit1,
KKCriteria crit2)
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,
KKCriteria crit)
Verifies that the reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. |
int |
freeReservedPoints(int customerId,
int reservationId,
KKCriteria crit1,
KKCriteria crit2)
Verifies that the reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. |
int |
getReservationId(KKCriteria insertC)
Get a unique reservation id from the counter table |
int |
pointsAvailable(int customerId,
KKCriteria crit)
Calculates the number of reward points available for the customer identified by the sessionId parameter. |
int |
reservePoints(int customerId,
int points,
KKCriteria crit1,
KKCriteria crit2)
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
public static final int TX_TYPE_ADD_POINTS
public static final int TX_TYPE_REMOVE_POINTS
Constructor Detail |
---|
public RewardPointCore() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public int pointsAvailable(int customerId, KKCriteria crit) throws java.lang.Exception
sessionId
parameter.
customerId
- crit
-
java.lang.Exception
public int addPoints(int customerId, int points, java.lang.String code, java.lang.String description, KKCriteria crit) throws java.lang.Exception
sessionId
parameter.
customerId
- points
- code
- An optional code to categorize the reason for awarding the pointsdescription
- An optional description describing why the points were awardedcrit
-
java.lang.Exception
public int deletePoints(int customerId, int points, java.lang.String code, java.lang.String description, KKCriteria crit1, KKCriteria crit2) throws java.lang.Exception
sessionId
parameter.
customerId
- points
- code
- description
- crit1
- crit2
-
java.lang.Exception
public int reservePoints(int customerId, int points, KKCriteria crit1, KKCriteria crit2) 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.
customerId
- points
- crit1
- crit2
-
java.lang.Exception
public void deleteReservedPoints(int customerId, int reservationId, java.lang.String code, java.lang.String description, KKCriteria crit) 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.
customerId
- reservationId
- code
- description
- crit
-
java.lang.Exception
public int freeReservedPoints(int customerId, int reservationId, KKCriteria crit1, KKCriteria crit2) 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.
customerId
- reservationId
- crit1
- crit2
-
java.lang.Exception
public int getReservationId(KKCriteria insertC) throws org.apache.torque.TorqueException, KKException
insertC
-
org.apache.torque.TorqueException
KKException
protected void checkRequired(java.lang.Object param, java.lang.String paramType, java.lang.String paramName) throws KKException
param
- paramType
- paramName
-
KKException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |