All Downloads are FREE. Search and download functionalities are using the official Maven repository.

arp.repository.compare.EntityFieldComparator Maven / Gradle / Ivy

The newest version!
package arp.repository.compare;

import java.lang.reflect.Field;

import arp.util.Unsafe;

public class EntityFieldComparator extends BaseFieldComparator {

	public EntityFieldComparator(Field field) {
		super(field);
	}

	@Override
	public  boolean equals(T one, T another) {
		Object oneEntityField = Unsafe.getObjectFieldOfObject(one, fieldOffset);
		Object anotherEntityField = Unsafe.getObjectFieldOfObject(another,
				fieldOffset);
		return EntityComparator.equals(oneEntityField, anotherEntityField);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy