com.google.gdata.model.gd
Class MessageEntry

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.atom.Entry
          extended by com.google.gdata.model.gd.MessageEntry
All Implemented Interfaces:
IAtom, IEntry

public class MessageEntry
extends Entry

Extension class for manipulating entries of the Message kind.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.model.atom.Entry
Entry.EntryState
 
Field Summary
static Category CATEGORY
          Message kind category.
static ElementKey<java.lang.Void,MessageEntry> KEY
          The key for this element.
static java.lang.String KIND
          Message kind term value.
 
Fields inherited from class com.google.gdata.model.atom.Entry
ID, PUBLISHED, RIGHTS, state, SUMMARY, TITLE, UPDATED
 
Constructor Summary
  MessageEntry()
          Constructs an instance using the default key.
protected MessageEntry(ElementKey<?,? extends MessageEntry> key)
          Subclass constructor, allows subclasses to supply their own element key.
protected MessageEntry(ElementKey<?,? extends MessageEntry> key, Entry source)
          Constructs a new instance by doing a shallow copy of data from an existing Entry instance.
  MessageEntry(Entry sourceEntry)
          Constructs a new instance by doing a shallow copy of data from an existing Entry instance.
 
Method Summary
 MessageEntry addWhoList(Who whoList)
          Adds a new person description.
 void clearWhoList()
          Removes all existing person description instances.
 GeoPt getGeoPt()
          Returns the geo pt.
 Rating getRating()
          Returns the rating.
 When getTime()
          Returns the time period description.
 java.util.List<Who> getWhoList()
          Returns the person descriptions.
 boolean hasGeoPt()
          Returns whether it has the geo pt.
 boolean hasRating()
          Returns whether it has the rating.
 boolean hasTime()
          Returns whether it has the time period description.
 boolean hasWhoList()
          Returns whether it has the person descriptions.
 MessageEntry lock()
          Locks this element.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 boolean removeWhoList(Who whoList)
          Removes an existing person description.
 MessageEntry setGeoPt(GeoPt geoPt)
          Sets the geo pt.
 MessageEntry setRating(Rating rating)
          Sets the rating.
 MessageEntry setTime(When time)
          Sets the time period description.
 
Methods inherited from class com.google.gdata.model.atom.Entry
addAuthor, addCategory, addContributor, addHtmlLink, addLink, addLink, clearAuthors, clearCategories, clearContributors, delete, getAuthors, getCanEdit, getCategories, getContent, getContributors, getControl, getEdited, getEditLink, getEtag, getHtmlLink, getId, getKind, getLink, getLinks, getLinks, getMediaEditLink, getPlainTextContent, getPublished, getResumableEditMediaLink, getRights, getSelectedFields, getSelf, getSelfLink, getService, getSource, getSummary, getTextContent, getTitle, getUpdated, getVersionId, hasControl, isDraft, narrow, removeAuthor, removeContent, removeContributor, removeLink, removeLinks, removeLinks, setCanEdit, setContent, setControl, setDraft, setEdited, setEtag, setId, setKind, setPublished, setRights, setSelectedFields, setService, setSource, setSummary, setTitle, setUpdated, setVersionId, update
 
Methods inherited from class com.google.gdata.model.Element
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, equals, 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, hashCode, hasTextValue, isLocked, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, validate, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KIND

public static final java.lang.String KIND
Message kind term value.

See Also:
Constant Field Values

CATEGORY

public static final Category CATEGORY
Message kind category.


KEY

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

Constructor Detail

MessageEntry

public MessageEntry()
Constructs an instance using the default key.


MessageEntry

public MessageEntry(Entry sourceEntry)
Constructs a new instance by doing a shallow copy of data from an existing Entry instance.

Parameters:
sourceEntry - source entry

MessageEntry

protected MessageEntry(ElementKey<?,? extends MessageEntry> key)
Subclass constructor, allows subclasses to supply their own element key.


MessageEntry

protected MessageEntry(ElementKey<?,? extends MessageEntry> key,
                       Entry source)
Constructs a new instance by doing a shallow copy of data from an existing Entry instance. Will use the given ElementKey as the key for the element. This constructor is used when adapting from one element key to another. You cannot call this constructor directly, instead use Element.createElement(ElementKey, Element).

Parameters:
key - The key to use for this element.
source - source element
Method Detail

registerMetadata

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


lock

public MessageEntry lock()
Description copied from class: Element
Locks this element. A locked element cannot have any changes made to its content or its attributes or child elements. This will also lock all attributes and child elements as well. Once this method has been called, this element can be safely published to other threads.

Overrides:
lock in class Element

getGeoPt

public GeoPt getGeoPt()
Returns the geo pt.

Returns:
geo pt

setGeoPt

public MessageEntry setGeoPt(GeoPt geoPt)
Sets the geo pt.

Parameters:
geoPt - geo pt or null to reset
Returns:
this to enable chaining setters

hasGeoPt

public boolean hasGeoPt()
Returns whether it has the geo pt.

Returns:
whether it has the geo pt

getRating

public Rating getRating()
Returns the rating.

Returns:
rating

setRating

public MessageEntry setRating(Rating rating)
Sets the rating.

Parameters:
rating - rating or null to reset
Returns:
this to enable chaining setters

hasRating

public boolean hasRating()
Returns whether it has the rating.

Returns:
whether it has the rating

getTime

public When getTime()
Returns the time period description.

Returns:
time period description

setTime

public MessageEntry setTime(When time)
Sets the time period description.

Parameters:
time - time period description or null to reset
Returns:
this to enable chaining setters

hasTime

public boolean hasTime()
Returns whether it has the time period description.

Returns:
whether it has the time period description

getWhoList

public java.util.List<Who> getWhoList()
Returns the person descriptions.

Returns:
person descriptions

addWhoList

public MessageEntry addWhoList(Who whoList)
Adds a new person description.

Parameters:
whoList - person description

removeWhoList

public boolean removeWhoList(Who whoList)
Removes an existing person description.

Parameters:
whoList - person description
Returns:
true if the whoList was removed

clearWhoList

public void clearWhoList()
Removes all existing person description instances.


hasWhoList

public boolean hasWhoList()
Returns whether it has the person descriptions.

Returns:
whether it has the person descriptions