public class

GenericEntry

extends BaseEntry<E extends BaseEntry>
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.BaseEntry<E extends com.google.gdata.data.BaseEntry>
         ↳ com.google.gdata.data.appsforyourdomain.generic.GenericEntry

Class Overview

GData entry class that models a generic feed entry which contains only name-value pairs of data.

See Also

Summary

[Expand]
Inherited Fields
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
GenericEntry()
Public Methods
void addProperties(Map<String, String> properties)
Convenience method to add multiple name-value pairs to this entry.
void addProperty(String name, String value)
Add a new name-value pair to this entry.
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
Map<String, String> getAllProperties()
String getProperty(String name)
Retrieve the value for a name.
boolean removeProperty(String name)
Remove the property with the given name (if it exists).
void validate()
A GenericEntry is valid if it satisfies the following conditions:
  • All Properties have a non-null names (values can be null)
  • No two properties have the same name
This method is called by the GData framework on the server side.
[Expand]
Inherited Methods
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension
From interface com.google.gdata.data.IAtom
From interface com.google.gdata.data.IEntry
From interface com.google.gdata.data.Kind.Adaptable
From interface com.google.gdata.data.Kind.Adaptor

Public Constructors

public GenericEntry ()

Public Methods

public void addProperties (Map<String, String> properties)

Convenience method to add multiple name-value pairs to this entry.

Parameters
properties The Map of name-value pairs to add

public void addProperty (String name, String value)

Add a new name-value pair to this entry.

Parameters
name
value

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Parameters
extProfile The ExtensionProfile to initialize.

public Map<String, String> getAllProperties ()

Returns
  • Map containing all the name-value pairs in this entry.

public String getProperty (String name)

Retrieve the value for a name.

Note: If you want all the properties in this entry, use getAllProperties()

Parameters
name
Returns
  • null if entry does not contain any value for the given name.

public boolean removeProperty (String name)

Remove the property with the given name (if it exists).

Parameters
name
Returns
  • true if a property with this name was found and removed, false otherwise

public void validate ()

A GenericEntry is valid if it satisfies the following conditions:

  • All Properties have a non-null names (values can be null)
  • No two properties have the same name
This method is called by the GData framework on the server side.

Throws
IllegalStateException If the current state of this entry is invalid.