protected void validateExistingSession(Session existingSession) { final CurrentTenantIdentifierResolver resolver = factory.getCurrentTenantIdentifierResolver(); if ( resolver != null && resolver.validateExistingCurrentSessions() ) { final String current = resolver.resolveCurrentTenantIdentifier(); if ( ! EqualsHelper.equals( existingSession.getTenantIdentifier(), current ) ) { throw new TenantIdentifierMismatchException( String.format( "Reported current tenant identifier [%s] did not match tenant identifier from " + "existing session [%s]", current, existingSession.getTenantIdentifier() ) ); } } }
@Override public boolean equals(Object o) { if ( o == null ) { return false; } 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 EqualsHelper.equals( entityName, other.entityName ) && EqualsHelper.equals( tenantId, other.tenantId ) && Arrays.deepEquals( this.naturalIdValues, other.naturalIdValues ); }
@Override public boolean equals(Object other) { if ( other == null ) { return false; } if ( this == other ) { return true; } if ( hashCode != other.hashCode() || !( other instanceof CacheKey ) ) { //hashCode is part of this check since it is pre-calculated and hash must match for equals to be true return false; } final CacheKey that = (CacheKey) other; return EqualsHelper.equals( entityOrRoleName, that.entityOrRoleName ) && type.isEqual( key, that.key ) && EqualsHelper.equals( tenantId, that.tenantId ); }
@Override public boolean equals(Object o) { if (o == null) { return false; } 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 EqualsHelper.equals(entityName, other.entityName) && EqualsHelper.equals(tenantId, other.tenantId) && Arrays.deepEquals(this.naturalIdValues, other.naturalIdValues); }
private boolean samePersistentType(final EntityKey otherKey) { if ( otherKey.persister == persister ) { return true; } else { return EqualsHelper.equals( otherKey.persister.getRootEntityName(), persister.getRootEntityName() ); } }
public boolean isDirty(Object old, Object current, boolean[] checkable, SessionImplementor session) throws HibernateException { return EqualsHelper.equals( old, current ); }
@Override public boolean equals(Object other) { if ( !( other instanceof QueryKey ) ) { return false; } final QueryKey that = (QueryKey) other; if ( !sqlQueryString.equals( that.sqlQueryString ) ) { return false; } if ( !EqualsHelper.equals( firstRow, that.firstRow ) || !EqualsHelper.equals( maxRows, that.maxRows ) ) { return false; } if ( !EqualsHelper.equals( customTransformer, that.customTransformer ) ) { return false; } if ( positionalParameterTypes == null ) { if ( that.positionalParameterTypes != null ) { return false; } } else { if ( that.positionalParameterTypes == null ) { return false; } if ( positionalParameterTypes.length != that.positionalParameterTypes.length ) { return false; } for ( int i = 0; i < positionalParameterTypes.length; i++ ) { if ( positionalParameterTypes[i].getReturnedClass() != that.positionalParameterTypes[i].getReturnedClass() ) { return false; } if ( !positionalParameterTypes[i].isEqual( positionalParameterValues[i], that.positionalParameterValues[i] ) ) { return false; } } } return EqualsHelper.equals( filterKeys, that.filterKeys ) && EqualsHelper.equals( namedParameters, that.namedParameters ) && EqualsHelper.equals( tenantIdentifier, that.tenantIdentifier ); }
@Override public boolean isEqual(Object x, Object y) { return EqualsHelper.equals(x, y); }
public boolean isEqual(Object x, Object y) { return EqualsHelper.equals(x, y); }
@Override public boolean areEqual(T one, T another) { return EqualsHelper.equals( one, another ); }