com.endeca.portal.data.functions
Class LQLQueryConfig

java.lang.Object
  extended by com.endeca.portal.data.functions.QueryFunction
      extended by com.endeca.portal.data.functions.QueryConfig
          extended by com.endeca.portal.data.functions.LQLQueryConfig
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class LQLQueryConfig
extends QueryConfig

See Also:
Serialized Form

Field Summary
static java.lang.String AST_HANDLER_FUNCTION
           
static java.lang.String DEFAULT_ID
           
 
Fields inherited from class com.endeca.portal.data.functions.QueryConfig
id
 
Fields inherited from class com.endeca.portal.data.functions.QueryFunction
CLASS_PROPERTY
 
Constructor Summary
protected LQLQueryConfig()
           
  LQLQueryConfig(com.endeca.mdex.lql_parser.types.Query lqlQuery)
          Construct a new LQLQueryConfig with a specified query in the pre-parsed ast format.
  LQLQueryConfig(java.lang.String id, com.endeca.mdex.lql_parser.types.Query lqlQuery)
          Construct a new LQLQueryConfig with a specified query in pre-parsed ast format.
 
Method Summary
 void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request request)
          Apply this function to a Request.
 com.endeca.mdex.lql_parser.types.Query getQuery()
          gets the LQL expression in object form
 java.lang.String getQueryString()
          Returns an XML representation of this query's LQL AST.
 void setQuery(com.endeca.mdex.lql_parser.types.Query lqlQuery)
          sets the LQL query from an object form.
 void setQueryString(java.lang.String queryString)
          Sets this query's LQL AST expression from an XML representation.
 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.
 
Methods inherited from class com.endeca.portal.data.functions.QueryConfig
getId, setId
 
Methods inherited from class com.endeca.portal.data.functions.QueryFunction
beforeQueryStateAdd, clone, equals, equals, getName, hashCode, initializeFromJSON, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_ID

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

AST_HANDLER_FUNCTION

public static final java.lang.String AST_HANDLER_FUNCTION
See Also:
Constant Field Values
Constructor Detail

LQLQueryConfig

protected LQLQueryConfig()

LQLQueryConfig

public LQLQueryConfig(com.endeca.mdex.lql_parser.types.Query lqlQuery)
Construct a new LQLQueryConfig with a specified query in the pre-parsed ast format.

Parameters:
lqlQuery -

LQLQueryConfig

public LQLQueryConfig(java.lang.String id,
                      com.endeca.mdex.lql_parser.types.Query lqlQuery)
Construct a new LQLQueryConfig with a specified query in pre-parsed ast format.

Parameters:
id - A string id used to distinguish this function from others
lqlQuery -
Method Detail

getQuery

public com.endeca.mdex.lql_parser.types.Query getQuery()
gets the LQL expression in object form

Returns:
the LQL expression in object form

setQuery

public void setQuery(com.endeca.mdex.lql_parser.types.Query lqlQuery)
sets the LQL query from an object form.

Parameters:
lqlQuery - the LQL query in object form

getQueryString

public java.lang.String getQueryString()
Returns an XML representation of this query's LQL AST. This representation was previously created via LQLUtils.queryToString(Query).

Returns:
XML representation of the LQL AST

setQueryString

public void setQueryString(java.lang.String queryString)
Sets this query's LQL AST expression from an XML representation. To set the query directly from an object, see setQuery(Query). The XML input should have previously been generated by getQueryString() or LQLUtils.queryToString(Query). We recommend that users do not call this method directly. This method exists is required for deserialization of QueryState objects.

Parameters:
queryString - XML representation of the expression

applyToDiscoveryServiceQuery

public void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request request)
                                  throws QueryFunctionUnsupportedException
Description copied from class: QueryFunction
Apply this function to a Request. Must be implemented by subclass.

Specified by:
applyToDiscoveryServiceQuery in class QueryFunction
Throws:
QueryFunctionUnsupportedException

toString

public java.lang.String toString()
Description copied from class: QueryFunction
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.

Specified by:
toString in class QueryFunction