com.konakartadmin.bl
Class AdminReviewMgr

java.lang.Object
  extended by com.konakartadmin.bl.AdminBaseMgr
      extended by com.konakartadmin.bl.AdminReviewMgr
All Implemented Interfaces:
AdminReviewMgrIf

public class AdminReviewMgr
extends AdminBaseMgr
implements AdminReviewMgrIf

The AdminReviewMgr - for Managing Review Objects for the Admin Application


Nested Class Summary
 
Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr
AdminBaseMgr.StaticData
 
Field Summary
 
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
 
Constructor Summary
AdminReviewMgr(KKAdminIf eng)
          Constructor
 
Method Summary
 void deleteReview(int reviewId)
          Delete the review referenced to by reviewId.
 void deleteReviewsPerProduct(int productId, java.sql.Connection connection)
          Delete the reviews for the product identified by productId.
 void editReview(AdminReview review)
          Edit a review
 AdminReviews getAllReviews(AdminDataDescriptor dataDesc)
          Calls the getReviewsPerProduct method with a negative productId value so that it is not included in the Where clause of the query
protected  int getCount(com.konakart.bl.KKCriteria c)
          This method is mainly used for paging.
 AdminReview getReview(int reviewId)
          Returns a review for the given reviewId
 AdminReviews getReviews(AdminDataDescriptor dataDesc, AdminReviewSearch revSearch)
          Returns an array of reviews for the given search criteria.
 AdminReviews getReviewsPerProduct(AdminDataDescriptor dataDesc, int productId)
          Returns an array of reviews for the given productId
 int insertReview(AdminReview review)
          A new review is inserted
protected  void manageDataDescriptor(AdminDataDescriptor dataDesc, com.konakart.bl.KKCriteria c)
          Provides common code to deal with the management of the DataDescriptor
protected  void setCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
          Initialize criteria with review attributes
protected  void validateReview(AdminReview review)
          Validate the review
 
Methods inherited from class com.konakartadmin.bl.AdminBaseMgr
addInsertAttr, addInsertAttr, checkIntIsSet, checkRequired, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminHtmlMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminPublishProdMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getExportXMLData, getIntFromString, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getPostSearchText, getPreSearchText, getPropertyValue, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, manageException, refreshConfigs, removeCData, setAdminEng, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminReviewMgr

public AdminReviewMgr(KKAdminIf eng)
               throws java.lang.Exception
Constructor

Parameters:
eng -
Throws:
java.lang.Exception
Method Detail

getAllReviews

public AdminReviews getAllReviews(AdminDataDescriptor dataDesc)
                           throws org.apache.torque.TorqueException,
                                  com.workingdogs.village.DataSetException,
                                  KKAdminException
Calls the getReviewsPerProduct method with a negative productId value so that it is not included in the Where clause of the query

Specified by:
getAllReviews in interface AdminReviewMgrIf
Parameters:
dataDesc -
Returns:
Returns all reviews
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getReviewsPerProduct

public AdminReviews getReviewsPerProduct(AdminDataDescriptor dataDesc,
                                         int productId)
                                  throws org.apache.torque.TorqueException,
                                         com.workingdogs.village.DataSetException,
                                         KKAdminException
Returns an array of reviews for the given productId

Specified by:
getReviewsPerProduct in interface AdminReviewMgrIf
Parameters:
dataDesc -
productId -
Returns:
Returns a Reviews object
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getReviews

public AdminReviews getReviews(AdminDataDescriptor dataDesc,
                               AdminReviewSearch revSearch)
                        throws org.apache.torque.TorqueException,
                               com.workingdogs.village.DataSetException,
                               KKAdminException
Returns an array of reviews for the given search criteria.

Specified by:
getReviews in interface AdminReviewMgrIf
Parameters:
dataDesc -
revSearch -
Returns:
Returns a Reviews object
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getReview

public AdminReview getReview(int reviewId)
                      throws org.apache.torque.TorqueException,
                             com.workingdogs.village.DataSetException,
                             KKAdminException
Returns a review for the given reviewId

Specified by:
getReview in interface AdminReviewMgrIf
Parameters:
reviewId -
Returns:
Returns a Review object
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

deleteReview

public void deleteReview(int reviewId)
                  throws java.lang.Exception
Delete the review referenced to by reviewId.

Specified by:
deleteReview in interface AdminReviewMgrIf
Parameters:
reviewId -
Throws:
java.lang.Exception

deleteReviewsPerProduct

public void deleteReviewsPerProduct(int productId,
                                    java.sql.Connection connection)
                             throws java.lang.Exception
Delete the reviews for the product identified by productId. If connection is not equal to null, it is used so that this delete may be part of a transaction started somewhere else.

Specified by:
deleteReviewsPerProduct in interface AdminReviewMgrIf
Parameters:
productId -
connection -
Throws:
java.lang.Exception

editReview

public void editReview(AdminReview review)
                throws java.lang.Exception
Edit a review

Specified by:
editReview in interface AdminReviewMgrIf
Parameters:
review -
Throws:
java.lang.Exception

insertReview

public int insertReview(AdminReview review)
                 throws java.lang.Exception
A new review is inserted

Specified by:
insertReview in interface AdminReviewMgrIf
Parameters:
review -
Returns:
int : Review Primary Key
Throws:
java.lang.Exception

manageDataDescriptor

protected void manageDataDescriptor(AdminDataDescriptor dataDesc,
                                    com.konakart.bl.KKCriteria c)
Provides common code to deal with the management of the DataDescriptor

Parameters:
dataDesc -
c -

validateReview

protected void validateReview(AdminReview review)
                       throws java.lang.Exception
Validate the review

Throws:
java.lang.Exception

getCount

protected int getCount(com.konakart.bl.KKCriteria c)
                throws org.apache.torque.TorqueException,
                       com.workingdogs.village.DataSetException
This method is mainly used for paging.

Parameters:
c -
Returns:
The number of records present in the database matching the given criteria
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

setCriteriaWithStandardAttributes

protected void setCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
                                          throws KKAdminException
Initialize criteria with review attributes

Parameters:
c -
Throws:
KKAdminException


Copyright © 2011 DS Data Systems UK Ltd.