org.hibernate.util.EqualsHelper Java Examples

The following examples show how to use org.hibernate.util.EqualsHelper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: QueryKey.java    From cacheonix-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public boolean equals(Object other) {
	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 (types==null) {
		if (that.types!=null) return false;
	}
	else {
		if (that.types==null) return false;
		if ( types.length!=that.types.length ) return false;
		for ( int i=0; i<types.length; i++ ) {
			if ( types[i].getReturnedClass() != that.types[i].getReturnedClass() ) return false;
			if ( !types[i].isEqual( values[i], that.values[i], entityMode ) ) return false;
		}
	}
	if ( !EqualsHelper.equals(filters, that.filters) ) return false;
	if ( !EqualsHelper.equals(namedParameters, that.namedParameters) ) return false;
	return true;
}
 
Example #2
Source File: CustomPersister.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public int[] findDirty(
	Object[] x,
	Object[] y,
	Object owner,
	SessionImplementor session
) throws HibernateException {
	if ( !EqualsHelper.equals( x[0], y[0] ) ) {
		return new int[] { 0 };
	}
	else {
		return null;
	}
}
 
Example #3
Source File: CustomPersister.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
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;
	}
}
 
Example #4
Source File: BatchUploadProcessor.java    From training with MIT License 5 votes vote down vote up
private void validateLinesHaveTheSamePrice(BatchOrder order) {
	BatchOrderLine firstLine = order.getLines().iterator().next();
	for (BatchOrderLine line : order.getLines()) {
		if (!EqualsHelper.equals(firstLine.getPrice(), line.getPrice())) {
			throw new InvalidOrder("Lines of this order have different prices");
		}
	}
}
 
Example #5
Source File: BatchOrderProcessor.java    From training with MIT License 5 votes vote down vote up
private void validateLinesHaveTheSamePrice() {
	BatchOrderLine firstLine = order.getLines().iterator().next();
	for (BatchOrderLine line : order.getLines()) {
		if (!EqualsHelper.equals(firstLine.getPrice(), line.getPrice())) {
			throw new InvalidOrder("Lines of this order have different prices");
		}
	}
}
 
Example #6
Source File: EncryptedBigIntegerType.java    From jasypt with Apache License 2.0 4 votes vote down vote up
public boolean equals(final Object x, final Object y) 
        throws HibernateException {
    return EqualsHelper.equals(x, y);
}
 
Example #7
Source File: EncryptedBigDecimalType.java    From jasypt with Apache License 2.0 4 votes vote down vote up
public boolean equals(final Object x, final Object y) 
        throws HibernateException {
    return EqualsHelper.equals(x, y);
}
 
Example #8
Source File: AbstractEncryptedAsStringType.java    From jasypt with Apache License 2.0 4 votes vote down vote up
public final boolean equals(final Object x, final Object y) 
        throws HibernateException {
    return EqualsHelper.equals(x, y);
}
 
Example #9
Source File: EncryptedBigIntegerType.java    From jasypt with Apache License 2.0 4 votes vote down vote up
public boolean equals(final Object x, final Object y) 
        throws HibernateException {
    return EqualsHelper.equals(x, y);
}
 
Example #10
Source File: EncryptedBigDecimalType.java    From jasypt with Apache License 2.0 4 votes vote down vote up
public boolean equals(final Object x, final Object y) 
        throws HibernateException {
    return EqualsHelper.equals(x, y);
}
 
Example #11
Source File: AbstractEncryptedAsStringType.java    From jasypt with Apache License 2.0 4 votes vote down vote up
public final boolean equals(final Object x, final Object y) 
        throws HibernateException {
    return EqualsHelper.equals(x, y);
}
 
Example #12
Source File: AbstractLobType.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/**
 * This implementation delegates to the Hibernate EqualsHelper.
 * @see org.hibernate.util.EqualsHelper#equals
 */
@Override
public boolean equals(Object x, Object y) throws HibernateException {
	return EqualsHelper.equals(x, y);
}
 
Example #13
Source File: AbstractLobType.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/**
 * This implementation delegates to the Hibernate EqualsHelper.
 * @see org.hibernate.util.EqualsHelper#equals
 */
@Override
public boolean equals(Object x, Object y) throws HibernateException {
	return EqualsHelper.equals(x, y);
}
 
Example #14
Source File: NullableType.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public boolean isEqual(Object x, Object y) {
	return EqualsHelper.equals(x, y);
}
 
Example #15
Source File: AbstractType.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public boolean isEqual(Object x, Object y, EntityMode entityMode) {
	return EqualsHelper.equals(x, y);
}