Class EntityHelper

java.lang.Object
ch.colabproject.colab.api.model.tools.EntityHelper

public class EntityHelper extends Object
Helper to normalize common operations on WithId objects
Author:
maxence
  • Method Details

    • hashCode

      public static int hashCode(WithId object)
      Object.hashCode() implementation for all WithId implementation
      Parameters:
      object - object to hash
      Returns:
      a hash code value for the given object.
    • equals

      public static boolean equals(WithId a, Object b)
      Object.equals(java.lang.Object) implementation for all WithId implementation. Objects equal if
      • it's the same reference (strict == equality)
      • both are null
      • they are instance of the same class and have the same id
      Parameters:
      a - first object
      b - second object
      Returns:
      true if both objects represent the same persisted entity