Class GraphEntity

java.lang.Object
org.postgresql.util.PGobject
net.bitnine.agensgraph.graph.GraphEntity
All Implemented Interfaces:
Serializable, Cloneable, JsonbObject
Direct Known Subclasses:
Edge, Vertex

public abstract class GraphEntity extends org.postgresql.util.PGobject implements JsonbObject, Serializable, Cloneable
This abstract class defines the graph entity.
See Also:
  • Constructor Details

    • GraphEntity

      public GraphEntity()
  • Method Details

    • getLabel

      public String getLabel()
      Returns the value of label.
      Returns:
      the value of label
    • getGraphId

      public GraphId getGraphId()
      Returns the value of GraphId.
      Returns:
      the value of GraphId
    • getProperties

      public Jsonb getProperties()
      Returns the value of Jsonb.
      Returns:
      the value of Jsonb
    • getKeys

      public Iterable<String> getKeys()
      Description copied from interface: JsonbObject
      Returns a set of keys.
      Specified by:
      getKeys in interface JsonbObject
      Returns:
      a set of keys
    • containsKey

      public boolean containsKey(String key)
      Description copied from interface: JsonbObject
      Returns true if the given key is contained.
      Specified by:
      containsKey in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      true if the given key is contained
    • getString

      public String getString(String key)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getString in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      the string value stored at the key
    • getString

      public String getString(String key, String defaultValue)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getString in interface JsonbObject
      Parameters:
      key - the given key
      defaultValue - returned the default value if the value stored at the key is null
      Returns:
      the string value stored at the key
    • getInt

      public int getInt(String key)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getInt in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      the int value stored at the key
    • getInt

      public int getInt(String key, int defaultValue)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getInt in interface JsonbObject
      Parameters:
      key - the given key
      defaultValue - returned the default value if the value stored at the key is null
      Returns:
      the int value stored at the key
    • getLong

      public long getLong(String key)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getLong in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      the long value stored at the key
    • getLong

      public long getLong(String key, long defaultValue)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getLong in interface JsonbObject
      Parameters:
      key - the given key
      defaultValue - returned the default value if the value stored at the key is null
      Returns:
      the long value stored at the key
    • getDouble

      public double getDouble(String key)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getDouble in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      the double value stored at the key
    • getDouble

      public double getDouble(String key, double defaultValue)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getDouble in interface JsonbObject
      Parameters:
      key - the given key
      defaultValue - returned the default value if the value stored at the key is null
      Returns:
      the double value stored at the key
    • getBoolean

      public boolean getBoolean(String key)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getBoolean in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      the boolean value stored at the key
    • getBoolean

      public boolean getBoolean(String key, boolean defaultValue)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getBoolean in interface JsonbObject
      Parameters:
      key - the given key
      defaultValue - returned the default value if the value stored at the key is null
      Returns:
      the boolean value stored at the key
    • getArray

      public Jsonb getArray(String key)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getArray in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      the array value stored at the key
    • getObject

      public Jsonb getObject(String key)
      Description copied from interface: JsonbObject
      Returns the value stored at the key.
      Specified by:
      getObject in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      the object value stored at the key
    • isNull

      public boolean isNull(String key)
      Description copied from interface: JsonbObject
      Returns true if the value stored at the key is null.
      Specified by:
      isNull in interface JsonbObject
      Parameters:
      key - the given key
      Returns:
      true if the value stored at the key is null