///////////////////////////////////////////////////////////////////////////////
// File     : EJB_DOUBLE_PK_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_PK table.
 * <br><i>Ejen EJB 1.1 (BMP) demonstration</i>
 * @version 1.0
 * @author (unknown)
 * @see org.ejb.test.DOUBLE_PKValues
 * @see org.ejb.test.EJB_DOUBLE_PKHome
 * @see org.ejb.test.EJB_DOUBLE_PKBean
 * @see org.ejb.test.EJB_DOUBLE_PK
 */
public class EJB_DOUBLE_PK_PK implements java.io.Serializable {

    /** Hash code of this EJB_DOUBLE_PK_PK */ 
    protected int _hashCode = 0;
    /** Primary key field. */
    protected int _id0;
    /** Primary key field. */
    protected int _id1;

    /** Default constructeur (empty). */
    public EJB_DOUBLE_PK_PK() {}

    /**
     * Constructor.
     * @param id0 primary key field.
     * @param id1 primary key field.
     */
    public EJB_DOUBLE_PK_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_PK_PK
     *         in the form of {id0=&lt;value&gt;,id1=&lt;value&gt;}.
     * @return a string representation of this EJB_DOUBLE_PK_PK.
     */
    public String toString() {
        return "{id0=" + _id0 + ",id1=" + _id1 + "}";
    }

    /**
     * Compares the specified Object with this EJB_DOUBLE_PK_PK for equality.
     * @param o the reference object with which to compare.
     * @return true if the specified Object is equal to this EJB_DOUBLE_PK_PK.
     */
    public boolean equals(Object o) {
        return ((o instanceof EJB_DOUBLE_PK_PK)
             && (_id0 == ((EJB_DOUBLE_PK_PK)o)._id0)
             && (_id1 == ((EJB_DOUBLE_PK_PK)o)._id1));
    }

    /**
     * Computes the hash code value of this EJB_DOUBLE_PK_PK.
     */
    protected void computeHashCode() {
        _hashCode = 1;
        _hashCode = (31 * _hashCode) + _id0;
        _hashCode = (31 * _hashCode) + _id1;
    }

    /**
     * Returns the hash code value of this EJB_DOUBLE_PK_PK.
     * @return the hash code value of this EJB_DOUBLE_PK_PK.
     */
    public int hashCode() {
        return _hashCode;
    }
}

EJB_DOUBLE_PK_PK.html (HTML view generated by ejen v.1.0.0).