atg.commerce.csr.search
Class SearchAttribute

java.lang.Object
  extended by atg.commerce.csr.search.SearchAttribute
All Implemented Interfaces:
java.lang.Cloneable

public class SearchAttribute
extends java.lang.Object
implements java.lang.Cloneable

Helper class that represents a construct of a search attribute (or property) and its relation to the search. Each attribute has a name, a proposed value, the relationship to that value and a search method.

See Also:
SearchFormHandler

Field Summary
static int ADVANCED_SEARCH_INT
           
static int CASE_INSENSITIVE_INT
           
static int CASE_SENSITIVE_INT
           
static java.lang.String CLASS_VERSION
          Class version string
static int COMPARE_SEARCH_INT
           
static java.lang.String DATE_DATATYPE
           
static java.lang.String EMAIL_DATATYPE
           
static java.lang.String EQUALS_STRING
           
static java.lang.String GREATER_STRING
           
static java.lang.String GREATERTHANOREQUALS_STRING
           
static int KEYWORD_SEARCH_INT
           
static java.lang.String LESS_STRING
           
static java.lang.String LESSTHANOREQUALS_STRING
           
static int LOWER_CASE_INT
           
static java.lang.String NOTEQUALS_STRING
           
static java.lang.String NUMERIC_DATATYPE
           
static java.lang.String STRING_DATATYPE
           
static int SUBQUERY_SEARCH_INT
           
static int SUBTYPE_SEARCH_INT
           
static int TEXT_SEARCH_INT
           
static int UPPER_CASE_INT
           
static int WILDCARD_SEARCH_INT
           
 
Constructor Summary
SearchAttribute()
          Constructors
SearchAttribute(java.lang.String pName, java.lang.String pRelation, java.lang.String[] pValues, int pMethod, int pCaseSensitive, java.lang.Boolean pIsMultiValues, char pMultiValueInputSeparator, java.lang.String pSubtypeName, java.lang.String pDisplayName, java.lang.String pDataType)
           
 
Method Summary
protected  java.lang.Object clone()
           
 int getCaseSensitive()
          Returns property mIgnoreCase
 java.lang.String getDataType()
          Returns mDataType
 java.lang.String getDescription()
          use displayName attribute to build search query description.
 java.lang.String getDisplayName()
          Returns Display Name of the Attribute
 java.lang.Boolean getIsMultiValues()
          Returns property mIsMultiValues
 int getMethod()
          Returns Search Method for the attribute
 char getMultiValueInputSeparator()
          Returns property MultiValueInputSeparator
 java.lang.String getName()
          Returns Name of the Attribute
 int getQueryBuilderRelation()
          Based on the set mRelation translates it into appropriate format for the QueryBuilder
 java.lang.String getRelation()
          Returns The Relation of the attributes real values to the proposed value
 java.lang.String getSubtypeName()
          Returns SubtypeName of the Attribute
 java.lang.String getValue()
           
 int getValueArraySize()
          Returns ValueArraySize of the Attribute
 java.lang.String[] getValues()
          Returns Proposed Value for the attribute
 java.lang.String getValues(int pIndex)
          Returns Proposed Value for the attribute
 void setCaseSensitive(int pCaseSensitive)
          Sets property mCaseSensitive
 void setDataType(java.lang.String pDataType)
          Sets mDataType
 void setDisplayName(java.lang.String pName)
          Sets Display Name of the Attribute
 void setIsMultiValues(java.lang.Boolean pIsMultiValues)
          Sets property mIsMultiValues
 void setMethod(int pMethod)
          Sets Search Method for the attribute
 void setMultiValueInputSeparator(char pMultiValueInputSeparator)
          Sets property MultiValueInputSeparator
 void setName(java.lang.String pName)
          Sets Name of the Attribute
 void setRelation(java.lang.String pRelation)
          Sets The Relation of the attributes real values to the proposed value
 void setSubtypeName(java.lang.String pSubtypeName)
          Sets SubtypeName of the Attribute
 void setValueArraySize(int pValueArraySize)
          Sets ValueArraySize of the Attribute
 void setValues(int pIndex, java.lang.String pValue)
          Sets Proposed Value for the attribute
 void setValues(java.lang.String[] pValues)
          Sets Proposed Value for the attribute
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


EQUALS_STRING

public static final java.lang.String EQUALS_STRING
See Also:
Constant Field Values

NOTEQUALS_STRING

public static final java.lang.String NOTEQUALS_STRING
See Also:
Constant Field Values

LESS_STRING

public static final java.lang.String LESS_STRING
See Also:
Constant Field Values

GREATER_STRING

public static final java.lang.String GREATER_STRING
See Also:
Constant Field Values

LESSTHANOREQUALS_STRING

public static final java.lang.String LESSTHANOREQUALS_STRING
See Also:
Constant Field Values

GREATERTHANOREQUALS_STRING

public static final java.lang.String GREATERTHANOREQUALS_STRING
See Also:
Constant Field Values

CASE_SENSITIVE_INT

public static final int CASE_SENSITIVE_INT
See Also:
Constant Field Values

CASE_INSENSITIVE_INT

public static final int CASE_INSENSITIVE_INT
See Also:
Constant Field Values

UPPER_CASE_INT

public static final int UPPER_CASE_INT
See Also:
Constant Field Values

LOWER_CASE_INT

public static final int LOWER_CASE_INT
See Also:
Constant Field Values

