Class SyntheticKey

  • All Implemented Interfaces:
    Key, java.io.Serializable

    public final class SyntheticKey
    extends java.lang.Object
    implements Key, java.io.Serializable
    This is the internal key for an object that is not - or not directly - fetched from a db, but derived from another object. This is useful for all kinds of object accessed via a symbolic name from another object, like objects mounted via a property name column, virtual nodes and groupby nodes.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SyntheticKey​(Key key, java.lang.String name)
      Make a symbolic key for an object using its parent key and its property name/id.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Returns true if this key equals obj
      java.lang.String getID()
      Get the ID part of this key
      Key getParentKey()
      Get the parent key part of this key
      java.lang.String getStorageName()
      Get the storage name for this key.
      int hashCode()
      Get the hash-code for this key
      java.lang.String toString()
      Return a string representation for this key
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SyntheticKey

        public SyntheticKey​(Key key,
                            java.lang.String name)
        Make a symbolic key for an object using its parent key and its property name/id.
        Parameters:
        key - the parent key
        name - the property or collection name
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Returns true if this key equals obj
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - another object
        Returns:
        true if obj represents the same key as this
      • hashCode

        public int hashCode()
        Get the hash-code for this key
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash-code
      • getParentKey

        public Key getParentKey()
        Get the parent key part of this key
        Specified by:
        getParentKey in interface Key
        Returns:
        the parent key
      • getID

        public java.lang.String getID()
        Get the ID part of this key
        Specified by:
        getID in interface Key
        Returns:
        the id part
      • getStorageName

        public java.lang.String getStorageName()
        Get the storage name for this key. This alwys returns null for symbolic keys.
        Specified by:
        getStorageName in interface Key
        Returns:
        null
      • toString

        public java.lang.String toString()
        Return a string representation for this key
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation for this key