com.google.gdata.model.batch
Class BatchId

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.batch.BatchId

public class BatchId
extends Element

Identifies an entry inside of a batch feed.


Field Summary
static ElementKey<java.lang.String,BatchId> KEY
          The key for this element.
 
Constructor Summary
BatchId()
          Default mutable constructor.
BatchId(java.lang.String id)
          Constructs a new instance with the given value.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getId()
          Returns the value.
static java.lang.String getIdFrom(Element element)
          Convenience method for getting a batchId from an element if it's there.
 int hashCode()
           
 boolean hasId()
          Returns whether it has the value.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 BatchId setId(java.lang.String id)
          Sets the value.
 java.lang.String toString()
           
 
Methods inherited from class com.google.gdata.model.Element
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hasTextValue, isLocked, lock, narrow, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, validate, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final ElementKey<java.lang.String,BatchId> KEY
The key for this element.

Constructor Detail

BatchId

public BatchId()
Default mutable constructor.


BatchId

public BatchId(java.lang.String id)
Constructs a new instance with the given value.

Parameters:
id - value.
Method Detail

registerMetadata

public static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.


getIdFrom

public static java.lang.String getIdFrom(Element element)
Convenience method for getting a batchId from an element if it's there.

Parameters:
element - element to get id from.
Returns:
the id or null if it's not defined.

getId

public java.lang.String getId()
Returns the value.

Returns:
value

setId

public BatchId setId(java.lang.String id)
Sets the value.

Parameters:
id - value or null to reset

hasId

public boolean hasId()
Returns whether it has the value.

Returns:
whether it has the value

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Element

hashCode

public int hashCode()
Overrides:
hashCode in class Element

toString

public java.lang.String toString()
Overrides:
toString in class Element