Class SingleFieldId<T>

    • Field Detail

      • targetClassName

        protected String targetClassName
        The name of the class of the target persistable object.
      • hashCode

        protected int hashCode
    • Constructor Detail

      • SingleFieldId

        protected SingleFieldId​(Class pcClass)
      • SingleFieldId

        public SingleFieldId()
    • Method Detail

      • assertKeyNotNull

        protected void assertKeyNotNull​(Object key)
        Assert that the key is not null. Throw a NucleusUserException if the given key is null.
        Parameters:
        key - The key
      • getTargetClassName

        public String getTargetClassName()
      • getKeyAsObject

        public abstract T getKeyAsObject()
      • equals

        public boolean equals​(Object obj)
        Check the class and class name and object type.
        Overrides:
        equals in class Object
        Parameters:
        obj - the other object
        Returns:
        true if the class name is the same
      • keyEquals

        protected abstract boolean keyEquals​(SingleFieldId other)
      • hashCode

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

        protected int compare​(SingleFieldId o)
        Determine the ordering of identity objects. Only the class name is compared. This method is only used by subclasses.
        Parameters:
        o - Other identity
        Returns:
        The relative ordering between the objects