com.konakartadmin.app
Class AdminProductSearch

java.lang.Object
  extended by com.konakartadmin.app.AdminProductSearch

public class AdminProductSearch
extends java.lang.Object

Allows you to enter search criteria for retrieving AdminProduct objects


Field Summary
private  int categoryId
          category Id
private  java.util.Calendar dateAddedFrom
          date Added From
private  java.util.Calendar dateAddedTo
          date Added To
private  java.util.Calendar dateAvailableFrom
          dateAvailableFrom
private  java.util.Calendar dateAvailableTo
          dateAvailableTo
private  java.util.Calendar dateLastModifiedFrom
          dateLastModifiedFrom
private  java.util.Calendar dateLastModifiedTo
          dateLastModifiedTo
private  java.util.Calendar endDateFrom
          endDateFrom
private  java.util.Calendar endDateTo
          endDateTo
private  java.util.Calendar expiryDateFrom
          expiryDateFrom
private  java.util.Calendar expiryDateTo
          expiryDateTo
private  boolean giftCertificates
          gift Certificates
private  int manufacturerId
          manufacturer Id
private  boolean onlyProductsExpected
          only Products Expected
private  boolean onlySpecials
          only Specials
private  int paymentScheduleId
          Payment Schedule Id
private  java.math.BigDecimal priceFrom
          price From
private  java.math.BigDecimal priceTo
          price To
private  int productType
          Product Type
private  java.lang.String productUUID
          UUID used to control synchronization of product copies in different stores
private  int promotionId
          Promotion Id
static int SEARCH_ALL
          SEARCH_ALL: Used to initialize some constraints such as manufacturerId and categoryId.
static int SEARCH_IN_PRODUCT_DESCRIPTION
          SEARCH_IN_PRODUCT_DESCRIPTION: Used to set whereToSearch so that the product description is searched as well as other attributes such as name, manufacturer and model.
private  boolean searchCategoryTree
          Only used when categoryId is set.
private  java.lang.String searchText
          searchText
private  int searchTextRule
          searchTextRule
private  java.lang.String sku
          SKU
private  int skuRule
          SKU Rule
private  java.util.Calendar startDateFrom
          startDateFrom
private  java.util.Calendar startDateTo
          startDateTo
private  int whereToSearch
          where to search indicator
 
Constructor Summary
AdminProductSearch()
          Constructor
 
Method Summary
 int getCategoryId()
          Used to filter products by category and all sub categories of selected category.
 java.util.Calendar getDateAddedFrom()
          When not null, only products which were added to the catalog on this date or after this date are returned.
 java.util.Calendar getDateAddedTo()
          When not null, only products which were added to the catalog on this date or before this date are returned.
 java.util.Calendar getDateAvailableFrom()
          When not null, only products which are available on this date or after this date are returned.
 java.util.Calendar getDateAvailableTo()
          When not null, only products which are available on this date or before this date are returned.
 java.util.Calendar getDateLastModifiedFrom()
          When not null, only products which have been modified on this date or after this date are returned.
 java.util.Calendar getDateLastModifiedTo()
          When not null, only products which have been modified on this date or after before date are returned.
 java.util.Calendar getEndDateFrom()
          Used for Bookable Products
 java.util.Calendar getEndDateTo()
          Used for Bookable Products
 java.util.Calendar getExpiryDateFrom()
          When not null, only products which expire on this date or after this date are returned.
 java.util.Calendar getExpiryDateTo()
          When not null, only products which expire on this date or before this date are returned.
 int getManufacturerId()
          Used to filter products by manufacturer.
 int getPaymentScheduleId()
          Used to only return products if they are associated to this payment schedule.
 java.math.BigDecimal getPriceFrom()
          When not null, only products with a price greater than or equal to this price are returned.
 java.math.BigDecimal getPriceTo()
          When not null, only products with a price less than or equal to this price are returned.
 int getProductType()
          Used to filter products by productType.
 java.lang.String getProductUUID()
          UUID used to control synchronization of product copies in different stores
 int getPromotionId()
          Used to only return products if they are in a promotion.
