Package com.google.cloud.datastore
Class PathElement
- java.lang.Object
-
- com.google.cloud.datastore.PathElement
-
- All Implemented Interfaces:
Serializable
public final class PathElement extends Object implements Serializable
Represents a single element in a key's path.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Long
getId()
Returns the ID of this path element.String
getKind()
Returns the kind of this path element.String
getName()
Returns the name of this path element.Object
getNameOrId()
int
hashCode()
boolean
hasId()
boolean
hasName()
static PathElement
of(String kind, long id)
static PathElement
of(String kind, String name)
String
toString()
-
-
-
Method Detail
-
getKind
public String getKind()
Returns the kind of this path element.
-
hasId
public boolean hasId()
-
getId
public Long getId()
Returns the ID of this path element.
-
hasName
public boolean hasName()
-
getName
public String getName()
Returns the name of this path element.
-
getNameOrId
public Object getNameOrId()
-
of
public static PathElement of(String kind, String name)
-
of
public static PathElement of(String kind, long id)
-
-