com.endeca.navigation
Class ENEQueryInfo

java.lang.Object
  extended by com.endeca.navigation.ENEQueryInfo

public class ENEQueryInfo
extends Object

An object used to store logging-specific query information, such as a session ID and query ID. The ENEQueryInfo object can then passed to the MDEX Engine in an ENEQuery object by using the ENEQuery.setQueryInfo(ENEQueryInfo) method. The information in the ENEQueryInfo object is then entered into the Dgraph log by the MDEX Engine.


Constructor Summary
ENEQueryInfo()
          Constructor.
ENEQueryInfo(String SessionID)
          Deprecated. Future versions of the MDEX Engine API may not support this constructor. Instead, implement this functionailty by calling the basic constructor ENEQueryInfo() followed by the add(String,String) method with the session ID and query ID and their respective keys.
ENEQueryInfo(String SessionID, String QueryID)
          Deprecated. Future versions of the MDEX Engine API may not support this constructor. Instead this functionailty is preserved by calling the basic constructor ENEQueryInfo() followed by the add(String,String) method with the IDs and their respective keys.
 
Method Summary
 void add(String key, String value)
          Adds a key/value pair to the ENEQueryInfo object.
 String getQueryIdentifier()
          Deprecated. This method may not be supported in future versions of the MDEX Engine API.
 String getSessionIdentifier()
          Deprecated. This method may not be supported in future versions of the MDEX Engine API.
 void setQueryIdentifier(String QueryID)
          Deprecated. This method may not be supported in future versions of the MDEX Engine API. The add(String,String) method should be used instead.
 void setSessionIdentifier(String SessionID)
          Deprecated. This method may not be supported in future versions of the MDEX Engine API. The add(String,String) method should be used instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ENEQueryInfo

public ENEQueryInfo(String SessionID,
                    String QueryID)
Deprecated. Future versions of the MDEX Engine API may not support this constructor. Instead this functionailty is preserved by calling the basic constructor ENEQueryInfo() followed by the add(String,String) method with the IDs and their respective keys.

Constructor. Takes in SessionId and QueryId and sets the IDs as logging parameter values for the sid and rid keys respectively.

Parameters:
SessionID - Session ID to pass on as logging information with the sid key.
QueryID - Query ID to pass on as logging information with the rid key.

ENEQueryInfo

public ENEQueryInfo(String SessionID)
Deprecated. Future versions of the MDEX Engine API may not support this constructor. Instead, implement this functionailty by calling the basic constructor ENEQueryInfo() followed by the add(String,String) method with the session ID and query ID and their respective keys.

Constructor. Takes in SessionId and sets it as the value for the sid key. The constructor automatically generates the query ID and sets it as the value for the rid key.

Parameters:
SessionID - Session ID to pass on as logging information.

ENEQueryInfo

public ENEQueryInfo()
Constructor. Basic constructor for the ENEQueryInfo object. Generates two key/value pairs automatically: the session ID (the sid key) and the query ID (the rid key). This functionality, however, is deprecated and instead developers should generate their own IDs and use the add(String,String) method to set them in the object.

Method Detail

setSessionIdentifier

public void setSessionIdentifier(String SessionID)
Deprecated. This method may not be supported in future versions of the MDEX Engine API. The add(String,String) method should be used instead.

Sets the session ID (the sid key) to a specified String value.

Parameters:
SessionID - Session ID of the query.

getSessionIdentifier

public String getSessionIdentifier()
Deprecated. This method may not be supported in future versions of the MDEX Engine API.

Returns the sesson ID value as a String.

Returns:
Session ID of the query.

setQueryIdentifier

public void setQueryIdentifier(String QueryID)
Deprecated. This method may not be supported in future versions of the MDEX Engine API. The add(String,String) method should be used instead.

Sets the query ID (the rid key) to a specified String value.

Parameters:
QueryID - Query ID of the query.

getQueryIdentifier

public String getQueryIdentifier()
Deprecated. This method may not be supported in future versions of the MDEX Engine API.

Returns the query ID value as a String.

Returns:
Query ID of the query.

add

public void add(String key,
                String value)
Adds a key/value pair to the ENEQueryInfo object. An application may call this method as many times as needed, as each call adds to the key/value pairs being stored in the ENEQueryInfo object. This method will discard keys or values that are NULL or empty strings.

All the key/value pairs will be logged in the Dgraph log when the ENEQueryInfo object is passed to the MDEX Engine with the ENEQuery.setQueryInfo(ENEQueryInfo) method.

Note that the current implementation of the basic constructor automatically generates two keys (sid and rid) and their values. This current behavior is deprecated. Therefore, developers should instead generate their own session and query IDs and use this method to override the values of the sid and rid keys.

Parameters:
key - The key for the key/value pair to be added to the ENEQueryInfo object.
value - The value of the key.


© 2008 Endeca Technologies, Inc.
Endeca Confidential