Class OpenJPAId

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean subs  
      protected java.lang.Class type  
      static char TYPE_VALUE_SEP  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected OpenJPAId()  
      protected OpenJPAId​(java.lang.Class type)  
      protected OpenJPAId​(java.lang.Class type, boolean subs)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      abstract java.lang.Object getIdObject()
      Return the identity value as an object.
      java.lang.Class getType()
      Return the persistent class which this id instance represents.
      int hashCode()
      Generate the hash code for this Id.
      boolean hasSubclasses()
      Whether this oid might be for a subclass of the given type.
      protected abstract boolean idEquals​(OpenJPAId other)
      Compare the id to the id of the given instance.
      protected abstract int idHash()
      Return the id's hash code.
      void setManagedInstanceType​(java.lang.Class type)
      Set the exact type of the described instance once it is known.
      void setManagedInstanceType​(java.lang.Class type, boolean subs)
      Set the exact type of the described instance once it is known.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • type

        protected java.lang.Class type
      • subs

        protected boolean subs
    • Constructor Detail

      • OpenJPAId

        protected OpenJPAId()
      • OpenJPAId

        protected OpenJPAId​(java.lang.Class type)
      • OpenJPAId

        protected OpenJPAId​(java.lang.Class type,
                            boolean subs)
    • Method Detail

      • getType

        public java.lang.Class getType()
        Return the persistent class which this id instance represents.
      • hasSubclasses

        public boolean hasSubclasses()
        Whether this oid might be for a subclass of the given type. Defaults to true.
      • setManagedInstanceType

        public void setManagedInstanceType​(java.lang.Class type)
        Set the exact type of the described instance once it is known.
      • setManagedInstanceType

        public void setManagedInstanceType​(java.lang.Class type,
                                           boolean subs)
        Set the exact type of the described instance once it is known.
      • getIdObject

        public abstract java.lang.Object getIdObject()
        Return the identity value as an object.
      • idHash

        protected abstract int idHash()
        Return the id's hash code.
      • idEquals

        protected abstract boolean idEquals​(OpenJPAId other)
        Compare the id to the id of the given instance.
      • hashCode

        public int hashCode()
        Generate the hash code for this Id. Cache the type's generated hash code so that it doesn't have to be generated each time.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(java.lang.Object other)
        Specified by:
        compareTo in interface java.lang.Comparable