static int getSEARCH_ALL()
           
 java.lang.String getSearchText()
          When not null, only products containing this search text are returned.
 int getSearchTextRule()
          The rule for the search.
 java.lang.String getSku()
          Used to filter products by SKU.
 int getSkuRule()
          The rule for the search.
 java.util.Calendar getStartDateFrom()
          Used for Bookable Products
 java.util.Calendar getStartDateTo()
          Used for Bookable Products
 int getWhereToSearch()
          When set to 0, the following attributes are searched for the searchText: Product Name Manufacturer Name Product Model When set to AdminProductSearch.SEARCH_IN_PRODUCT_DESCRIPTION then the product description is also searched.
 boolean isGiftCertificates()
          Used when searching for products within a promotion.
 boolean isOnlyProductsExpected()
          When set, only products that have an available date in the future, are returned.
 boolean isOnlySpecials()
          When set, only products that have a special price, are returned.
 boolean isSearchCategoryTree()
          Only used when categoryId is set.
 void setCategoryId(int categoryId)
          Used to filter products by category and all sub categories of selected category.
 void setDateAddedFrom(java.util.Calendar dateAddedFrom)
          When not null, only products which were added to the catalog on this date or after this date are returned.
 void setDateAddedTo(java.util.Calendar dateAddedTo)
          When not null, only products which were added to the catalog on this date or before this date are returned.
 void setDateAvailableFrom(java.util.Calendar dateAvailableFrom)
          When not null, only products which are available on this date or after this date are returned.
 void setDateAvailableTo(java.util.Calendar dateAvailableTo)
          When not null, only products which are available on this date or before this date are returned.
 void setDateLastModifiedFrom(java.util.Calendar dateLastModifiedFrom)
          When not null, only products which have been modified on this date or after this date are returned.
 void setDateLastModifiedTo(java.util.Calendar dateLastModifiedTo)
          When not null, only products which have been modified on this date or after before date are returned.
 void setEndDateFrom(java.util.Calendar endDateFrom)
          Used for Bookable Products
 void setEndDateTo(java.util.Calendar endDateTo)
          Used for Bookable Products
 void setExpiryDateFrom(java.util.Calendar expiryDateFrom)
          When not null, only products which expire on this date or after this date are returned.
 void setExpiryDateTo(java.util.Calendar expiryDateTo)
          When not null, only products which expire on this date or before this date are returned.
 void setGiftCertificates(boolean giftCertificates)
          Used when searching for products within a promotion.
 void setManufacturerId(int manufacturerId)
          Used to filter products by manufacturer.
 void setOnlyProductsExpected(boolean onlyProductsExpected)
          When set, only products that have an available date in the future, are returned.
 void setOnlySpecials(boolean onlySpecials)
          When set, only products that have a special price, are returned.
 void setPaymentScheduleId(int paymentScheduleId)
          Used to only return products if they are associated to this payment schedule.
 void setPriceFrom(java.math.BigDecimal priceFrom)
          When not null, only products with a price greater than or equal to this price are returned.
 void setPriceTo(java.math.BigDecimal priceTo)
          When not null, only products with a price less than or equal to this price are returned.
 void setProductType(int productType)
          Used to filter products by productType.
 void setProductUUID(java.lang.String productUUID)
          UUID used to control synchronization of product copies in different stores
 void setPromotionId(int promotionId)
          Used to only return products if they are in a promotion.
 void setSearchCategoryTree(boolean searchCategoryTree)
          Only used when categoryId is set.
 void setSearchText(java.lang.String searchText)
          When not null, only products containing this search text are returned.
 void setSearchTextRule(int searchTextRule)
          The rule for the search.
 void setSku(java.lang.String sku)
          Used to filter products by SKU.
 void setSkuRule(int skuRule)
          The rule for the search.
 void setStartDateFrom(java.util.Calendar startDateFrom)
          Used for Bookable Products
 void setStartDateTo(java.util.Calendar startDateTo)
          Used for Bookable Products
 void setWhereToSearch(int whereToSearch)
          When set to 0, the following attributes are searched for the searchText: Product Name Manufacturer Name Product Model When set to AdminProductSearch.SEARCH_IN_PRODUCT_DESCRIPTION then the product description is also searched.
 java.lang.String toString()
           
 java.lang.String toStringBrief()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sku

private java.lang.String sku
SKU


skuRule

private int skuRule
SKU Rule


priceFrom

private java.math.BigDecimal priceFrom
price From


priceTo

private java.math.BigDecimal priceTo
price To


dateAddedFrom

private java.util.Calendar dateAddedFrom
date Added From


dateAddedTo

private java.util.Calendar dateAddedTo
date Added To


dateAvailableFrom

private java.util.Calendar dateAvailableFrom
dateAvailableFrom


dateAvailableTo

private java.util.Calendar dateAvailableTo
dateAvailableTo


dateLastModifiedFrom

