com.google.appengine.api.datastore
Class EmbeddedEntity

java.lang.Object
  extended by com.google.appengine.api.datastore.PropertyContainer
      extended by com.google.appengine.api.datastore.EmbeddedEntity
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public final class EmbeddedEntity
extends PropertyContainer

A property value containing embedded entity properties (and optionally a Key). This class is similar to Entity, but differs in the following ways:

To convert from an Entity use:
 EmbeddedEntity sv = new EmbeddedEntity();
 sv.setKey(entity.getKey())
 sv.setPropertiesFrom(entity)
 
To convert to an Entity use:
 Entity entity = new Entity(sv.getKey())
 entity.setPropertiesFrom(sv);
 

See Also:
Serialized Form

Constructor Summary
EmbeddedEntity()
           
 
Method Summary
 EmbeddedEntity clone()
           
 boolean equals(java.lang.Object obj)
           
 Key getKey()
           
 int hashCode()
           
 void setKey(Key key)
           
 java.lang.String toString()
           
 
Methods inherited from class com.google.appengine.api.datastore.PropertyContainer
getProperties, getProperty, hasProperty, isUnindexedProperty, removeProperty, setPropertiesFrom, setProperty, setUnindexedProperty
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmbeddedEntity

public EmbeddedEntity()
Method Detail

getKey

public Key getKey()
Returns:
the key or null.

setKey

public void setKey(Key key)
Parameters:
key - the key to set

clone

public EmbeddedEntity clone()

toString

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

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