|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface that defines the methods used for optimistic locking.
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.
| Method Summary | |
int |
getChecksum()
get the checksum value |
int |
hashCode()
get a hash for the particular object that implements this interface. |
void |
setChecksum(int value)
set the checksum value. |
| Method Detail |
public int getChecksum()
public void setChecksum(int value)
value - int, the new checksum valuepublic int hashCode()
Here to remind you: You cannot rely on Object.hashCode()
to implement a meaningfull OptimisticLock
hashCode in class java.lang.ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||