Class GenericPK

java.lang.Object
org.apache.ofbiz.entity.GenericEntity
org.apache.ofbiz.entity.GenericPK
All Implemented Interfaces:
Serializable, Cloneable, Comparable<GenericEntity>, Map<String,Object>, LocalizedMap<Object>

public class GenericPK extends GenericEntity
Generic Entity Primary Key Object
See Also:
  • Constructor Details

    • GenericPK

      protected GenericPK()
  • Method Details

    • create

      public static GenericPK create(ModelEntity modelEntity)
      Creates new GenericPK
    • create

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

      public static GenericPK create(Delegator delegator, ModelEntity modelEntity, 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 Map<String,Object>
      Overrides:
      hashCode in class GenericEntity
      Returns:
      Hashcode corresponding to this entity
    • equals

      public boolean equals(Object obj)
      Description copied from class: GenericEntity
      Determines the equality of two GenericEntity objects, overrides the default equals
      Specified by:
      equals in interface Map<String,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