|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.opmath.test.j2ee.contact.ContactPK
The primary key class for the Contact EJB. This is in fact a
simple primary key - this class simply delegates to / wraps a long.
Copyright: (c) 2002 The Open Math Company Limited
The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.
ContactBean, Serialized Form| Field Summary | |
long |
id
The id of the key. |
| Constructor Summary | |
ContactPK(long id)
Constructs a new ContactPK. |
|
| Method Summary | |
boolean |
equals(Object o)
Returns true iff the given Object is the same class as this
instance, and has the same id. |
long |
getId()
Returns the id of this ContactPK. |
int |
hashCode()
Returns the hash code for this ContactPK. |
String |
toString()
Returns a descriptive string for this ContactPK instance. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public long id
The id of the key. This is the only instance variable for this class.
Note that it is declared as public to match EJB recommendations
[
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/CMP.html].
| Constructor Detail |
public ContactPK(long id)
Constructs a new ContactPK. The new ContactPK instance has the given id.
id - a String specifying the index of the new instance.| Method Detail |
public long getId()
Returns the id of this ContactPK.
long carrying the index of this ContactPK.public boolean equals(Object o)
Returns true iff the given Object is the same class as this
instance, and has the same id.
equals in class Objectboolean indicating equivalance.public int hashCode()
Returns the hash code for this ContactPK. The value returned
is the hash code of a Longconstructed from the id of this ContactPK.
hashCode in class Objectint hash code.public String toString()
Returns a descriptive string for this ContactPK instance.
toString in class ObjectString.
|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||