net.rim.pushsdk.query.subscription
Class SubscriptionQueryResult

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

public class SubscriptionQueryResult
extends Object
implements Serializable

Represents a result within a subscription query response.

Author:
mdandrea
See Also:
Serialized Form

Field Summary
static String QUERY_RESULT_TAG
          The subscription query result XML tag.
static String STATUS_ATTR
          The status XML attribute.
 
Constructor Summary
SubscriptionQueryResult()
          Constructs a subscription query result.
SubscriptionQueryResult(String address, SubQueryResultStatus status)
          Constructs a subscription query result with the given address (e.g.
 
Method Summary
 boolean equals(Object obj)
          Returns true if two subscription query results are found to be equal and false otherwise.
 String getAddress()
          Gets the address (e.g.
 Date getEventTime()
          Gets the date and time at which the subscription record in the PPG was last modified.
 SubQueryResultStatus getStatus()
          Gets the status associated with the address.
 int hashCode()
          Returns a hashcode for this subscription query result.
 void setAddress(String address)
          Sets the address (e.g.
 void setEventTime(Date eventTime)
          Sets the date and time at which the subscription record in the PPG was last modified.
 void setStatus(SubQueryResultStatus status)
          Sets the status associated with the address.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_RESULT_TAG

public static final String QUERY_RESULT_TAG
The subscription query result XML tag.

See Also:
Constant Field Values

STATUS_ATTR

public static final String STATUS_ATTR
The status XML attribute.

See Also:
Constant Field Values
Constructor Detail

SubscriptionQueryResult

public SubscriptionQueryResult()
Constructs a subscription query result.


SubscriptionQueryResult

public SubscriptionQueryResult(String address,
                               SubQueryResultStatus status)
Constructs a subscription query result with the given address (e.g. PIN) and corresponding status.

Parameters:
address - the address corresponding to a subscriber (e.g. PIN)
status - the status of the matching subscriber
Method Detail

getEventTime

public Date getEventTime()
Gets the date and time at which the subscription record in the PPG was last modified.

Returns:
the date at which the subscription record in the PPG was last modified

setEventTime

public void setEventTime(Date eventTime)
Sets the date and time at which the subscription record in the PPG was last modified.

Parameters:
eventTime - the date at which the subscription record in the PPG was last modified

getAddress

public String getAddress()
Gets the address (e.g. PIN).

Returns:
the address of a subscriber

setAddress

public void setAddress(String address)
Sets the address (e.g. PIN).

Parameters:
address - the address of a subscriber

getStatus

public SubQueryResultStatus getStatus()
Gets the status associated with the address.

Returns:
the status

setStatus

public void setStatus(SubQueryResultStatus status)
Sets the status associated with the address.

Parameters:
status - the status

hashCode

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

Overrides:
hashCode in class Object
Returns:
a hashcode for this subscription query result.

equals

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

Overrides:
equals in class Object
Returns:
whether two subscription query results are equal

toString

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

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


Copyright © 2011 Research In Motion. All Rights Reserved.