public class CollateralSearchUtility extends java.lang.Object implements CollateralSearchUtilityConstants
Modifier and Type | Field and Description |
---|---|
protected java.lang.String | attrClassName
Instance variable used in findAttributeInfoName.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
protected java.util.HashMap | joinHash
Instance variable to store all the join predicates.
|
Constructor and Description |
---|
CollateralSearchUtility()
Default constructor of this class.
|
Modifier and Type | Method and Description |
---|---|
protected com.ibm.commerce.search.base.Attribute | addAttributeFunction(com.ibm.commerce.search.base.Attribute attr, int function)
Adds function to a table column.
|
com.ibm.commerce.search.base.Attribute | addJoinAttribute(int attribute1, int operator, int attribute2)
Adds a join predicate to query Where clause, example TABLE.COLUMN = TABLE.COLUMN.
|
protected com.ibm.commerce.search.base.Operator | addOperatorType(int operType)
Maps constants that represent an operator to actual Operator object.
|
void | addOrderByAttribute(int attribute, int operator)
To set order by operator.
|
void | addResultAttribute(int resultAttribute)
This method adds result set to Select clause.
|
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 | addSelectOperand(com.ibm.commerce.search.base.Attribute attr)
Adds a WHERE clause predicate into temporary select set predicate collection.
|
void | addSelectOperand(com.ibm.commerce.search.base.Predicate predicate)
Adds a collection of WHERE clause predicates into temporary select set predicate collection.
|
void | addSelectOperator(int operator)
This method adds operator to the Where clause.
|
protected void | consJoinDictionary()
Create a JOIN predicate dictionary.
|
protected void | constructLanguagePredicate()
This method constructs default language predicate COLLDESC.LANGUAGE_ID = ?, when COLLDESC table is in the SQL.
|
java.util.Vector | execute()
Executes query and retrieves a result set.
|
java.util.Vector | execute(com.ibm.commerce.base.objects.Cursor aCursor)
Executes query and retrieves a set of results as mentioned in Cursor object.
|
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.
|
java.lang.String | getAttrClassName()
Gets the instance variable used in findAttributeInfoName.
|
protected AttributeInfo | getInstanceOfAttrInfoByClassName(java.lang.String classname)
Given a class name in com.ibm.commerce.tools.campaigns.search, gets the instance of the class.
|
java.util.HashMap | getJoinHash()
Gets the Join predicate dictionary.
|
protected java.lang.Integer | getLanguageId()
To retrieve the language ID.
|
protected java.util.ArrayList | getTables()
This method retrieves Tables in Query object.
|
void | setAttrClassName(java.lang.String attrClassNam)
Sets the instance variable used in findAttributeInfoName.
|
void | setJoinHash(java.util.HashMap map)
Sets the Join predicate dictionary.
|
void | setLanguageId(java.lang.Integer i)
To set language ID.
|
public static final java.lang.String COPYRIGHT
protected java.lang.String attrClassName
protected java.util.HashMap joinHash
public CollateralSearchUtility()
protected com.ibm.commerce.search.base.Attribute addAttributeFunction(com.ibm.commerce.search.base.Attribute attr, int function)
protected com.ibm.commerce.search.base.Operator addOperatorType(int operType)
public void addResultAttribute(int resultAttribute) throws java.lang.Exception
public void addSelectAttribute(int attribute, int operator) throws java.lang.Exception
public void addSelectAttribute(int attribute, int operator, int function) throws java.lang.Exception
public void addSelectAttribute(int attribute, int operator, java.lang.String value) throws java.lang.Exception
public void addSelectAttribute(int attribute, int operator, java.lang.String value, int function) throws java.lang.Exception
public void addSelectOperand(com.ibm.commerce.search.base.Attribute attr) throws java.lang.Exception
public void addSelectOperand(com.ibm.commerce.search.base.Predicate predicate) throws java.lang.Exception
public void addSelectOperator(int operator)
protected java.lang.String findAttributeInfoName(int attrId)
protected AttributeInfo getInstanceOfAttrInfoByClassName(java.lang.String classname) throws java.lang.Exception
public void addOrderByAttribute(int attribute, int operator) throws java.lang.Exception
public com.ibm.commerce.search.base.Attribute addJoinAttribute(int attribute1, int operator, int attribute2) throws java.lang.Exception
public java.util.Vector execute(com.ibm.commerce.base.objects.Cursor aCursor) throws java.lang.Exception
public java.util.Vector execute() throws java.lang.Exception
protected void consJoinDictionary() throws java.lang.Exception
protected java.util.ArrayList getTables()
protected void constructLanguagePredicate() throws java.lang.Exception
protected java.lang.Integer getLanguageId()
public void setLanguageId(java.lang.Integer i)
public java.lang.String getAttrClassName()
public void setAttrClassName(java.lang.String attrClassNam)
public java.util.HashMap getJoinHash()
public void setJoinHash(java.util.HashMap map)