|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.endeca.portal.data.QueryState
public class QueryState
QueryState is an API-agnostic representation of a query that can
be executed against an MDEX engine to retrieve results. QueryState instances
can be interacted with and altered via their list of QueryFunction
instances.
DataSource,
QueryFunction,
Serialized Form| Constructor Summary | |
|---|---|
QueryState()
Instantiate a QueryState with empty function list. |
|
QueryState(org.json.JSONArray serializedState)
Instantiate a QueryState from a serialized representation. |
|
| Method Summary | ||
|---|---|---|
void |
addFunction(QueryFunction function)
Add a specified QueryFunction to this QueryState, checking for duplicate multi select attribute refinements and override any single select attribute refinements |
|
void |
addFunctions(java.util.List<? extends QueryFunction> functions)
Add a list of QueryFunctions to this QueryState |
|
QueryState |
clone()
|
|
static java.util.List<QueryFunction> |
cloneFunctionList(java.util.List<QueryFunction> list)
Clone a List of QueryFunction instances. |
|
boolean |
equivalent(QueryState q)
Convenience method to check equivalence of query states A QueryState is equivalent to another if they contain the same non-QueryConfig QueryFunctions, in the same order. |
|
java.util.List<QueryFunction> |
getFunctions()
Get direct access to the QueryFunction list. |
|
|
getFunctions(java.lang.Class<T> klass)
Get a list of all query functions of the specified class (determined using .isInstance). |
|
void |
removeAllFunctions()
Clear all query functions from this query state |
|
void |
removeFunction(QueryFunction function)
Remove particular function based on .equals() equality |
|
void |
removeFunctions(java.lang.Class<? extends QueryFunction> klass)
Removes each filter in the list of a given type (determined using .isInstance). |
|
void |
removeFunctions(java.util.List<? extends QueryFunction> functions)
Remove each function in the given list based on .equals() equality |
|
org.json.JSONArray |
toJSON()
Create a JSON representation of this query state and its query functions. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public QueryState()
public QueryState(org.json.JSONArray serializedState)
serializedState - toJSON()| Method Detail |
|---|
public void addFunction(QueryFunction function)
function - the function to addpublic void addFunctions(java.util.List<? extends QueryFunction> functions)
functions - the list of functions to addpublic void removeFunction(QueryFunction function)
function - The function to removepublic void removeFunctions(java.util.List<? extends QueryFunction> functions)
functions - The functions to removepublic void removeFunctions(java.lang.Class<? extends QueryFunction> klass)
klass - The class of filters to removepublic void removeAllFunctions()
public java.util.List<QueryFunction> getFunctions()
public <T extends QueryFunction> java.util.List<T> getFunctions(java.lang.Class<T> klass)
T - klass - The class, extending from QueryFunction, to match against
public org.json.JSONArray toJSON()
public java.lang.String toString()
toString in class java.lang.Objectpublic QueryState clone()
clone in class java.lang.Objectpublic static java.util.List<QueryFunction> cloneFunctionList(java.util.List<QueryFunction> list)
list - the list to clone
public boolean equivalent(QueryState q)
q - The query state to compare against
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||