private java.util.Calendar dateLastModifiedFrom
dateLastModifiedFrom


dateLastModifiedTo

private java.util.Calendar dateLastModifiedTo
dateLastModifiedTo


startDateFrom

private java.util.Calendar startDateFrom
startDateFrom


startDateTo

private java.util.Calendar startDateTo
startDateTo


endDateFrom

private java.util.Calendar endDateFrom
endDateFrom


endDateTo

private java.util.Calendar endDateTo
endDateTo


expiryDateFrom

private java.util.Calendar expiryDateFrom
expiryDateFrom


expiryDateTo

private java.util.Calendar expiryDateTo
expiryDateTo


manufacturerId

private int manufacturerId
manufacturer Id


categoryId

private int categoryId
category Id


searchCategoryTree

private boolean searchCategoryTree
Only used when categoryId is set. If set to false then only category defined by categoryId is searched. Otherwise all of its children, children's children etc. are searched.


whereToSearch

private int whereToSearch
where to search indicator


searchText

private java.lang.String searchText
searchText


searchTextRule

private int searchTextRule
searchTextRule


onlySpecials

private boolean onlySpecials
only Specials


onlyProductsExpected

private boolean onlyProductsExpected
only Products Expected


promotionId

private int promotionId
Promotion Id


paymentScheduleId

private int paymentScheduleId
Payment Schedule Id


giftCertificates

private boolean giftCertificates
gift Certificates


productType

private int productType
Product Type


productUUID

private java.lang.String productUUID
UUID used to control synchronization of product copies in different stores


SEARCH_IN_PRODUCT_DESCRIPTION

public static final int SEARCH_IN_PRODUCT_DESCRIPTION
SEARCH_IN_PRODUCT_DESCRIPTION: Used to set whereToSearch so that the product description is searched as well as other attributes such as name, manufacturer and model.

See Also:
Constant Field Values

SEARCH_ALL

public static final int SEARCH_ALL
SEARCH_ALL: Used to initialize some constraints such as manufacturerId and categoryId.

See Also:
Constant Field Values
Constructor Detail

AdminProductSearch

public AdminProductSearch()
Constructor

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the Product object and those of its Options.

toStringBrief

public java.lang.String toStringBrief()
Returns:
Returns a string containing selected attributes of the Product object

getCategoryId

public int getCategoryId()
Used to filter products by category and all sub categories of selected category. In order to be inactive it should be initialized to AdminProductSearch.SEARCH_ALL

Returns:
Returns the categoryId.

setCategoryId

public void setCategoryId(int categoryId)
Used to filter products by category and all sub categories of selected category. In order to be inactive it should be initialized to AdminProductSearch.SEARCH_ALL

Parameters:
categoryId - The categoryId to set.

getManufacturerId

public int getManufacturerId()
Used to filter products by manufacturer. In order to be inactive it should be initialized to AdminProductSearch.SEARCH_ALL

Returns:
Returns the manufacturerId.

setManufacturerId

public void setManufacturerId(int manufacturerId)
Used to filter products by manufacturer. In order to be inactive it should be initialized to AdminProductSearch.SEARCH_ALL

Parameters:
manufacturerId - The manufacturerId to set.

getPriceFrom

public java.math.BigDecimal getPriceFrom()
When not null, only products with a price greater than or equal to this price are returned.

Returns:
Returns the priceFrom.

setPriceFrom

public void setPriceFrom(java.math.BigDecimal priceFrom)
When not null, only products with a price greater than or equal to this price are returned.

Parameters:
priceFrom - The priceFrom to set.

getPriceTo

public java.math.BigDecimal getPriceTo()
When not null, only products with a price less than or equal to this price are returned.

Returns:
Returns the priceTo.

setPriceTo

public void setPriceTo(java.math.BigDecimal priceTo)
When not null, only products with a price less than or equal to this price are returned.

Parameters:
priceTo - The priceTo to set.

getSearchText

public java.lang.String getSearchText()
When not null, only products containing this search text are returned. whereToSearch determines which attributes of the product are searched.

Returns:
Returns the searchText.

setSearchText

public void setSearchText(java.lang.String searchText)
When not null, only products containing this search text are returned. whereToSearch determines which attributes of the product are searched.

Parameters:
searchText - The searchText to set.

getWhereToSearch

public int getWhereToSearch()
When set to 0, the following attributes are searched for the searchText: When set to AdminProductSearch.SEARCH_IN_PRODUCT_DESCRIPTION then the product description is also searched.

Returns:
Returns the whereToSearch.

setWhereToSearch

