com.konakartadmin.blif
Interface AdminCustomerTagMgrIf

All Known Implementing Classes:
AdminCustomerTagMgr

public interface AdminCustomerTagMgrIf

AdminCustomerTagMgrIf


Method Summary
 int deleteCustomerTag(int id)
          Delete a Customer tag
 void deleteCustomerTagForCustomer(int customerId, java.lang.String tagName)
          Deletes the value of the customer tag referenced by tagName for the customer referenced by customerId.
 int deleteExpression(int id)
          Deletes the Expression object referenced by id.
 int deleteExpressionVariable(int id)
          Deletes the ExpressionVariable object referenced by id.
 void deleteExpressionVariablesForExpression(int expressionId)
          Deletes all of the AdminExpressionVariable objects belonging to the AdminExpression referenced by expressionId.
 boolean evaluateExpression(int customerId, int expressionId, java.lang.String expressionName)
          An expression object is retrieved from the database and evaluated for the customer referenced by the customerId.
 AdminCustomerTag getCustomerTag(int id)
          Returns the customer tag object for the id parameter, or Null if the customer tag doesn't exist in the DB.
 AdminCustomerTag getCustomerTagForCustomer(int customerId, java.lang.String tagName)
          Returns the customer tag object for the tagName parameter, or Null if the customer tag doesn't exist in the DB.
 AdminCustomerTag getCustomerTagForName(java.lang.String tagName)
          Returns the customer tag object for the tagName parameter, or Null if the customer tag doesn't exist in the DB.
 AdminCustomerTagSearchResult getCustomerTags(AdminCustomerTagSearch search, int offset, int size)
          This returns an AdminCustomerTagSearchResult object.
 AdminCustomerTag[] getCustomerTagsForCustomer(int customerId)
          This method fetches all of the customer tags for the customer referenced by the customerId parameter.
 AdminExpression getExpression(int id)
          Returns the AdminExpression object for the id parameter, or Null if the AdminExpression doesn't exist in the DB.
 AdminExpression getExpressionForName(java.lang.String expName)
          Returns the AdminExpression object for the expName parameter, or Null if the AdminExpression doesn't exist in the DB.
 AdminExpressionSearchResult getExpressions(AdminExpressionSearch search, int offset, int size)
          This returns an AdminExpressionSearchResult object.
 AdminExpression[] getExpressionsPerPromotion(int promotionId)
          Fetch an array of Expression objects linked to the promotion referenced by promotionId
 AdminExpressionVariable getExpressionVariable(int id)
          Returns the AdminExpressionVariable object for the id parameter, or Null if the AdminExpressionVariable doesn't exist in the DB.
 AdminExpressionVariable[] getExpressionVariablesForExpression(int expressionId)
          Returns an array of AdminExpressionVariable objects for the AdminExpression identified by the id parameter.
 int insertCustomerTag(AdminCustomerTag tag)
          An AdminCustomerTag object is inserted into the database.
 void insertCustomerTagForCustomer(int customerId, AdminCustomerTag tag)
          Assigns a customer tag to the customer referenced by the customerId.
 int insertExpression(AdminExpression exp)
          Inserts an AdminExpression object.
 int insertExpressionVariables(AdminExpressionVariable[] expVarArray)
          Inserts an array of ExpressionVariable objects that should all belong to the same expression.
 int updateCustomerTag(AdminCustomerTag tag)
          Update an AdminCustomerTag object.
 int updateExpression(AdminExpression exp)
          Updates the expression.
 int updateExpressionVariable(AdminExpressionVariable expVar)
          Updates the ExpressionVariable object passed in as a parameter.
 

Method Detail

evaluateExpression

boolean evaluateExpression(int customerId,
                           int expressionId,
                           java.lang.String expressionName)
                           throws java.lang.Exception
An expression object is retrieved from the database and evaluated for the customer referenced by the customerId. If the expressionName parameter is not set to null, then the Expression is searched for by name. Otherwise it is searched for by the id contained in the expressionId parameter.

Parameters:
customerId -
expressionId -
expressionName -
Returns:
Returns true or false
Throws:
java.lang.Exception

insertCustomerTag

int insertCustomerTag(AdminCustomerTag tag)
                      throws KKAdminException,
                             org.apache.torque.TorqueException
An AdminCustomerTag object is inserted into the database. The following customer tag attributes are compulsory: The id of the new object is returned.

Parameters:
tag -
Returns:
Returns the id of the CustomerTag object
Throws:
KKAdminException
org.apache.torque.TorqueException

getCustomerTags

AdminCustomerTagSearchResult getCustomerTags(AdminCustomerTagSearch search,
                                             int offset,
                                             int size)
                                             throws org.apache.torque.TorqueException,
                                                    com.workingdogs.village.DataSetException,
                                                    KKAdminException
This returns an AdminCustomerTagSearchResult object. Constraints may be added for: The returned objects may be ordered by:

