A metadata kind that can be used to get information about entity groups. The metadata for the
entity group with root entity key R is fetched using a DatastoreService#get call on key
KeyFactory.createKey(R, ENTITY_GROUP_METADATA_KIND, ENTITY_GROUP_METADATA_ID).
The resulting entity has a Entity#VERSION_RESERVED_PROPERTY numeric property whose
value is guaranteed to increase on every change to the entity group. This value may also
occasionally increase without any user-visible change to the entity group.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eEntities\u003c/code\u003e class provides utility functions and constants for working with entities in the datastore.\u003c/p\u003e\n"],["\u003cp\u003eIt defines static fields for metadata IDs and kinds related to entity groups, namespaces, and properties, such as \u003ccode\u003eENTITY_GROUP_METADATA_ID\u003c/code\u003e, \u003ccode\u003eENTITY_GROUP_METADATA_KIND\u003c/code\u003e, \u003ccode\u003eKIND_METADATA_KIND\u003c/code\u003e, \u003ccode\u003eNAMESPACE_METADATA_KIND\u003c/code\u003e, and \u003ccode\u003ePROPERTY_METADATA_KIND\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes static methods to create keys for entity groups, kinds, namespaces, and properties, allowing for easy creation of corresponding keys for each of them.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to retrieve information from entities, like extracting the namespace from a namespace key (\u003ccode\u003egetNamespaceFromNamespaceKey\u003c/code\u003e) and getting the version property from an entity (\u003ccode\u003egetVersionProperty\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits several object methods including, but not limited to, \u003ccode\u003eclone\u003c/code\u003e, \u003ccode\u003eequals\u003c/code\u003e, \u003ccode\u003egetClass\u003c/code\u003e, and \u003ccode\u003etoString\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class Entities (2.0.0)\n\n public final class Entities\n\nUtility functions and constants for entities. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e Entities \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Fields\n-------------\n\n### ENTITY_GROUP_METADATA_ID\n\n public static final long ENTITY_GROUP_METADATA_ID\n\nID for **entity_group** entities.\nSee Also: [#ENTITY_GROUP_METADATA_KIND](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Entities#com_google_appengine_api_datastore_Entities_ENTITY_GROUP_METADATA_KIND)\n\n### ENTITY_GROUP_METADATA_KIND\n\n public static final String ENTITY_GROUP_METADATA_KIND\n\nA metadata kind that can be used to get information about entity groups. The metadata for the\nentity group with root entity key R is fetched using a [DatastoreService#get](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.DatastoreService#com_google_appengine_api_datastore_DatastoreService_get_) call on key\n`KeyFactory.createKey(R, ENTITY_GROUP_METADATA_KIND, ENTITY_GROUP_METADATA_ID)`.\n\nThe resulting entity has a [Entity#VERSION_RESERVED_PROPERTY](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Entity#com_google_appengine_api_datastore_Entity_VERSION_RESERVED_PROPERTY) numeric property whose\nvalue is guaranteed to increase on every change to the entity group. This value may also\noccasionally increase without any user-visible change to the entity group.\n\n### KIND_METADATA_KIND\n\n public static final String KIND_METADATA_KIND\n\nA metadata kind that can be used to query for kinds that exist in the datastore.\n\n### NAMESPACE_METADATA_EMPTY_ID\n\n public static final long NAMESPACE_METADATA_EMPTY_ID\n\nThe numeric ID for **namespace** keys representing the empty namespace.\n\n### NAMESPACE_METADATA_KIND\n\n public static final String NAMESPACE_METADATA_KIND\n\nA metadata kind that can be used to query for namespaces that exist in the datastore.\n\n### PROPERTY_METADATA_KIND\n\n public static final String PROPERTY_METADATA_KIND\n\nA metadata kind that can be used to query for properties that exist in the datastore.\n\nStatic Methods\n--------------\n\n### createEntityGroupKey(Key key)\n\n public static Key createEntityGroupKey(Key key)\n\nCreate an **entity_group** key for the entity group containing `key`.\n\n### createKindKey(String kind)\n\n public static Key createKindKey(String kind)\n\nCreate a **kind** key for `kind`.\n\n### createNamespaceKey(String namespace)\n\n public static Key createNamespaceKey(String namespace)\n\nCreate a **namespace** key for `namespace`.\n\n### createPropertyKey(String kind, String property)\n\n public static Key createPropertyKey(String kind, String property)\n\nCreate a **property** key for `property` of `kind`.\n\n### getNamespaceFromNamespaceKey(Key namespaceKey)\n\n public static @Nullable String getNamespaceFromNamespaceKey(Key namespaceKey)\n\nExtract the namespace name from a **namespace** key.\n\n### getVersionProperty(Entity entity)\n\n public static long getVersionProperty(Entity entity)\n\nGet the value of the **version** property from `entity`.\n\nConstructors\n------------\n\n### Entities()\n\n public Entities()"]]