public void setWhereToSearch(int whereToSearch)
When set to 0, the following attributes are searched for the searchText: When set to AdminProductSearch.SEARCH_IN_PRODUCT_DESCRIPTION then the product description is also searched.

Parameters:
whereToSearch - The whereToSearch to set.

getDateAddedFrom

public java.util.Calendar getDateAddedFrom()
When not null, only products which were added to the catalog on this date or after this date are returned.

Returns:
Returns the dateAddedFrom.

setDateAddedFrom

public void setDateAddedFrom(java.util.Calendar dateAddedFrom)
When not null, only products which were added to the catalog on this date or after this date are returned.

Parameters:
dateAddedFrom - The dateAddedFrom to set.

getDateAddedTo

public java.util.Calendar getDateAddedTo()
When not null, only products which were added to the catalog on this date or before this date are returned.

Returns:
Returns the dateAddedTo.

setDateAddedTo

public void setDateAddedTo(java.util.Calendar dateAddedTo)
When not null, only products which were added to the catalog on this date or before this date are returned.

Parameters:
dateAddedTo - The dateAddedTo to set.

getSEARCH_ALL

public static int getSEARCH_ALL()
Returns:
Returns the SEARCH_ALL.

isOnlySpecials

public boolean isOnlySpecials()
When set, only products that have a special price, are returned.

Returns:
Returns the onlySpecials.

setOnlySpecials

public void setOnlySpecials(boolean onlySpecials)
When set, only products that have a special price, are returned.

Parameters:
onlySpecials - The onlySpecials to set.

isOnlyProductsExpected

public boolean isOnlyProductsExpected()
When set, only products that have an available date in the future, are returned.

Returns:
Returns the onlyProductsExpected.

setOnlyProductsExpected

public void setOnlyProductsExpected(boolean onlyProductsExpected)
When set, only products that have an available date in the future, are returned.

Parameters:
onlyProductsExpected - The onlyProductsExpected to set.

getPromotionId

public int getPromotionId()
Used to only return products if they are in a promotion. In order to be inactive it should be initialized to AdminProductSearch.NOT_SET

Returns:
Returns the promotionId.

setPromotionId

public void setPromotionId(int promotionId)
Used to only return products if they are in a promotion. In order to be inactive it should be initialized to AdminProductSearch.NOT_SET

Parameters:
promotionId - The promotionId to set.

getSku

public java.lang.String getSku()
Used to filter products by SKU. Inactive when set to NULL.

Returns:
Returns the sku.

setSku

public void setSku(java.lang.String sku)
Used to filter products by SKU. Inactive when set to NULL.

Parameters:
sku - The sku to set.

getProductType

public int getProductType()
Used to filter products by productType. In order to be inactive it should be initialized to AdminProductSearch.NOT_SET

Returns:
Returns the productType.

setProductType

public void setProductType(int productType)
Used to filter products by productType. In order to be inactive it should be initialized to AdminProductSearch.NOT_SET

Parameters:
productType - The productType to set.

isGiftCertificates

public boolean isGiftCertificates()
Used when searching for products within a promotion. If set to true and the promotion id is set, then we search for all gift certificates attached to this promotion.

Returns:
the giftCertificates

setGiftCertificates

public void setGiftCertificates(boolean giftCertificates)
Used when searching for products within a promotion. If set to true and the promotion id is set, then we search for all gift certificates attached to this promotion.

Parameters:
giftCertificates - the giftCertificates to set

getSkuRule

public int getSkuRule()
The rule for the search. Valid values are:

Returns:
the skuRule

setSkuRule

public void setSkuRule(int skuRule)
The rule for the search. Valid values are:

Parameters:
skuRule - the skuRule to set

getSearchTextRule

public int getSearchTextRule()
The rule for the search. Valid values are:

Returns:
the searchTextRule

setSearchTextRule

public void setSearchTextRule(int searchTextRule)
The rule for the search. Valid values are:

Parameters:
searchTextRule - the searchTextRule to set

getDateAvailableFrom

public java.util.Calendar getDateAvailableFrom()
When not null, only products which are available on this date or after this date are returned.

Returns:
the dateAvailableFrom

setDateAvailableFrom

public void setDateAvailableFrom(java.util.Calendar dateAvailableFrom)
When not null, only products which are available on this date or after this date are returned.

Parameters:
dateAvailableFrom - the dateAvailableFrom to set

getDateAvailableTo

public java.util.Calendar getDateAvailableTo()
When not null, only products which are available on this date or before this date are returned.

