public int[] findModified(Object[] x, Object[] y, Object owner, SessionImplementor session)
     throws HibernateException {
   if (!EqualsHelper.equals(x[0], y[0])) {
     return new int[] {0};
   } else {
     return null;
   }
 }
示例#2
0
 @Override
 public boolean equals(Object other) {
   if (!(other instanceof CacheKey)) {
     return false;
   }
   CacheKey that = (CacheKey) other;
   return entityOrRoleName.equals(that.entityOrRoleName)
       && type.isEqual(key, that.key)
       && EqualsHelper.equals(tenantId, that.tenantId);
 }
示例#3
0
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof Origin)) {
      return false;
    }

    final Origin other = (Origin) o;
    return type == other.type && EqualsHelper.equals(name, other.name);
  }
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }

    if (hashCode != o.hashCode() || !(o instanceof NaturalIdCacheKey)) {
      // hashCode is part of this check since it is pre-calculated and hash must match for equals to
      // be true
      return false;
    }

    final NaturalIdCacheKey other = (NaturalIdCacheKey) o;
    return entityName.equals(other.entityName)
        && EqualsHelper.equals(tenantId, other.tenantId)
        && Arrays.deepEquals(this.naturalIdValues, other.naturalIdValues);
  }