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:
  • Method Details

    • 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()
      Returns the path element's ID (as Long) or name (as String). Never null.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • of

      public static PathElement of(String kind, String name)
    • of

      public static PathElement of(String kind, long id)