public class ReviewMgr extends BaseMgr implements ReviewMgrIf
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log
Log
|
static int |
PRODUCT_REVIEW
Product review
|
static int |
VENDOR_REVIEW
Vendor review
|
templateBaseDir| Modifier and Type | Method and Description |
|---|---|
void |
escapeReview(ReviewIf review)
Escape the Strings in the Review object using the rules defined in the properties file by the
property konakart.escape.chars .
|
Reviews |
getAllReviews(DataDescriptorIf 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(KKCriteria c)
This method is mainly used for paging.
|
protected KKCriteria |
getCriteria(int revType)
Returns a KKCriteria object based on the review type
|
Review |
getReview(int reviewId)
Returns a review for the given reviewId
|
Reviews |
getReviews(DataDescriptorIf dataDescIn,
ReviewSearchIf searchIn)
Returns an array of Reviews (within a Reviews object) that match the specified search
criteria in the ReviewSearch object.
|
protected Reviews |
getReviews(DataDescriptorIf dataDescIn,
ReviewSearchIf searchIn,
int revType) |
Reviews |
getReviewsPerProduct(DataDescriptorIf dataDesc,
int productId)
Returns an array of reviews for the given productId
|
Reviews |
getReviewsPerVendor(DataDescriptorIf dataDesc,
int vendorId)
Returns an array of reviews for the given vendorId
|
Review |
getVendorReview(int reviewId)
Returns a vendor review for the given reviewId
|
Reviews |
getVendorReviews(DataDescriptorIf dataDescIn,
ReviewSearchIf searchIn)
Returns an array of Reviews (within a Reviews object) that match the specified search
criteria in the ReviewSearch object.
|
protected void |
manageDataDescriptor(DataDescriptorIf dataDesc,
KKCriteria c)
Provides common code to deal with the management of the DataDescriptor
|
int |
writeReview(java.lang.String sessionId,
ReviewIf review)
A new customer review is added to the system.
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNowpublic static final int PRODUCT_REVIEW
public static final int VENDOR_REVIEW
protected static org.apache.commons.logging.Log log
public ReviewMgr(KKEngIf eng) throws java.lang.Exception
eng - the engjava.lang.Exception - an unexpected exceptionpublic Reviews getAllReviews(DataDescriptorIf dataDesc) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getAllReviews in interface ReviewMgrIfdataDesc - the dataDescorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic Review getReview(int reviewId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getReview in interface ReviewMgrIfreviewId - the reviewIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic Reviews getReviewsPerProduct(DataDescriptorIf dataDesc, int productId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getReviewsPerProduct in interface ReviewMgrIfdataDesc - the dataDescproductId - the productIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic Reviews getReviews(DataDescriptorIf dataDescIn, ReviewSearchIf searchIn) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
ReviewMgrIfThe ReviewSearch object also allows you to specify that the return data contains:
dataDesc controls the following functionality:
getReviews in interface ReviewMgrIfdataDescIn - the dataDescInsearchIn - the searchInorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionprotected Reviews getReviews(DataDescriptorIf dataDescIn, ReviewSearchIf searchIn, int revType) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
dataDescIn - the dataDescInsearchIn - the searchInrevType - the revTypeorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionprotected void manageDataDescriptor(DataDescriptorIf dataDesc, KKCriteria c)
dataDesc - the dataDescc - the cpublic int writeReview(java.lang.String sessionId,
ReviewIf review)
throws java.lang.Exception
Alter table t Engine = InnoDB;. The standard engine seems to be MyIsam which
doesn't support transactions.writeReview in interface ReviewMgrIfsessionId - the sessionIdreview - the reviewjava.lang.Exception - an unexpected exceptionprotected int getCount(KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c - the corg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public void escapeReview(ReviewIf review)
escapeReview in interface ReviewMgrIfreview - the reviewprotected KKCriteria getCriteria(int revType) throws com.konakart.app.KKException
revType - the revTypecom.konakart.app.KKException - an unexpected KKException exceptionpublic Reviews getVendorReviews(DataDescriptorIf dataDescIn, ReviewSearchIf searchIn) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
ReviewMgrIfThe ReviewSearch object also allows you to specify that the return data contains:
dataDesc controls the following functionality:
getVendorReviews in interface ReviewMgrIfdataDescIn - the dataDescInsearchIn - the searchInorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic Review getVendorReview(int reviewId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getVendorReview in interface ReviewMgrIfreviewId - the reviewIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionpublic Reviews getReviewsPerVendor(DataDescriptorIf dataDesc, int vendorId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getReviewsPerVendor in interface ReviewMgrIfdataDesc - the dataDescvendorId - the vendorIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionCopyright © 2018 DS Data Systems UK Ltd.