Package myorg.relex.collection
Class ShipByPK
- java.lang.Object
-
- myorg.relex.collection.Ship
-
- myorg.relex.collection.ShipByPK
-
@Entity public class ShipByPK extends Ship
This class is provides an example of an entity that implements hashCode/equals using its database assigned primary key. Note the PK is not assigned until the entity is inserted into the database -- so there will be a period of time prior to persist() when all instances of this class report the same hashCode/equals.
-
-
Constructor Summary
Constructors Constructor Description ShipByPK()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
peekHashCode()
-
Methods inherited from class myorg.relex.collection.Ship
getCreated, getId, getName, hashCode, logEquals, logHashCode, objectHashCode, setCreated, setId, setName, toString
-
-
-
-
Method Detail
-
peekHashCode
public int peekHashCode()
- Specified by:
peekHashCode
in classShip
-
-