///////////////////////////////////////////////////////////////////////////////
// File : EJB_PRODUCT_PK.java
// Creation : 2002.04.29 (generated by ejen 1.0.0)
package org.ejb.test;
/**
* Primary key class for the entity bean that maps the PRODUCT table.
* <br><i>Ejen EJB 1.1 (BMP) demonstration</i>
* @version 1.0
* @author (unknown)
* @see org.ejb.test.PRODUCTValues
* @see org.ejb.test.EJB_PRODUCTHome
* @see org.ejb.test.EJB_PRODUCTBean
* @see org.ejb.test.EJB_PRODUCT
*/
public class EJB_PRODUCT_PK implements java.io.Serializable {
/** Hash code of this EJB_PRODUCT_PK */
protected int _hashCode = 0;
/** Primary key field. */
protected int _id;
/** Default constructeur (empty). */
public EJB_PRODUCT_PK() {}
/**
* Constructor.
* @param id primary key field.
*/
public EJB_PRODUCT_PK(int id) {
_id = id;
computeHashCode();
}
/**
* Returns the value of the ID field.
* @return value of the ID field.
*/
public int getId() {
return _id;
}
/**
* Returns a string representation of this EJB_PRODUCT_PK
* in the form of {id=<value>}.
* @return a string representation of this EJB_PRODUCT_PK.
*/
public String toString() {
return "{id=" + _id + "}";
}
/**
* Compares the specified Object with this EJB_PRODUCT_PK for equality.
* @param o the reference object with which to compare.
* @return true if the specified Object is equal to this EJB_PRODUCT_PK.
*/
public boolean equals(Object o) {
return ((o instanceof EJB_PRODUCT_PK)
&& (_id == ((EJB_PRODUCT_PK)o)._id));
}
/**
* Computes the hash code value of this EJB_PRODUCT_PK.
*/
protected void computeHashCode() {
_hashCode = _id;
}
/**
* Returns the hash code value of this EJB_PRODUCT_PK.
* @return the hash code value of this EJB_PRODUCT_PK.
*/
public int hashCode() {
return _hashCode;
}
}
EJB_PRODUCT_PK.html
(HTML view generated by ejen v.1.0.0).