Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

EmbeddedEntity (Google App Engine API for Java)

Class EmbeddedEntity

  • All Implemented Interfaces:, 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:

    • equals(Object) and hashCode() compare the embedded properties in addition to the Key.
    • It is not queryable when stored in the datastore.
    • A Key is optional.
    • Keys without a name or id are considered equal if all other aspects of the keys are equal (as they will not be assigned IDs by the datastore when embedded).
    To convert from an Entity use:
     EmbeddedEntity sv = new EmbeddedEntity();
    To convert to an Entity use:
     Entity entity = new Entity(sv.getKey())

    See Also:
    Serialized Form
    • Constructor Detail

      • EmbeddedEntity

        public EmbeddedEntity()
    • Method Detail

      • getKey

        public Key getKey()
        the key or null.
      • setKey

        public void setKey(Key key)
        key - the key to set
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • equals

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