net.rim.pushsdk.query.subscription
Class SubscriptionQueryResponse

java.lang.Object
  extended by net.rim.pushsdk.query.subscription.SubscriptionQueryMessage
      extended by net.rim.pushsdk.query.subscription.SubscriptionQueryResponse
All Implemented Interfaces:
Serializable

public class SubscriptionQueryResponse
extends SubscriptionQueryMessage
implements Serializable

Represents the response from a subscription query request to the PPG.

Author:
mdandrea
See Also:
Serialized Form

Field Summary
static String NO_RESULTS_STATUS_CODE
          The status code associated with no results being returned by the request.
static String QUERY_RESPONSE_TAG
          The query response XML tag.
static String STATUS_CODE_ATTR
          The status code XML attribute.
static String STATUS_DESC_ATTR
          The status description XML attribute.
static String STATUS_RESULT_TAG
          The query result XML tag.
static String SUCCESS_STATUS_CODE
          The status code associated with a success.
 
Fields inherited from class net.rim.pushsdk.query.subscription.SubscriptionQueryMessage
ADDRESS_ATTR, ADDRESS_TAG, CURRENT_MSG_VERSION, EVENT_TIME_ATTR, PUSHAPP_ID_ATTR, pushApplicationId, QUERY_OUTERMOST_TAG, VERSION_ATTR
 
Constructor Summary
SubscriptionQueryResponse()
          Constructs a subscription query response message.
 
Method Summary
 void addResult(SubscriptionQueryResult result)
          Adds a subscription query result to the response.
 boolean equals(Object obj)
          Returns true if two subscription query response messages are found to be equal and false otherwise.
 String getCode()
          Gets the status code associated with the response.
 String getDescription()
          Gets the status description associated with the response.
 Date getEventTime()
          Gets the date and time at which the response was received.
 Set<SubscriptionQueryResult> getResults()
          Gets the results of the subscription query.
 int hashCode()
          Returns a hashcode for this subscription query response message.
 void setCode(String code)
          Sets the status code associated with the response.
 void setDescription(String description)
          Sets the status description associated with the response.
 void setEventTime(Date eventTime)
          Sets the date and time at which the response was received.
 void setResults(Set<SubscriptionQueryResult> results)
          Sets the results of the subscription query.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class net.rim.pushsdk.query.subscription.SubscriptionQueryMessage
getPushApplicationId, setPushApplicationId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_RESPONSE_TAG

public static final String QUERY_RESPONSE_TAG
The query response XML tag.

See Also:
Constant Field Values

STATUS_RESULT_TAG

public static final String STATUS_RESULT_TAG
The query result XML tag.

See Also:
Constant Field Values

STATUS_CODE_ATTR

public static final String STATUS_CODE_ATTR
The status code XML attribute.

See Also:
Constant Field Values

STATUS_DESC_ATTR

public static final String STATUS_DESC_ATTR
The status description XML attribute.

See Also:
Constant Field Values

SUCCESS_STATUS_CODE

public static final String SUCCESS_STATUS_CODE
The status code associated with a success.

See Also:
Constant Field Values

NO_RESULTS_STATUS_CODE

public static final String NO_RESULTS_STATUS_CODE
The status code associated with no results being returned by the request.

See Also:
Constant Field Values
Constructor Detail

SubscriptionQueryResponse

public SubscriptionQueryResponse()
Constructs a subscription query response message.

Method Detail

getEventTime

public Date getEventTime()
Gets the date and time at which the response was received.

Returns:
the date at which the response was received

setEventTime

public void setEventTime(Date eventTime)
Sets the date and time at which the response was received.

Parameters:
eventTime - the date at which the response was received

getCode

public String getCode()
Gets the status code associated with the response.

Returns:
the status code

setCode

public void setCode(String code)
Sets the status code associated with the response.

Parameters:
code - the status code

getDescription

public String getDescription()
Gets the status description associated with the response.

Returns:
the status description

setDescription

public void setDescription(String description)
Sets the status description associated with the response.

Parameters:
description - the status description

getResults

public Set<SubscriptionQueryResult> getResults()
Gets the results of the subscription query.

Returns:
the subscription query results

setResults

public void setResults(Set<SubscriptionQueryResult> results)
Sets the results of the subscription query.

Parameters:
results - the subscription query results

addResult

public void addResult(SubscriptionQueryResult result)
Adds a subscription query result to the response.

Parameters:
result - a subscription query result

hashCode

public int hashCode()
Returns a hashcode for this subscription query response message.

Overrides:
hashCode in class SubscriptionQueryMessage
Returns:
a hashcode for this subscription query response message.

equals

public boolean equals(Object obj)
Returns true if two subscription query response messages are found to be equal and false otherwise.

Overrides:
equals in class SubscriptionQueryMessage
Returns:
whether two subscription query response messages are equal

toString

public String toString()
Constructs a String with all attributes in name = value format.

Overrides:
toString in class SubscriptionQueryMessage
Returns:
a String representation of this object.


Copyright © 2011 Research In Motion. All Rights Reserved.