I hope this might help you, this is parent class
Code:
package com.netplus.workstation.pprincess.hibernate.entity;
import com.netplus.workstation.pprincess.Address;
import java.io.Serializable;
/**
* @castor.class
* @hibernate.class
* table="ADDRESS"
* discriminator-value="H"
* @hibernate.discriminator column="type" type="character"
*/
public class HibernateAddress implements Address, Serializable{
protected Long addressId;
protected Long memberId;
protected String addressNo;
protected String street;
protected String district;
protected String city;
protected String state;
protected int country;
protected String postCode;
protected String phone;
protected String fax;
public HibernateAddress() {
}
/**
* @castor.field
* type = "java.lang.Long"
* @castor.field-xml
* name = "addressId"
* node = "attribute"
* @hibernate.id
* generator-class="native"
* unsaved-value="0"
*/
public Long getAddressId(){
return this.addressId;
}
public void setAddressId(Long addressId){
this.addressId = addressId;
}
/**
* @castor.field
* type = "java.lang.Long"
* @castor.field-xml
* name = "memberId"
* node = "element"
* @hibernate.property
*/
public Long getMemberId(){
return this.memberId;
}
public void setMemberId(Long memberId){
this.memberId = memberId;
}
/**
* @castor.field
* type = "java.lang.String"
* @castor.field-xml
* name = "addressNo"
* node = "element"
* @hibernate.property
*/
public String getAddressNo(){
return this.addressNo;
}
public void setAddressNo(String addressNo){
this.addressNo = addressNo;
}
/**
* @castor.field
* type = "java.lang.String"
* @castor.field-xml
* name = "street"
* node = "element"
* @hibernate.property
*/
public String getStreet(){
return this.street;
}
public void setStreet(String street){
this.street = street;
}
/**
* @castor.field
* type = "java.lang.String"
* @castor.field-xml
* name = "district"
* node = "element"
* @hibernate.property
*/
public String getDistrict(){
return this.district;
}
public void setDistrict(String district){
this.district = district;
}
/**
* @castor.field
* type = "java.lang.String"
* @castor.field-xml
* name = "city"
* node = "element"
* @hibernate.property
*/
public String getCity(){
return this.city;
}
public void setCity(String city){
this.city = city;
}
/**
* @castor.field
* type = "java.lang.String"
* @castor.field-xml
* name = "state"
* node = "element"
* @hibernate.property
*/
public String getState(){
return this.state;
}
public void setState(String state){
this.state = state;
}
/**
* @castor.field
* type = "int"
* @castor.field-xml
* name = "country"
* node = "element"
* @hibernate.property
*/
public int getCountry(){
return this.country;
}
public void setCountry(int country){
this.country = country;
}
/**
* @castor.field
* type = "java.lang.String"
* @castor.field-xml
* name = "postCode"
* node = "element"
* @hibernate.property
*/
public String getPostCode(){
return this.postCode;
}
public void setPostCode(String postCode){
this.postCode = postCode;
}
/**
* @castor.field
* type = "java.lang.String"
* @castor.field-xml
* name = "phone"
* node = "element"
* @hibernate.property
*/
public String getPhone(){
return this.phone;
}
public void setPhone(String phone){
this.phone = phone;
}
/**
* @castor.field
* type = "java.lang.String"
* @castor.field-xml
* name = "fax"
* node = "element"
* @hibernate.property
*/
public String getFax(){
return this.fax;
}
public void setFax(String fax){
this.fax = fax;
}
}