this.varcName = varcName;
this.varcAddress = varcAddress;
this.intAge = intAge;
}
// Property accessors
@Column (name = "intId", nullable = false)
public int getIntId() {
return this.intId;
}
public void setIntId(int intId) {
this.intId = intId;
}
@Column (name = "varcName", length = 50)
public String getVarcName() {
return this.varcName;
}
public void setVarcName(String varcName) {
this.varcName = varcName;
}
@Column (name = "varcAddress", length = 50)
public String getVarcAddress() {
return this.varcAddress;
}
public void setVarcAddress(String varcAddress) {
this.varcAddress = varcAddress;
}
@Column (name = "intAge", nullable = false)
public int getIntAge() {
return this.intAge;
}
public void setIntAge(int intAge) {
this.intAge = intAge;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof UserId))
return false;
UserId castOther = (UserId) other;
return (this.getIntId() == castOther.getIntId())
&& ((this.getVarcName() == castOther.getVarcName()) || (this.getVarcName() != null
&& castOther.getVarcName() != null && this.getVarcName().equals(castOther.getVarcName())))
&& ((this.getVarcAddress() == castOther.getVarcAddress()) || (this.getVarcAddress() != null
&& castOther.getVarcAddress() != null && this.getVarcAddress().equals(
castOther.getVarcAddress()))) && (this.getIntAge() == castOther.getIntAge());
}
public int hashCode() {
int result = 17;
result = 37 * result + this.getIntId();
result = 37 * result + (getVarcName() == null 0 : this.getVarcName().hashCode());
result = 37 * result + (getVarcAddress() == null 0 : this.getVarcAddress().hashCode());
result = 37 * result + this.getIntAge();
return result;
}
}
package com.sourcefour.bean;
// default package
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
* UserId entity. @author MyEclipse Persistence Tools
*/
@Embeddable
public class UserId implements java.io.Serializable {
// Fields
private int intId;
private String varcName;
private String varcAddress;
private int intAge;
// Constructors
/** default constructor */
public UserId() {
}
/** minimal constructor */
public UserId(int intId, int intAge) {
this.intId = intId;
this.intAge = intAge;
}
/** full constructor */
public UserId(int intId, String varcName, String varcAddress, int intAge) {
this.intId = intId;
this.varcName = varcName;
this.varcAddress = varcAddress;
this.intAge = intAge;
}
// Property accessors
@Column(name = "intId", nullable = false)
public int getIntId() {
return this.intId;
}
public void setIntId(int intId) {
this.intId = intId;
}
@Column(name = "varcName", length = 50)
public String getVarcName() {
return this.varcName;
}
public void setVarcName(String varcName) {
this.varcName = varcName;
}
@Column(name = "varcAddress", length = 50)
public String getVarcAddress() {
return this.varcAddress;
}
public void setVarcAddress(String varcAddress) {
this.varcAddress = varcAddress;
}
@Column(name = "intAge", nullable = false)
public int getIntAge() {
return this.intAge;
}
public void setIntAge(int intAge) {
this.intAge = intAge;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof UserId))
return false;
UserId castOther = (UserId) other;
return (this.getIntId() == castOt