public class CollateralSearchUtility extends java.lang.Object implements CollateralSearchUtilityConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
AND_OPERATOR, ASC_OPERATOR, ATCHAST_ATCHASTPATH_ATTR, ATCHAST_ATCHTGTID_ATTR, ATCHOBJTYP_ATCHOBJTYPID_ATTR, ATCHOBJTYP_IDENTIFIER_ATTR, ATCHREL_ATCHOBJTYPID_ATTR, ATCHREL_ATCHTGTID_ATTR, ATCHREL_OBJECTID_ATTR, COLLATERAL_COLLATERALID_ATTR, COLLATERAL_FIELD1_ATTR, COLLATERAL_FIELD2_ATTR, COLLATERAL_NAME_ATTR, COLLATERAL_STORE_ATTR, COLLATERAL_TYPEID_ATTR, COLLATERAL_URL_ATTR, COLLDESC_COLLATERALID_ATTR, COLLDESC_FIELD1_ATTR, COLLDESC_FIELD2_ATTR, COLLDESC_FILENAME_ATTR, COLLDESC_LANGUAGEID_ATTR, COLLDESC_MKTTXT_ATTR, DESC_OPERATOR, EQ_OPERATOR, GROUP_BY_OPERATOR, IN_OPERATOR, LIKE_OPERATOR, ORDER_BY_OPERATOR, UPPER_FUNCTION
Constructor and Description |
---|
CollateralSearchUtility()
Default constructor of this class.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
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.
|
java.lang.String |
getAttrClassName()
Gets the instance variable used in findAttributeInfoName.
|
java.util.HashMap |
getJoinHash()
Gets the Join predicate dictionary.
|
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
public CollateralSearchUtility()
public void addResultAttribute(int resultAttribute) throws java.lang.Exception
resultAttribute
- The static integer constants equivalent to result column.
The column constants are defined in interface CollateralSearchUtilityConstants.java.lang.Exception
public void addSelectAttribute(int attribute, int operator) throws java.lang.Exception
attribute
- The static integer constant equivalent of a column name.
The column constants are defined in interface CollateralSearchUtilityConstants.operator
- The static integer constant equivalent of an operator.
The column constants are defined in interface CollateralSearchUtilityConstants.java.lang.Exception
public void addSelectAttribute(int attribute, int operator, int function) throws java.lang.Exception
attribute
- The static integer constant equivalent of a column name.
The column constants are defined in interface CollateralSearchUtilityConstants.operator
- The static integer constant equivalent of an operator.
The column constants are defined in interface CollateralSearchUtilityConstants.function
- The static integer constant equivalent of a function. At present only UPPER function is supported.java.lang.Exception
public void addSelectAttribute(int attribute, int operator, java.lang.String value) throws java.lang.Exception
attribute
- The static integer constant equivalent of a column name.
The column constants are defined in interface CollateralSearchUtilityConstants.operator
- The static integer constant equivalent of an operator.
The column constants are defined in interface CollateralSearchUtilityConstants.value
- The value to be filtered from the database.java.lang.Exception
public void addSelectAttribute(int attribute, int operator, java.lang.String value, int function) throws java.lang.Exception
attribute
- The static integer constant equivalent of a column name.operator
- The static integer constant equivalent of an operator.
The column constants are defined in interface CollateralSearchUtilityConstants.value
- The value to be filtered from the database.function
- The static integer constant equivalent of a function. At present only UPPER function is supported.java.lang.Exception
public void addSelectOperand(com.ibm.commerce.search.base.Attribute attr) throws java.lang.Exception
attr
- A WHERE clause predicate.java.lang.Exception
public void addSelectOperand(com.ibm.commerce.search.base.Predicate predicate) throws java.lang.Exception
predicate
- A collection of predicates.java.lang.Exception
public void addSelectOperator(int operator)
operator
- The static integer constant equivalent of an operator.
The operator constants are defined in interface CollateralSearchUtilityConstants.public void addOrderByAttribute(int attribute, int operator) throws java.lang.Exception
attribute
- The static integer constant equivalent of an column.
The column constants are defined in interface CollateralSearchUtilityConstants.operator
- The static integer constant equivalent of an ASC or DESC operator.
The column constants are defined in interface CollateralSearchUtilityConstants.java.lang.Exception
public com.ibm.commerce.search.base.Attribute addJoinAttribute(int attribute1, int operator, int attribute2) throws java.lang.Exception
attribute1
- The static integer constant equivalent of a column name.
The column constants are defined in interface CollateralSearchUtilityConstants.operator
- The static integer constant equivalent of an operator.
The column constants are defined in interface CollateralSearchUtilityConstants.attribute2
- The static integer constant equivalent of a column name.
The column constants are defined in interface CollateralSearchUtilityConstants.java.lang.Exception
public java.util.Vector execute(com.ibm.commerce.base.objects.Cursor aCursor) throws java.lang.Exception
aCursor
- The cursor object.java.lang.Exception
public java.util.Vector execute() throws java.lang.Exception
java.lang.Exception
public void setLanguageId(java.lang.Integer i)
i
- Language ID.public java.lang.String getAttrClassName()
public void setAttrClassName(java.lang.String attrClassNam)
attrClassNam
- Instance variable used in findAttributeInfoName.public java.util.HashMap getJoinHash()
public void setJoinHash(java.util.HashMap map)
map
- Join predicate dictionary.