net.rim.pushsdk.query.subscription
Enum SubQueryResultStatus

java.lang.Object
  extended by java.lang.Enum<SubQueryResultStatus>
      extended by net.rim.pushsdk.query.subscription.SubQueryResultStatus
All Implemented Interfaces:
Serializable, Comparable<SubQueryResultStatus>

public enum SubQueryResultStatus
extends Enum<SubQueryResultStatus>

Represents the status of a result back from a subscription query message to the PPG.

Author:
mdandrea

Enum Constant Summary
ACTIVE
          An active status.
SUSPENDED
          A suspended status.
UNKNOWN
          An unknown/"does not exist" status.
UNSUBSCRIBED
          An unsubscribed/inactive status.
 
Method Summary
 String getSubQueryResultStatus()
          Gets the value of the status (lower cased).
static SubQueryResultStatus getSubQueryResultStatus(String status)
          Gets the status associated with the given string.
 String toString()
          Calls getSubQueryResultStatus().
static SubQueryResultStatus valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SubQueryResultStatus[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ACTIVE

public static final SubQueryResultStatus ACTIVE
An active status.


SUSPENDED

public static final SubQueryResultStatus SUSPENDED
A suspended status.


UNSUBSCRIBED

public static final SubQueryResultStatus UNSUBSCRIBED
An unsubscribed/inactive status.


UNKNOWN

public static final SubQueryResultStatus UNKNOWN
An unknown/"does not exist" status.

Method Detail

values

public static SubQueryResultStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SubQueryResultStatus c : SubQueryResultStatus.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SubQueryResultStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getSubQueryResultStatus

public String getSubQueryResultStatus()
Gets the value of the status (lower cased).

Returns:
the status

getSubQueryResultStatus

public static SubQueryResultStatus getSubQueryResultStatus(String status)
Gets the status associated with the given string.

Parameters:
status - the status as a string (case insensitive)
Returns:
the status
Throws:
IllegalArgumentException - if the status string passed in was invalid

toString

public String toString()
Calls getSubQueryResultStatus().

Overrides:
toString in class Enum<SubQueryResultStatus>


Copyright © 2011 Research In Motion. All Rights Reserved.