///////////////////////////////////////////////////////////////////////////////
// File : EJB_DOUBLE_UNIQUE_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 DOUBLE_UNIQUE table.
* <br><i>Ejen EJB 1.1 (BMP) demonstration</i>
* @version 1.0
* @author (unknown)
* @see org.ejb.test.DOUBLE_UNIQUEValues
* @see org.ejb.test.EJB_DOUBLE_UNIQUEHome
* @see org.ejb.test.EJB_DOUBLE_UNIQUEBean
* @see org.ejb.test.EJB_DOUBLE_UNIQUE
*/
public class EJB_DOUBLE_UNIQUE_PK implements java.io.Serializable {
/** Hash code of this EJB_DOUBLE_UNIQUE_PK */
protected int _hashCode = 0;
/** Primary key field. */
protected int _id0;
/** Primary key field. */
protected int _id1;
/** Default constructeur (empty). */
public EJB_DOUBLE_UNIQUE_PK() {}
/**
* Constructor.
* @param id0 primary key field.
* @param id1 primary key field.
*/
public EJB_DOUBLE_UNIQUE_PK(int id0, int id1) {
_id0 = id0;
_id1 = id1;
computeHashCode();
}
/**
* Returns the value of the ID0 field.
* @return value of the ID0 field.
*/
public int getId0() {
return _id0;
}
/**
* Returns the value of the ID1 field.
* @return value of the ID1 field.
*/
public int getId1() {
return _id1;
}
/**
* Returns a string representation of this EJB_DOUBLE_UNIQUE_PK
* in the form of {id0=<value>,id1=<value>}.
* @return a string representation of this EJB_DOUBLE_UNIQUE_PK.
*/
public String toString() {
return "{id0=" + _id0 + ",id1=" + _id1 + "}";
}
/**
* Compares the specified Object with this EJB_DOUBLE_UNIQUE_PK for equality.
* @param o the reference object with which to compare.
* @return true if the specified Object is equal to this EJB_DOUBLE_UNIQUE_PK.
*/
public boolean equals(Object o) {
return ((o instanceof EJB_DOUBLE_UNIQUE_PK)
&& (_id0 == ((EJB_DOUBLE_UNIQUE_PK)o)._id0)
&& (_id1 == ((EJB_DOUBLE_UNIQUE_PK)o)._id1));
}
/**
* Computes the hash code value of this EJB_DOUBLE_UNIQUE_PK.
*/
protected void computeHashCode() {
_hashCode = 1;
_hashCode = (31 * _hashCode) + _id0;
_hashCode = (31 * _hashCode) + _id1;
}
/**
* Returns the hash code value of this EJB_DOUBLE_UNIQUE_PK.
* @return the hash code value of this EJB_DOUBLE_UNIQUE_PK.
*/
public int hashCode() {
return _hashCode;
}
}
EJB_DOUBLE_UNIQUE_PK.html
(HTML view generated by ejen v.1.0.0).