Parameters:
search - The search object that defines the search parameters and sort order
offset - The offset in the db
size - The number of records from the specified offset
Returns:
Returns an AdminCustomerTagSearchResult object
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException

updateCustomerTag

int updateCustomerTag(AdminCustomerTag tag)
                      throws KKAdminException,
                             org.apache.torque.TorqueException,
                             com.workingdogs.village.DataSetException
Update an AdminCustomerTag object. If the value of an attribute is null, the current value is not updated.

Parameters:
tag - An AdminCustomerTag object
Returns:
Returns the id of the updated AdminCustomerTag object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

deleteCustomerTag

int deleteCustomerTag(int id)
                      throws KKAdminException,
                             org.apache.torque.TorqueException
Delete a Customer tag

Parameters:
id - The id of the deleted customer tag
Returns:
Returns the id of the deleted customer tag
Throws:
KKAdminException
org.apache.torque.TorqueException

deleteCustomerTagForCustomer

void deleteCustomerTagForCustomer(int customerId,
                                  java.lang.String tagName)
                                  throws KKAdminException,
                                         org.apache.torque.TorqueException
Deletes the value of the customer tag referenced by tagName for the customer referenced by customerId.

Parameters:
customerId - The id of the customer
tagName - The name of the customer tag
Throws:
KKAdminException
org.apache.torque.TorqueException

getCustomerTag

AdminCustomerTag getCustomerTag(int id)
                                throws KKAdminException,
                                       org.apache.torque.TorqueException,
                                       com.workingdogs.village.DataSetException
Returns the customer tag object for the id parameter, or Null if the customer tag doesn't exist in the DB.

Parameters:
id - The id of the customer tag
Returns:
Returns a customer tag object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCustomerTagForCustomer

AdminCustomerTag getCustomerTagForCustomer(int customerId,
                                           java.lang.String tagName)
                                           throws KKAdminException,
                                                  org.apache.torque.TorqueException,
                                                  com.workingdogs.village.DataSetException
Returns the customer tag object for the tagName parameter, or Null if the customer tag doesn't exist in the DB. The value attribute of the customer tag contains the value for the customer referenced by customerId.

Parameters:
customerId - The id of the customer
tagName - The name of the customer tag
Returns:
Returns a customer tag object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCustomerTagForName

AdminCustomerTag getCustomerTagForName(java.lang.String tagName)
                                       throws KKAdminException,
                                              org.apache.torque.TorqueException,
                                              com.workingdogs.village.DataSetException
Returns the customer tag object for the tagName parameter, or Null if the customer tag doesn't exist in the DB.

Parameters:
tagName - The name of the customer tag
Returns:
Returns a customer tag object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCustomerTagsForCustomer

AdminCustomerTag[] getCustomerTagsForCustomer(int customerId)
                                              throws org.apache.torque.TorqueException,
                                                     KKAdminException,
                                                     com.workingdogs.village.DataSetException
This method fetches all of the customer tags for the customer referenced by the customerId parameter. The value attribute of the customer tag contains the value for the customer referenced by customerId.

An empty array is returned if no tags exist.

Parameters:
customerId - The id of the customer
Returns:
Returns an array of AdminCustomerTag objects
Throws:
org.apache.torque.TorqueException
KKAdminException
com.workingdogs.village.DataSetException

insertCustomerTagForCustomer

void insertCustomerTagForCustomer(int customerId,
                                  AdminCustomerTag tag)
                                  throws KKAdminException,
                                         org.apache.torque.TorqueException,
                                         java.text.ParseException,
                                         com.workingdogs.village.DataSetException
Assigns a customer tag to the customer referenced by the customerId. If a tag already exists with this name, then the value is replaced with the new value. The compulsory tag fields are:

Note that a customer tag with name tag.getName() must exist in the database since it is used to validate tag.getValue().

Parameters:
customerId - The id of the customer
tag - The customer tag object
Throws:
KKAdminException
org.apache.torque.TorqueException
java.text.ParseException
com.workingdogs.village.DataSetException

insertExpression

int insertExpression(AdminExpression exp)
                     throws KKAdminException,
                            org.apache.torque.TorqueException
Inserts an AdminExpression object. Only the name attribute of the AdminExpression is required.

Parameters:
exp - The AdminExpression object to be inserted
Returns:
Returns the id of the inserted object
Throws:
KKAdminException
org.apache.torque.TorqueException

updateExpression

int updateExpression(AdminExpression exp)
                     throws KKAdminException,
                            org.apache.torque.TorqueException,
                            com.workingdogs.village.DataSetException
Updates the expression. An exception is thrown if the AdminExpression does not exist.

Parameters:
exp - The AdminExpression object to be updated
Returns:
Returns the id of the updated AdminExpression object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

deleteExpression

int deleteExpression(int id)
                     throws java.lang.Exception