STRING_DATATYPE

public static final java.lang.String STRING_DATATYPE
See Also:
Constant Field Values

EMAIL_DATATYPE

public static final java.lang.String EMAIL_DATATYPE
See Also:
Constant Field Values

DATE_DATATYPE

public static final java.lang.String DATE_DATATYPE
See Also:
Constant Field Values

NUMERIC_DATATYPE

public static final java.lang.String NUMERIC_DATATYPE
See Also:
Constant Field Values

COMPARE_SEARCH_INT

public static final int COMPARE_SEARCH_INT
See Also:
Constant Field Values

KEYWORD_SEARCH_INT

public static final int KEYWORD_SEARCH_INT
See Also:
Constant Field Values

ADVANCED_SEARCH_INT

public static final int ADVANCED_SEARCH_INT
See Also:
Constant Field Values

TEXT_SEARCH_INT

public static final int TEXT_SEARCH_INT
See Also:
Constant Field Values

WILDCARD_SEARCH_INT

public static final int WILDCARD_SEARCH_INT
See Also:
Constant Field Values

SUBQUERY_SEARCH_INT

public static final int SUBQUERY_SEARCH_INT
See Also:
Constant Field Values

SUBTYPE_SEARCH_INT

public static final int SUBTYPE_SEARCH_INT
See Also:
Constant Field Values
Constructor Detail

SearchAttribute

public SearchAttribute()
Constructors


SearchAttribute

public SearchAttribute(java.lang.String pName,
                       java.lang.String pRelation,
                       java.lang.String[] pValues,
                       int pMethod,
                       int pCaseSensitive,
                       java.lang.Boolean pIsMultiValues,
                       char pMultiValueInputSeparator,
                       java.lang.String pSubtypeName,
                       java.lang.String pDisplayName,
                       java.lang.String pDataType)
Method Detail

setName

public void setName(java.lang.String pName)
Sets Name of the Attribute

Parameters:
pName - the Name of the Attribute

getName

public java.lang.String getName()
Returns Name of the Attribute


setDisplayName

public void setDisplayName(java.lang.String pName)
Sets Display Name of the Attribute

Parameters:
pName - the Display Name of the Attribute

getDisplayName

public java.lang.String getDisplayName()
Returns Display Name of the Attribute


setValues

public void setValues(java.lang.String[] pValues)
Sets Proposed Value for the attribute

Parameters:
pValues - the Proposed Value for the attribute

getValues

public java.lang.String[] getValues()
Returns Proposed Value for the attribute


setValues

public void setValues(int pIndex,
                      java.lang.String pValue)
Sets Proposed Value for the attribute


getValues

public java.lang.String getValues(int pIndex)
Returns Proposed Value for the attribute


getValue

public java.lang.String getValue()

setRelation

public void setRelation(java.lang.String pRelation)
Sets The Relation of the attributes real values to the proposed value

Parameters:
pRelation - the Relation of the attributes real values to the proposed value

getRelation

public java.lang.String getRelation()
Returns The Relation of the attributes real values to the proposed value


setMethod

public void setMethod(int pMethod)
Sets Search Method for the attribute

Parameters:
pMethod - the Search Method for the attribute

getMethod

public int getMethod()
Returns Search Method for the attribute


setDataType

public void setDataType(java.lang.String pDataType)
Sets mDataType

Parameters:
pDataType - the data type of the attribute

getDataType

public java.lang.String getDataType()
Returns mDataType


setMultiValueInputSeparator

public void setMultiValueInputSeparator(char pMultiValueInputSeparator)
Sets property MultiValueInputSeparator

Parameters:
pMultiValueInputSeparator - the property to store what characters to use to separate words in the SearchInput string.

getMultiValueInputSeparator

public char getMultiValueInputSeparator()
Returns property MultiValueInputSeparator

Returns:
The value of the property MultiValueInputSeparator

setCaseSensitive

public void setCaseSensitive(int pCaseSensitive)
Sets property mCaseSensitive

Parameters:
pCaseSensitive -

getCaseSensitive

public int getCaseSensitive()
Returns property mIgnoreCase

Returns:
The value of the property mIgnoreCase

setIsMultiValues

public void setIsMultiValues(java.lang.Boolean pIsMultiValues)
Sets property mIsMultiValues

Parameters:
pIsMultiValues -

getIsMultiValues

public java.lang.Boolean getIsMultiValues()
Returns property mIsMultiValues

Returns:
The value of the property mIsMultiValues

setValueArraySize

public void setValueArraySize(int pValueArraySize)
Sets ValueArraySize of the Attribute

Parameters:
pValueArraySize - the ValueArraySize of the Attribute

getValueArraySize

public int getValueArraySize()
Returns ValueArraySize of the Attribute


setSubtypeName

public void setSubtypeName(java.lang.String pSubtypeName)
Sets SubtypeName of the Attribute

Parameters:
pSubtypeName - the SubtypeName of the Attribute

getSubtypeName

public java.lang.String getSubtypeName()
Returns SubtypeName of the Attribute


getDescription

public java.lang.String getDescription()
use displayName attribute to build search query description. used by CSR activity logging component to record search activity return String Description of the query


getQueryBuilderRelation

public int getQueryBuilderRelation()
Based on the set mRelation translates it into appropriate format for the QueryBuilder

Returns:
relation

clone

protected java.lang.Object clone()
Overrides:
clone in class java.lang.Object