hi
here is pk class of having two attributes as primary key.
import java.io.Serializable;
import java.sql.Timestamp;
/**
* Entity PrimaryKey for Report
*
* @author
*/
public class ReportEntityPK implements Serializable {
/**
* Attributes declaration
*/
private long id;
private Timestamp lastUpdated;
/**
* @roseuid 3D97D2A703C7
* @J2EE_METHOD -- hashCode
* Referencing to object that represetns the entity object.
*/
public int hashCode () {
return 0;
}
/**
* @roseuid 3D97D2A703CF
* @J2EE_METHOD -- equals
* Method that compares two entity object references -- since the
Java Object.equals(Object
* obj) method is unspecified.
*/
public boolean equals (java.lang.Object obj) {
return true;
}
/**
* @roseuid 3D97D2A703D1
* @J2EE_METHOD -- toString
* Own toString() method of a bean's PK class.
*/
public java.lang.String toString () {
return null;
}
/**
* @roseuid 3D97F3AB00F7
* @J2EE_METHOD -- ReportEntityPK
*/
public ReportEntityPK () {
}
/**
* @roseuid 3DCB5BE20253
* @J2EE_METHOD -- ReportEntityPK
*/
public ReportEntityPK (long lId) {
}
/**
* @roseuid 3DCB73B0007F
* @J2EE_METHOD -- ReportEntityPK
*/
public ReportEntityPK (long lId, java.sql.Timestamp tLastUpdated) {
}
/**
* @return the current value of the id property
* Access method for the id property
*/
public long getid() {
return id;
}
/**
* @param id the new value of the id property
* Sets the value of the id property
*/
public void setid(long id) {
this.id = id;
}
/**
* @return the current value of the lastUpdated property
* Access method for the lastUpdated property
*/
public Timestamp getlastUpdated() {
return lastUpdated;
}
/**
* @param lastUpdated the new value of the lastUpdated property
* Sets the value of the lastUpdated property
*/
public void setlastUpdated(Timestamp lastUpdated) {
this.lastUpdated = lastUpdated;
}
}