com.google.gdata.model.gd
Class When

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.gd.When

public class When
extends Element

Describes a period of time.


Field Summary
static AttributeKey<DateTime> END_TIME
          Event end time.
static ElementKey<java.lang.Void,When> KEY
          The key for this element.
static AttributeKey<DateTime> START_TIME
          Event start time.
static AttributeKey<java.lang.String> VALUE_STRING
          String description of the event times.
 
Constructor Summary
When()
          Constructs an instance using the default key.
 
Method Summary
 When addReminder(Reminder reminder)
          Adds a new event reminder.
 void clearReminder()
          Removes all existing event reminder instances.
 DateTime getEndTime()
          Returns the event end time.
 java.util.List<Reminder> getReminder()
          Returns the event reminders.
 DateTime getStartTime()
          Returns the event start time.
 java.lang.String getValueString()
          Returns the string description of the event times.
 boolean hasEndTime()
          Returns whether it has the event end time.
 boolean hasReminder()
          Returns whether it has the event reminders.
 boolean hasStartTime()
          Returns whether it has the event start time.
 boolean hasValueString()
          Returns whether it has the string description of the event times.
 When lock()
          Locks this element.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 boolean removeReminder(Reminder reminder)
          Removes an existing event reminder.
 When setEndTime(DateTime endTime)
          Sets the event end time.
 When setStartTime(DateTime startTime)
          Sets the event start time.
 When setValueString(java.lang.String valueString)
          Sets the string description of the event times.
 
Methods inherited from class com.google.gdata.model.Element
addElement, addElement, addElement, clear, createElement, createElement, 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, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, visit
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

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


END_TIME

public static final AttributeKey<DateTime> END_TIME
Event end time.


START_TIME

public static final AttributeKey<DateTime> START_TIME
Event start time.


VALUE_STRING

public static final AttributeKey<java.lang.String> VALUE_STRING
String description of the event times.

Constructor Detail

When

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

Method Detail

registerMetadata

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


lock

public When 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

getEndTime

public DateTime getEndTime()
Returns the event end time.

Returns:
event end time

setEndTime

public When setEndTime(DateTime endTime)
Sets the event end time.

Parameters:
endTime - event end time or null to reset
Returns:
this to enable chaining setters

hasEndTime

public boolean hasEndTime()
Returns whether it has the event end time.

Returns:
whether it has the event end time

getReminder

public java.util.List<Reminder> getReminder()
Returns the event reminders.

Returns:
event reminders

addReminder

public When addReminder(Reminder reminder)
Adds a new event reminder.

Parameters:
reminder - event reminder

removeReminder

public boolean removeReminder(Reminder reminder)
Removes an existing event reminder.

Parameters:
reminder - event reminder
Returns:
true if the reminder was removed

clearReminder

public void clearReminder()
Removes all existing event reminder instances.


hasReminder

public boolean hasReminder()
Returns whether it has the event reminders.

Returns:
whether it has the event reminders

getStartTime

public DateTime getStartTime()
Returns the event start time.

Returns:
event start time

setStartTime

public When setStartTime(DateTime startTime)
Sets the event start time.

Parameters:
startTime - event start time or null to reset
Returns:
this to enable chaining setters

hasStartTime

public boolean hasStartTime()
Returns whether it has the event start time.

Returns:
whether it has the event start time

getValueString

public java.lang.String getValueString()
Returns the string description of the event times.

Returns:
string description of the event times

setValueString

public When setValueString(java.lang.String valueString)
Sets the string description of the event times.

Parameters:
valueString - string description of the event times or null to reset
Returns:
this to enable chaining setters

hasValueString

public boolean hasValueString()
Returns whether it has the string description of the event times.

Returns:
whether it has the string description of the event times