Class GenericPK

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<GenericEntity>, java.util.Map<java.lang.String,​java.lang.Object>, LocalizedMap<java.lang.Object>

    public class GenericPK
    extends GenericEntity
    Generic Entity Primary Key Object
    See Also:
    Serialized Form
    • Constructor Detail

      • GenericPK

        protected GenericPK()
    • Method Detail

      • create

        public static GenericPK create​(Delegator delegator,
                                       ModelEntity modelEntity,
                                       java.util.Map<java.lang.String,​? extends java.lang.Object> fields)
        Creates new GenericPK from existing Map
      • create

        public static GenericPK create​(Delegator delegator,
                                       ModelEntity modelEntity,
                                       java.lang.Object singlePkValue)
        Creates new GenericPK from existing Map
      • create

        public static GenericPK create​(GenericPK value)
        Creates new GenericPK from existing GenericPK
      • hashCode

        public int hashCode()
        Description copied from class: GenericEntity
        Creates a hashCode for the entity, using the default String hashCode and Map hashCode, overrides the default hashCode
        Specified by:
        hashCode in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        hashCode in class GenericEntity
        Returns:
        Hashcode corresponding to this entity
      • equals

        public boolean equals​(java.lang.Object obj)
        Description copied from class: GenericEntity
        Determines the equality of two GenericEntity objects, overrides the default equals
        Specified by:
        equals in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        equals in class GenericEntity
        Parameters:
        obj - The object (GenericEntity) to compare this two
        Returns:
        boolean stating if the two objects are equal
      • clone

        public GenericPK clone()
        Clones this GenericPK, this is a shallow clone and uses the default shallow HashMap clone
        Overrides:
        clone in class GenericEntity
        Returns:
        Object that is a clone of this GenericPK