Package org.bedework.calfacade.base
Interface Differable<T>
- Type Parameters:
T-
- All Known Implementing Classes:
BwAlarm,BwAttendee,BwOrganizer
public interface Differable<T>
Interface which defines an implementing class as being differeable.
This is to distinguish it from Comparable. The issue here is that hibernate requires that equals return true for entities which refer to the same db object. Thus objects with the same key values will return equals == true even if other fields differ.
The Comparable interface declaration states
It is strongly recommended (though not required) that natural orderings be consistent with equals.
This means we need some other way to determine that two entities, though equal are in fact different in some respect. For example, we may have two attendee objects for the same person but with a different partstat.
- Version:
- 1.0
- Author:
- Mike Douglass
-
Method Summary
Modifier and TypeMethodDescriptionbooleandiffersFrom(T val) Return true if the entity differs in any way.
-
Method Details
-
differsFrom
Return true if the entity differs in any way.- Parameters:
val-- Returns:
- boolean
-