Google Data APIs Client Library (1.41.1)



com.google.gdata.data.batch
Enum BatchOperationType

java.lang.Object
  extended by java.lang.Enum<BatchOperationType>
      extended by com.google.gdata.data.batch.BatchOperationType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<BatchOperationType>

public enum BatchOperationType
extends java.lang.Enum<BatchOperationType>

Defines a batch operation (query, update, insert, delete). This enum is the java equivalent of <batch: operation type="..."/>.


Enum Constant Summary
DELETE
          Delete the current entry identified by its id.
INSERT
          Insert the current entry.
QUERY
          Query for the entry by id.
UPDATE
          Update the current entry identified by its id.
 
Method Summary
static BatchOperationType forName(java.lang.String name)
          Gets a BatchOperation by name (lowercase), as it appears in XML.
 void generateAtom(com.google.gdata.util.common.xml.XmlWriter w)
          Generates a batch:operation element.
 java.lang.String getMethod()
          Gets the operation name as an HTTP method name.
 java.lang.String getName()
          Gets the operation name as it appears in XML.
 java.lang.String toString()
           
static BatchOperationType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BatchOperationType[] 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

QUERY

public static final BatchOperationType QUERY
Query for the entry by id.


INSERT

public static final BatchOperationType INSERT
Insert the current entry.


UPDATE

public static final BatchOperationType UPDATE
Update the current entry identified by its id.


DELETE

public static final BatchOperationType DELETE
Delete the current entry identified by its id.

Method Detail

values

public static BatchOperationType[] 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 (BatchOperationType c : BatchOperationType.values())
    System.out.println(c);

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

valueOf

public static BatchOperationType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getName

public java.lang.String getName()
Gets the operation name as it appears in XML.

Returns:
operation name

getMethod

public java.lang.String getMethod()
Gets the operation name as an HTTP method name.

Returns:
HTTP method name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<BatchOperationType>

forName

public static BatchOperationType forName(java.lang.String name)
Gets a BatchOperation by name (lowercase), as it appears in XML.

Parameters:
name -
Returns:
a BatchOperation or null

generateAtom

public void generateAtom(com.google.gdata.util.common.xml.XmlWriter w)
                  throws java.io.IOException
Generates a batch:operation element.

Parameters:
w -
Throws:
java.io.IOException