Returns:
the dateAvailableTo

setDateAvailableTo

public void setDateAvailableTo(java.util.Calendar dateAvailableTo)
When not null, only products which are available on this date or before this date are returned.

Parameters:
dateAvailableTo - the dateAvailableTo to set

getDateLastModifiedFrom

public java.util.Calendar getDateLastModifiedFrom()
When not null, only products which have been modified on this date or after this date are returned.

Returns:
the dateLastModifiedFrom

setDateLastModifiedFrom

public void setDateLastModifiedFrom(java.util.Calendar dateLastModifiedFrom)
When not null, only products which have been modified on this date or after this date are returned.

Parameters:
dateLastModifiedFrom - the dateLastModifiedFrom to set

getDateLastModifiedTo

public java.util.Calendar getDateLastModifiedTo()
When not null, only products which have been modified on this date or after before date are returned.

Returns:
the dateLastModifiedTo

setDateLastModifiedTo

public void setDateLastModifiedTo(java.util.Calendar dateLastModifiedTo)
When not null, only products which have been modified on this date or after before date are returned.

Parameters:
dateLastModifiedTo - the dateLastModifiedTo to set

getExpiryDateFrom

public java.util.Calendar getExpiryDateFrom()
When not null, only products which expire on this date or after this date are returned.

Returns:
the expiryDateFrom

setExpiryDateFrom

public void setExpiryDateFrom(java.util.Calendar expiryDateFrom)
When not null, only products which expire on this date or after this date are returned.

Parameters:
expiryDateFrom - the expiryDateFrom to set

getExpiryDateTo

public java.util.Calendar getExpiryDateTo()
When not null, only products which expire on this date or before this date are returned.

Returns:
the expiryDateTo

setExpiryDateTo

public void setExpiryDateTo(java.util.Calendar expiryDateTo)
When not null, only products which expire on this date or before this date are returned.

Parameters:
expiryDateTo - the expiryDateTo to set

getPaymentScheduleId

public int getPaymentScheduleId()
Used to only return products if they are associated to this payment schedule. In order to be inactive it should be initialized to AdminProductSearch.NOT_SET

Returns:
the paymentScheduleId

setPaymentScheduleId

public void setPaymentScheduleId(int paymentScheduleId)
Used to only return products if they are associated to this payment schedule. In order to be inactive it should be initialized to AdminProductSearch.NOT_SET

Parameters:
paymentScheduleId - the paymentScheduleId to set

isSearchCategoryTree

public boolean isSearchCategoryTree()
Only used when categoryId is set. If set to false then only category defined by categoryId is searched. Otherwise all of its children, children's children etc. are searched.

Returns:
the searchCategoryTree

setSearchCategoryTree

public void setSearchCategoryTree(boolean searchCategoryTree)
Only used when categoryId is set. If set to false then only category defined by categoryId is searched. Otherwise all of its children, children's children etc. are searched.

Parameters:
searchCategoryTree - the searchCategoryTree to set

getStartDateFrom

public java.util.Calendar getStartDateFrom()
Used for Bookable Products

Returns:
the startDateFrom

setStartDateFrom

public void setStartDateFrom(java.util.Calendar startDateFrom)
Used for Bookable Products

Parameters:
startDateFrom - the startDateFrom to set

getStartDateTo

public java.util.Calendar getStartDateTo()
Used for Bookable Products

Returns:
the startDateTo

setStartDateTo

public void setStartDateTo(java.util.Calendar startDateTo)
Used for Bookable Products

Parameters:
startDateTo - the startDateTo to set

getEndDateFrom

public java.util.Calendar getEndDateFrom()
Used for Bookable Products

Returns:
the endDateFrom

setEndDateFrom

public void setEndDateFrom(java.util.Calendar endDateFrom)
Used for Bookable Products

Parameters:
endDateFrom - the endDateFrom to set

getEndDateTo

public java.util.Calendar getEndDateTo()
Used for Bookable Products

Returns:
the endDateTo

setEndDateTo

public void setEndDateTo(java.util.Calendar endDateTo)
Used for Bookable Products

Parameters:
endDateTo - the endDateTo to set

getProductUUID

public java.lang.String getProductUUID()
UUID used to control synchronization of product copies in different stores

Returns:
the productUUID

setProductUUID

public void setProductUUID(java.lang.String productUUID)
UUID used to control synchronization of product copies in different stores

Parameters:
productUUID - the productUUID to set


Copyright © 2011 DS Data Systems UK Ltd.