Deletes the Expression object referenced by id.

Parameters:
id - The id of the AdminExpression object to be deleted
Returns:
Returns the id of the AdminExpression object deleted
Throws:
java.lang.Exception

getExpression

AdminExpression getExpression(int id)
                              throws KKAdminException,
                                     org.apache.torque.TorqueException,
                                     com.workingdogs.village.DataSetException
Returns the AdminExpression object for the id parameter, or Null if the AdminExpression doesn't exist in the DB.

Parameters:
id - The id of the AdminExpression object
Returns:
Returns an AdminExpression object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getExpressionVariable

AdminExpressionVariable getExpressionVariable(int id)
                                              throws KKAdminException,
                                                     org.apache.torque.TorqueException,
                                                     com.workingdogs.village.DataSetException
Returns the AdminExpressionVariable object for the id parameter, or Null if the AdminExpressionVariable doesn't exist in the DB.

Parameters:
id - The id of the AdminExpressionVariable object
Returns:
Returns an AdminExpressionVariable object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getExpressionVariablesForExpression

AdminExpressionVariable[] getExpressionVariablesForExpression(int expressionId)
                                                              throws KKAdminException,
                                                                     org.apache.torque.TorqueException,
                                                                     com.workingdogs.village.DataSetException
Returns an array of AdminExpressionVariable objects for the AdminExpression identified by the id parameter. An empty array is returned if no objects are found.

Parameters:
expressionId - The AdminExpression id for the AdminExpressionVariable objects
Returns:
Returns an array of AdminExpression objects
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getExpressionForName

AdminExpression getExpressionForName(java.lang.String expName)
                                     throws KKAdminException,
                                            org.apache.torque.TorqueException,
                                            com.workingdogs.village.DataSetException
Returns the AdminExpression object for the expName parameter, or Null if the AdminExpression doesn't exist in the DB.

Parameters:
expName - The name of the AdminExpression object
Returns:
Returns Returns an AdminExpression object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getExpressions

AdminExpressionSearchResult getExpressions(AdminExpressionSearch search,
                                           int offset,
                                           int size)
                                           throws org.apache.torque.TorqueException,
                                                  com.workingdogs.village.DataSetException,
                                                  KKAdminException
This returns an AdminExpressionSearchResult object. Constraints may be added for: The returned objects may be ordered by:

Parameters:
search - The search object that defines the search parameters and sort order
offset - The offset in the db
size - The number of records from the specified offset
Returns:
Returns an AdminExpressionSearchResult object
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

insertExpressionVariables

int insertExpressionVariables(AdminExpressionVariable[] expVarArray)
                              throws KKAdminException,
                                     org.apache.torque.TorqueException,
                                     com.workingdogs.village.DataSetException
Inserts an array of ExpressionVariable objects that should all belong to the same expression. If the array only contains one Expression Variable then, the id of that variable is returned. Otherwise the return value is set to 0.

Parameters:
expVarArray - The AdminExpressionVariable array of objects to be inserted
Returns:
If the array only contains one Expression Variable then, the id of that variable is returned. Otherwise the return value is set to 0.
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

updateExpressionVariable

int updateExpressionVariable(AdminExpressionVariable expVar)
                             throws KKAdminException,
                                    org.apache.torque.TorqueException
Updates the ExpressionVariable object passed in as a parameter. An exception is thrown if it does not exist.

Parameters:
expVar - The AdminExpressionVariable object to be updated
Returns:
Returns the id of the updated AdminExpression object
Throws:
KKAdminException
org.apache.torque.TorqueException

deleteExpressionVariable

int deleteExpressionVariable(int id)
                             throws org.apache.torque.TorqueException,
                                    KKAdminException,
                                    com.workingdogs.village.DataSetException
Deletes the ExpressionVariable object referenced by id.

Parameters:
id - The id of the AdminExpressionVariable object to be deleted
Returns:
Returns the id of the AdminExpression object deleted
Throws:
org.apache.torque.TorqueException
KKAdminException
com.workingdogs.village.DataSetException

deleteExpressionVariablesForExpression

void deleteExpressionVariablesForExpression(int expressionId)
                                            throws org.apache.torque.TorqueException,
                                                   KKAdminException,
                                                   com.workingdogs.village.DataSetException
Deletes all of the AdminExpressionVariable objects belonging to the AdminExpression referenced by expressionId.

Parameters:
expressionId - The id of the AdminExpression object
Throws:
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException

getExpressionsPerPromotion

AdminExpression[] getExpressionsPerPromotion(int promotionId)
                                             throws com.workingdogs.village.DataSetException,
                                                    org.apache.torque.TorqueException,
                                                    KKAdminException
Fetch an array of Expression objects linked to the promotion referenced by promotionId

Parameters:
promotionId -
Returns:
An array of all manufacturers relevant to a promotion
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException


Copyright © 2011 DS Data Systems UK Ltd.