public interface OptimisticLock
Classes that use this interface should define a valid hashcode and a mutable member in which the hashcode can be set to a checksum.
Note:When calculating a hashcode for a dataobject
that uses a ROWIDas primary key, be sure never to include
the ROWID in het hascode calculation.
| Modifier and Type | Method and Description |
|---|---|
int |
getChecksum()
get the checksum value
|
int |
hashCode()
get a hash for the particular object that implements
this interface.
|
int |
serialID() |
void |
setChecksum(int value)
set the checksum value.
|
int getChecksum()
int serialID()
void setChecksum(int value)
value - int, the new checksum valueint hashCode()
Here to remind you: You cannot rely on Object.hashCode()
to implement a meaningfull OptimisticLock
hashCode in class java.lang.ObjectObject.hashCode()