java.lang.Object | +--com.ibm.commerce.search.rulequery.SelectQuery
SelectQuery is similar to RuleQuery. There are two main differences. SelectQuery can be used to formulate multiple queries and execute them all in one go. SelectQuery also has following flexibility in retrieving the results. 1. Retrieves all non duplicate catentry ids for the set of queries, 2. Retrieves a fixed number of non duplicate catentry ids as returned by the database for the set of queries, 3. Retrieves a fixed number of non duplicate catentry ids picked in random for the set of queries. SelectQuery intenally depends on RuleQuery for most of its functions.
Constructor Summary | |
---|---|
SelectQuery() Default select query constructor. | |
SelectQuery(int aStoreID, int aUserID) SelectQuery constructor with store and user id as arguments. | |
SelectQuery(int inStoreID,
TradingAgreementAccessBean[] inAgreements) Deprecated. | |
SelectQuery(int inStoreID,
TradingAgreementAccessBean[] inAgreements,
java.lang.Long userId) SelectQuery constructor with store id, trading agreement access bean and user id as arguments. | |
SelectQuery(
TradingAgreementAccessBean[] inAgreements) Deprecated. | |
SelectQuery(
TradingAgreementAccessBean[] inAgreements,
java.lang.Long userId) SelectQuery constructor with trading agreement access bean and user id as arguments. | |
SelectQuery(java.util.Vector inStoreIDs, int aUserID) SelectQuery constructor with a collection of store ids and an user id as arguments. | |
SelectQuery(java.util.Vector inStoreIDs,
TradingAgreementAccessBean[] inAgreements) Deprecated. | |
SelectQuery(java.util.Vector inStoreIDs,
TradingAgreementAccessBean[] inAgreements,
java.lang.Long userId) SelectQuery constructor with a collection of store ids, trading agreement access bean and user id as arguments. |
Method Summary | |
---|---|
void |
addFilterAttribute(int attribute, int operator) Adds a predicate to query Where clause to filter a row, example, TABLE.COLUMN IS NOT NULL. |
void |
addFilterAttribute(int attribute, int operator,
int function) Adds a predicate to query Where clause to filter a row, example FUNCTION(TABLE.COLUMN) IS NULL. |
void |
addFilterAttribute(int attribute, int operator,
java.lang.String value) Adds a predicate to query Where clause to filter a row, example, TABLE.COLUMN LIKE '%VALUE%'. |
void |
addFilterAttribute(int attribute, int operator, java.lang.String value,
int function) Adds a predicate to query Where clause to filter a row, example FUNCTION(TABLE.COLUMN) LIKE '%VALUE%'. |
void |
addFilterAttribute(Predicate predicate) Adds a collection of WHERE clause predicates into temporary filter predicate collection. |
void |
addFilterOperator(int operator) Adds an operator that combines a set of filter predicates. |
void |
addGlobalPredicate(Predicate p) Method to insert a predicate that will be applied to entire query like BUYABLE/PUBLISHABLE/LANGUAGE_ID. |
void |
addGroupByAttribute(int attribute) To set group by operator |
void |
addOrderByAttribute(int attribute, int operator) To set order by operator |
void |
addRule() Adds an set of predicates to a Query. |
void |
addRule(int aQueryType) Adds a set of predicate to Query. |
void |
addSelectAttribute(int attribute, int operator) Adds a predicate to query Where clause, example, TABLE.COLUMN IS NOT NULL. |
void |
addSelectAttribute(int attribute, int operator,
int function) Adds a predicate to query Where clause, example FUNCTION(TABLE.COLUMN) IS NULL. |
void |
addSelectAttribute(int attribute, int operator,
java.lang.String value) Adds a predicate to query Where clause, example, TABLE.COLUMN LIKE '%VALUE%'. |
void |
addSelectAttribute(int attribute, int operator, java.lang.String value,
int function) Adds a predicate to query Where clause, example FUNCTION(TABLE.COLUMN) LIKE '%VALUE%'. |
void |
addSelectAttribute(java.lang.String attribute, int operator,
java.lang.String value) Deprecated. |
void |
addSelectAttribute(java.lang.String attribute, int operator,
java.lang.String value, int attrValueType, java.lang.String languageId,
java.lang.String prodType) Adds a Rich attribute predicate. |
void |
addSelectAttribute(java.lang.String attribute, int operator,
java.lang.String value, int attrValueType, java.lang.String languageId,
java.lang.String prodType, int function) Adds a Rich attribute predicate. |
void |
addSelectAttribute(java.lang.String attribute, int operator,
java.lang.String value, java.lang.String languageId,
java.lang.String prodType) Deprecated. |
void |
addSelectAttribute(java.lang.String attribute, int operator,
java.lang.String value, java.lang.String languageId, java.lang.String prodType,
int function) Deprecated. |
void |
addSelectOperand(Predicate predicate) Adds a collection of WHERE clause predicates into temporary select set predicate collection. |
void |
addSelectOperator(int operator) Adds an operator that combines a set of filter predicates. |
java.util.Vector |
execute() Executes a set of catalog search query and retrieves all non duplicate catentry ids that satisfy these query. |
java.util.Vector |
execute(int maxResults) Executes a set of catalog search query and retrieves certian number (specified in maxResults) of non duplicate catentry ids that satisfy these query. |
java.util.Vector |
execute(int maxResults, Cursor aCursor) Executes a set of catalog search query and retrieves certian number (specified in maxResults) of non duplicate catentry ids that satisfy these query. |
protected
java.lang.String |
findAttributeInfoName(int attrId) Maps a static integer constant that defines a column name to the singleton class name that describes the column name, its data type, and the table it belong to. |
protected
AttributeInfo |
getInstanceOfAttrInfoByClassName(java.lang.String classname) Given a class name in com.ibm.commerce.search.catalog package, gets the instance of the class. |
java.lang.Long |
getLongUserId() Do not modify. |
Predicate |
getPredicate() Do not modify. |
java.util.Vector |
getRules() Do not modify. |
java.lang.Integer |
getStoreID() Do not modify. |
java.util.Vector |
getStoreIDs() Do not modify. |
java.lang.Integer |
getUserID() Do not modify. |
void |
reset() Re-initialize filterSet and selectSet variables |
void |
setDistinct() To set disctict operator |
void |
setDistinct(boolean distinctFlag) To set disctict operator |
void |
setLongUserId(java.lang.Long newLongUserId) Do not modify. |
void |
setRules(java.util.Vector newRules) Do not modify. |
void |
setStoreID(int newStoreID) Do not modify. |
void |
setStoreIDs(java.util.Vector newStoreIDs) Do not modify. |
void |
setUserID(int newUserID) Do not modify. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final int LISTPRICE_LISTPRICE_Attr
public static final int LISTPRICE_Attr
public static final int LISTPRICE_CURRENCY_Attr
public static final int LISTPRICE_CATENTRY_ID_Attr
public static final int STOREINVENTORY_QUANTITY_Attr
public static final int STOREINVENTORY_QUANTITY_MEASURE_Attr
public static final int CATGRPDESC_NAME_Attr
public static final int CATGRPDESC_LANGUAGE_ID_Attr
public static final int CATGRPDESC_LONGDESCRIPTION_Attr
public static final int CATGRPDESC_SHORTDESCRIPTION_Attr
public static final int CATGRPDESC_KEYWORD_Attr
public static final int CATGRPDESC_PUBLISHED_Attr
public static final int CATENTRY_SKU_Attr
public static final int CATENTRY_CATENTRY_ID_Attr
public static final int CATENTRY_ID_Attr
public static final int CATENTRY_BUYABLE_Attr
public static final int CATENTRY_ONAUCTION_Attr
public static final int CATENTRY_ONSPECIAL_Attr
public static final int CATENTRY_PARTNUMBER_Attr
public static final int CATENTRY_MFNAME_Attr
public static final int CATENTRY_MFPARTNUMBER_Attr
public static final int CATENTRY_MARKFORDELETE_Attr
public static final int CATENTRY_LASTUPDATE_Attr
public static final int CATENTDESC_NAME_Attr
public static final int CATENTDESC_AVAILABILITY_DATE_Attr
public static final int CATENTDESC_LANGUAGE_ID_Attr
public static final int CATENTDESC_PUBLISHED_Attr
public static final int CATENTDESC_SHORT_DESC_Attr
public static final int CATENTDESC_CATENTRY_ID_Attr
public static final int CATENTDESC_THUMBNAIL_Attr
public static final int CATENTDESC_LONGDESCRIPTION_Attr
public static final int CATENTDESC_SHORTDESCRIPTION_Attr
public static final int CATENTDESC_PARTNUMBER_Attr
public static final int CATENTDESC_KEYWORD_Attr
public static final int CATENTDESC_AVAILABLE_Attr
public static final int STORECATENTRY_STORE_ID_Attr
public static final int USER_ID_Attr
public static final int CATENTREL_CATENTRY_ID_CHILD_Attr
public static final int CATENTREL_CATENTRY_ID_PARENT_Attr
public static final int CATENTREL_CATREL_TYPE_ID_Attr
public static final int ATTRIBUTE_NAME_Attr
public static final int ATTRIBUTE_LANGUAGE_ID_Attr
public static final int ATTRIBUTE_CATENTRY_ID_Attr
public static final int ATTRIBUTE_ATTRIBUTE_ID_Attr
public static final int ATTRVALUE_LANGUAGE_ID_Attr
public static final int ATTRVALUE_NAME_Attr
public static final int ATTRVALUE_CATENTRY_ID_Attr
public static final int ATTRVALUE_STRINGVALUE_Attr
public static final int ATTRVALUE_ATTRIBUTE_ID_Attr
public static final int ATTRVALUE_FLOATVALUE_Attr
public static final int ATTRVALUE_INTEGERVALUE_Attr
public static final int CATGPENREL_CATGROUP_ID_Attr
public static final int CATGPENREL_CATENTRY_ID_Attr
public static final int CATGPENREL_CATALOG_ID_Attr
public static final int CATGROUP_CATGROUP_ID_Attr
public static final int CATGROUP_MARKFORDELETE_Attr
public static final int CATGROUP_LASTUPDATE_Attr
public static final int CATGROUP_IDENTIFIER_ID_Attr
public static final int CATGROUP_IDENTIFIER_Attr
public static final int PRSETCEREL_PRODUCTSET_ID_Attr
public static final int PRSETCEREL_CATENTRY_ID_Attr
public static final int OFFERPRICE_PRICE_Attr
public static final int OFFERPRICE_OFFER_ID_Attr
public static final int OFFERPRICE_CURRENCY_Attr
public static final int OFFER_TRADEPOSCN_ID_Attr
public static final int OFFER_OFFER_ID_Attr
public static final int OFFER_MAXIMUMQUANTITY_Attr
public static final int OFFER_MINIMUMQUANTITY_Attr
public static final int TRADEPOSCN_TRADEPOSCN_ID_Attr
public static final int TRADEPOSCN_TYPE_ID_Attr
public static final int INVSTVW_QUANTITY_AVAILABLE_Attr
public static final int INVSTVW_QUANTITY_MEASURE_Attr
public static final int INVSTVW_STORE_ID_Attr
public static final int STDPRICEVW_PRICE_Attr
public static final int STDPRICEVW_CATENTRY_ID_Attr
public static final int STDPRICEVW_CURRENCY_Attr
public static final int CATALOG_CATALOG_ID_Attr
public static final int CATALOG_DESCRIPTION_Attr
public static final int CATALOG_IDENTIFIER_Attr
public static final int CATALOGDSC_NAME_Attr
public static final int CATALOGDSC_SHORTDESCRIPTION_Attr
public static final int CATALOGDSC_LANGUAGE_ID_Attr
public static final int STORECAT_MASTERCATALOG_Attr
public static final int STORECAT_STOREENT_ID_Attr
public static final int STORECGRP_STOREENT_ID_Attr
public static final int OR_Operator
public static final int AND_Operator
public static final int IS_NULL_Operator
public static final int IS_NOT_NULL_Operator
public static final int LIKE_Operator
public static final int LEFT_LIKE_Operator
public static final int RIGHT_LIKE_Operator
public static final int NOT_LIKE_Operator
public static final int NOT_LEFT_LIKE_Operator
public static final int NOT_RIGHT_LIKE_Operator
public static final int EQ_Operator
public static final int GT_Operator
public static final int GE_Operator
public static final int LT_Operator
public static final int LE_Operator
public static final int NE_Operator
public static final int IN_Operator
public static final int NOT_IN_Operator
public static final int NOT_GT_Operator
public static final int NOT_LT_Operator
public static final int GROUP_BY_Operator
public static final int ORDER_BY_Operator
public static final int COUNT_Operator
public static final int ASC_Operator
public static final int DESC_Operator
public static final int MIN_Operator
public static final int MAX_Operator
public static final int SUM_Operator
public static final int AVG_Operator
public static final int UPPER_Function
public static final int GENERIC_QueryType
public static final int CATENTRY_SKU_QueryType
public static final int ANY_QueryType
public static final int ITEM_QueryType
public static final int BOTH_QueryType
public static final int ITEM_CatEntryType
public static final int BUNDLE_CatEntryType
public static final int PACKAGE_CatEntryType
public static final int PRODUCT_CatEntryType
public static final java.lang.String ALL_Item
Constructor Detail |
---|
public SelectQuery()
public SelectQuery(TradingAgreementAccessBean[] inAgreements)
public SelectQuery(TradingAgreementAccessBean[] inAgreements, java.lang.Long userId)
inAgreements
- The trading agreement access bean array - used
in entitlementpublic SelectQuery(int inStoreID, TradingAgreementAccessBean[] inAgreements)
public SelectQuery(int inStoreID, TradingAgreementAccessBean[] inAgreements, java.lang.Long userId)
inAgreements
- The trading agreement access bean array - used
in entitlementpublic SelectQuery(int aStoreID, int aUserID)
public SelectQuery(java.util.Vector inStoreIDs, TradingAgreementAccessBean[] inAgreements)
public SelectQuery(java.util.Vector inStoreIDs, TradingAgreementAccessBean[] inAgreements, java.lang.Long userId)
inAgreements
- The trading agreement access bean array - used
in entitlementpublic SelectQuery(java.util.Vector inStoreIDs, int aUserID)
Method Detail |
---|
public void addFilterAttribute(int attribute, int operator) throws java.lang.Exception
java.lang.Exception
public void addFilterAttribute(int attribute, int operator, int function) throws java.lang.Exception
java.lang.Exception
public void addFilterAttribute(int attribute, int operator, java.lang.String value) throws java.lang.Exception
java.lang.Exception
public void addFilterAttribute(int attribute, int operator, java.lang.String value, int function) throws java.lang.Exception
java.lang.Exception
public void addFilterAttribute(Predicate predicate) throws java.lang.Exception
java.lang.Exception
public void addFilterOperator(int operator)
public void addGlobalPredicate(Predicate p)
public void addGroupByAttribute(int attribute) throws java.lang.Exception
java.lang.Exception
public void addOrderByAttribute(int attribute, int operator) throws java.lang.Exception
java.lang.Exception
public void addRule()
public void addRule(int aQueryType)
aQueryType
- The type of result to be retrieved by the query.
The search interface can retrieve only Products, only Items or
Both.public void addSelectAttribute(int attribute, int operator) throws java.lang.Exception
java.lang.Exception
public void addSelectAttribute(int attribute, int operator, int function) throws java.lang.Exception
java.lang.Exception
public void addSelectAttribute(int attribute, int operator, java.lang.String value) throws java.lang.Exception
java.lang.Exception
public void addSelectAttribute(int attribute, int operator, java.lang.String value, int function) throws java.lang.Exception
java.lang.Exception
public void addSelectAttribute(java.lang.String attribute, int operator, java.lang.String value) throws java.lang.Exception
java.lang.Exception
public void addSelectAttribute(java.lang.String attribute, int operator, java.lang.String value, int attrValueType, java.lang.String languageId, java.lang.String prodType) throws java.lang.Exception
attribute
- A search attribute, for example Color, Size.operator
- The static integer operator constant.value
- The value of a search attribute, for example Red,
Length = 32.attrValueType
- The column in AttrValue table that must be
used to search for the value, example Intergervalue, Stringvalue, Floatvalue or
Name.languageId
- The language id that must be used for searching
the rich attribute.prodType
- The Parent - Child relationship defined in CATENREL
table. At present this method only supports Product_Item or NULL.java.lang.Exception
public void addSelectAttribute(java.lang.String attribute, int operator, java.lang.String value, int attrValueType, java.lang.String languageId, java.lang.String prodType, int function) throws java.lang.Exception
attribute
- A search attribute, for example Color, Size.operator
- The static integer operator constant.value
- The value of a search attribute, for example Red,
Length = 32.attrValueType
- The column in AttrValue table that must be
used to search for the value, example Intergervalue, Stringvalue, Floatvalue or
Name.languageId
- The language id that must be used for searching
the rich attribute.prodType
- The Parent - Child relationship defined in CATENREL
table. At present this method only supports Product_Item or NULL.function
- The static integer operator for UPPER functionjava.lang.Exception
public void addSelectAttribute(java.lang.String attribute, int operator, java.lang.String value, java.lang.String languageId, java.lang.String prodType) throws java.lang.Exception
java.lang.Exception
public void addSelectAttribute(java.lang.String attribute, int operator, java.lang.String value, java.lang.String languageId, java.lang.String prodType, int function) throws java.lang.Exception
java.lang.Exception
public void addSelectOperand(Predicate predicate) throws java.lang.Exception
predicate
- A collection of predicates.java.lang.Exception
public void addSelectOperator(int operator)
public java.util.Vector execute() throws java.lang.Exception
java.lang.Exception
public java.util.Vector execute(int maxResults) throws java.lang.Exception
maxResults
- The number of results to be retrieved.java.lang.Exception
public java.util.Vector execute(int maxResults, Cursor aCursor) throws java.lang.Exception
maxResults
- The number of results to be retrieved.aCursor
- The cusrsor object.java.lang.Exception
protected java.lang.String findAttributeInfoName(int attrId)
attrId
- The static integer constant that defines a column
name.protected AttributeInfo getInstanceOfAttrInfoByClassName(java.lang.String classname) throws java.lang.Exception
classname
- The name of a class in
com.ibm.commerce.search.catalog package.java.lang.Exception
public java.lang.Long getLongUserId()
public Predicate getPredicate() throws java.lang.Exception
java.lang.Exception
public java.util.Vector getRules()
public java.lang.Integer getStoreID()
public java.util.Vector getStoreIDs()
public java.lang.Integer getUserID()
public void reset()
public void setDistinct()
public void setDistinct(boolean distinctFlag)
public void setLongUserId(java.lang.Long newLongUserId)
newLongUserId
- java.lang.Longpublic void setRules(java.util.Vector newRules)
newRules
- java.util.Vectorpublic void setStoreID(int newStoreID)
newStoreID
- intpublic void setStoreIDs(java.util.Vector newStoreIDs)
newStoreIDs
- java.util.Vectorpublic void setUserID(int newUserID)