com.endeca.portal.mdex
Class ENEQueryUtil

java.lang.Object
  extended by com.endeca.portal.mdex.ENEQueryUtil

Deprecated.

@Deprecated
public class ENEQueryUtil
extends java.lang.Object

Helper class containing useful methods to execute on an ENEQuery

Author:
Endeca Technologies, Inc.

Field Summary
static java.util.List<java.lang.String> DGIDX_PROPS
          Deprecated. list of dgidx-created system properties
 
Constructor Summary
ENEQueryUtil()
          Deprecated.  
 
Method Summary
static com.endeca.navigation.ENEQuery addQueryTracking(com.endeca.navigation.ENEQuery query, RequestIds requestIds)
          Deprecated. instruments a MDEX 6 query by setting an ENEQueryInfo object on the query
static com.endeca.navigation.ENEQuery copyQuery(com.endeca.navigation.ENEQuery previousQuery)
          Deprecated. This method takes an ENEQuery object and makes a copy of it.
static com.endeca.navigation.ENEQueryResults execute(MDEXState mdexState, com.endeca.navigation.ENEQuery query, RequestIds requestIds)
          Deprecated.  
static com.endeca.navigation.ENEQuery fromJSONObject(org.json.JSONObject j)
          Deprecated. Creates a new ENEQuery object based on the contents of this JSON object.
static com.endeca.navigation.ENEQuery fromJSONString(java.lang.String s)
          Deprecated. Creates a new ENEQuery object based on the contents of this JSON packet.
static int hashCode(com.endeca.navigation.ENEQuery query)
          Deprecated. Returns a hashcode of the query, used to tersely identify the contents of the query.
static int hashCode(java.lang.String jsonString)
          Deprecated. Currently this is just a wrapper of String.hashCode() - this method exists solely so we can override the hashcode implementation if we want to, and to allow calling ENEQueryUtils.hashCode() on a pre-existing jsonString.
static void main(java.lang.String[] args)
          Deprecated.  
static com.endeca.navigation.ENEQuery tidyNavQuery(com.endeca.navigation.ENEQuery query)
          Deprecated. Cleans up and sanitizes a nav query; right now all it does is rewrite the query to include the root if there are otherwise no nav descriptors
static org.json.JSONObject toJSONObject(com.endeca.navigation.ENEQuery query)
          Deprecated. Returns a JSONObject containing all pertinent query info
static java.lang.String toJSONString(com.endeca.navigation.ENEQuery query)
          Deprecated. Returns a JSON string containing all pertinent query info
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DGIDX_PROPS

public static final java.util.List<java.lang.String> DGIDX_PROPS
Deprecated. 
list of dgidx-created system properties

Constructor Detail

ENEQueryUtil

public ENEQueryUtil()
Deprecated. 
Method Detail

hashCode

public static int hashCode(com.endeca.navigation.ENEQuery query)
                    throws org.json.JSONException
Deprecated. 
Returns a hashcode of the query, used to tersely identify the contents of the query. The hashcode will be the same for two separate instances of a query as long as those queries have the same parameters.

Parameters:
query - the query to hash
Returns:
the hashcode
Throws:
org.json.JSONException

hashCode

public static int hashCode(java.lang.String jsonString)
Deprecated. 
Currently this is just a wrapper of String.hashCode() - this method exists solely so we can override the hashcode implementation if we want to, and to allow calling ENEQueryUtils.hashCode() on a pre-existing jsonString. This is useful in cases where a calling class wants to calculate the jsonString for a query and also calculate the hashcode, without having to re-calc the jsonString just to get the hashcode

Parameters:
jsonString - the (json) string to hash
Returns:
the hashcode

toJSONString

public static java.lang.String toJSONString(com.endeca.navigation.ENEQuery query)
                                     throws org.json.JSONException
Deprecated. 
Returns a JSON string containing all pertinent query info

Parameters:
query - the query to turn into a JSON string
Returns:
the JSON string representing the query
Throws:
org.json.JSONException

toJSONObject

public static org.json.JSONObject toJSONObject(com.endeca.navigation.ENEQuery query)
                                        throws org.json.JSONException
Deprecated. 
Returns a JSONObject containing all pertinent query info

Parameters:
query - the query to turn into a JSON object
Returns:
the JSON object representing the query
Throws:
org.json.JSONException

fromJSONString

public static com.endeca.navigation.ENEQuery fromJSONString(java.lang.String s)
Deprecated. 
Creates a new ENEQuery object based on the contents of this JSON packet.

Parameters:
s - the JSON packet to parse
Returns:
the ENEQuery

fromJSONObject

public static com.endeca.navigation.ENEQuery fromJSONObject(org.json.JSONObject j)
Deprecated. 
Creates a new ENEQuery object based on the contents of this JSON object. Returns null if it cannot parse the JSON Object.

Parameters:
j - the JSON object to parse
Returns:
the ENEQuery

tidyNavQuery

public static com.endeca.navigation.ENEQuery tidyNavQuery(com.endeca.navigation.ENEQuery query)
Deprecated. 
Cleans up and sanitizes a nav query; right now all it does is rewrite the query to include the root if there are otherwise no nav descriptors

Parameters:
query - the query to tidy up
Returns:
the cleaned query

copyQuery

public static com.endeca.navigation.ENEQuery copyQuery(com.endeca.navigation.ENEQuery previousQuery)
Deprecated. 
This method takes an ENEQuery object and makes a copy of it. It does this indirectly, by copying all properties of the query one by one to the new query object, since the ENEQuery presentationAPI object does not expose a copy method. TODO: review this code and make sure it is correct

Parameters:
previousQuery -
Returns:
ENEQuery newQuery

main

public static void main(java.lang.String[] args)
                 throws org.json.JSONException
Deprecated. 
Throws:
org.json.JSONException

execute

public static com.endeca.navigation.ENEQueryResults execute(MDEXState mdexState,
                                                            com.endeca.navigation.ENEQuery query,
                                                            RequestIds requestIds)
                                                     throws com.endeca.navigation.ENEQueryException
Deprecated. 
Throws:
com.endeca.navigation.ENEQueryException

addQueryTracking

public static com.endeca.navigation.ENEQuery addQueryTracking(com.endeca.navigation.ENEQuery query,
                                                              RequestIds requestIds)
Deprecated. 
instruments a MDEX 6 query by setting an ENEQueryInfo object on the query

Parameters:
query - the ENEQuery
requestIds - the tracker containing the session, request, etc. tokens
Returns:
the modified ENEQuery