///////////////////////////////////////////////////////////////////////////////
// File : EJB_POSITION_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 POSITION table.
* <br><i>Ejen EJB 1.1 (BMP) demonstration</i>
* @version 1.0
* @author (unknown)
* @see org.ejb.test.POSITIONValues
* @see org.ejb.test.EJB_POSITIONHome
* @see org.ejb.test.EJB_POSITIONBean
* @see org.ejb.test.EJB_POSITION
*/
public class EJB_POSITION_PK implements java.io.Serializable {
/** Hash code of this EJB_POSITION_PK */
protected int _hashCode = 0;
/** Primary key field. */
protected int _documentid;
/** Primary key field. */
protected int _position;
/** Default constructeur (empty). */
public EJB_POSITION_PK() {}
/**
* Constructor.
* @param documentid primary key field.
* @param position primary key field.
*/
public EJB_POSITION_PK(int documentid, int position) {
_documentid = documentid;
_position = position;
computeHashCode();
}
/**
* Returns the value of the DOCUMENTID field.
* @return value of the DOCUMENTID field.
*/
public int getDocumentid() {
return _documentid;
}
/**
* Returns the value of the POSITION field.
* @return value of the POSITION field.
*/
public int getPosition() {
return _position;
}
/**
* Returns a string representation of this EJB_POSITION_PK
* in the form of {documentid=<value>,position=<value>}.
* @return a string representation of this EJB_POSITION_PK.
*/
public String toString() {
return "{documentid=" + _documentid + ",position=" + _position + "}";
}
/**
* Compares the specified Object with this EJB_POSITION_PK for equality.
* @param o the reference object with which to compare.
* @return true if the specified Object is equal to this EJB_POSITION_PK.
*/
public boolean equals(Object o) {
return ((o instanceof EJB_POSITION_PK)
&& (_documentid == ((EJB_POSITION_PK)o)._documentid)
&& (_position == ((EJB_POSITION_PK)o)._position));
}
/**
* Computes the hash code value of this EJB_POSITION_PK.
*/
protected void computeHashCode() {
_hashCode = 1;
_hashCode = (31 * _hashCode) + _documentid;
_hashCode = (31 * _hashCode) + _position;
}
/**
* Returns the hash code value of this EJB_POSITION_PK.
* @return the hash code value of this EJB_POSITION_PK.
*/
public int hashCode() {
return _hashCode;
}
}
EJB_POSITION_PK.html
(HTML view generated by ejen v.1.0.0).