|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.endeca.portal.data.functions.QueryFunction
public abstract class QueryFunction
The base class of all QueryFunctions. Wraps functionality for serializing and deserializing, cloning, and comparing. Refer to subclasses for specific types of functions.
QueryFilter
or QueryConfig
, not this class directly.
Other than that, simply pay attention to the abstract methods in this class
and your toString()
implementation.
QueryFilter
,
QueryConfig
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
CLASS_PROPERTY
|
static java.lang.String |
VIEWKEY_PROPERTY
|
Constructor Summary | |
---|---|
protected |
QueryFunction()
|
Method Summary | |
---|---|
abstract void |
applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query,
java.lang.String stateName)
Apply this function to a Request. |
void |
beforeQueryStateAdd(QueryState state)
Function to check for any additional conditions when adding to the query state. |
void |
beforeQueryStateRemove(QueryState state)
|
QueryFunction |
clone()
|
boolean |
equals(java.lang.Object other)
|
boolean |
equals(QueryFunction other)
Compares two QueryFunction instances by checking class types and using the object's toString() method |
java.lang.String |
getCompareString()
Return the compare string of QueryFunctions instance the default value get from toString method. |
java.lang.String |
getName()
Retrieve the name. |
int |
getVersion()
Retrieve the version. |
java.lang.String |
getViewKey()
Indicates the view against which this function applies. |
int |
hashCode()
|
void |
initializeFromJSON(MDEXState mdexState)
This method is called when constructing a MDEXState's initialQueryState from a json object. |
boolean |
passesSelectiveFilter(java.util.List<java.lang.String> selectiveRefinements)
Override this method for each query filter that can be restricted by the selective refinements state manager feature. |
void |
setName(java.lang.String name)
Set the name. |
void |
setVersion(int version)
Set the version. |
void |
setViewKey(java.lang.String viewKey)
Sets the view against which this function applies. |
void |
substituteAttributeKeys(AttributeKeyConverter attributeKeyConverter,
java.util.Locale currentLocale)
Substitute the attribute keys in the QueryFunction with new values specified in attributeKeyMap |
abstract java.lang.String |
toString()
This class' toString is abstract: all concrete subclasses are expected to provide an implementation. toString is used in comparing QueryFunction instances for equality, so if you implement a QueryFunction subclass it is important that your toString implementation be consistent and deterministic. |
QueryFunction |
upgrade()
Upgrade the query function in the case of an upgrade. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_PROPERTY
public static final java.lang.String VIEWKEY_PROPERTY
Constructor Detail |
---|
protected QueryFunction()
Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic java.lang.String getViewKey()
public void setViewKey(java.lang.String viewKey)
the
- view keypublic int getVersion()
public void setVersion(int version)
version
- the version to setpublic QueryFunction upgrade()
public abstract void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query, java.lang.String stateName) throws QueryFunctionUnsupportedException
query
- the CS Request to which this function should be appliedstateName
- stateName to use for filters or content element configs
QueryFunctionUnsupportedException
public void substituteAttributeKeys(AttributeKeyConverter attributeKeyConverter, java.util.Locale currentLocale)
attributeKeyMap
- public abstract java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getCompareString()
public QueryFunction clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean equals(QueryFunction other)
other
-
QueryFunction
equals the otherpublic int hashCode()
hashCode
in class java.lang.Object
public void beforeQueryStateAdd(QueryState state)
public void beforeQueryStateRemove(QueryState state)
public void initializeFromJSON(MDEXState mdexState) throws QueryFunctionInitializationException
ArbitraryLQLASTFilter
classes use this technique to allow different params/member vars for initialization
from json vs. initialization programmatically from within Java.
mdexState
- the MDEXState object on which this QueryFunction exists
QueryFunctionInitializationException
public boolean passesSelectiveFilter(java.util.List<java.lang.String> selectiveRefinements)
selectiveRefinements
- List of selective refinement attributes that are
valid for the current data source.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |