package com.areamodule.bean;
import java.io.Serializable;
import com.areamodule.dao.TbAreaDAO;
public class TbArea implements Serializable{
private int areaId;
private String areaPostCode;
private String areaName;
private int parentAreaId;
private TbArea tbAreaParent;
private String areaMemo;
private String createTime;
public int getAreaId(){
return areaId;
}
public void setAreaId(int areaId){
this.areaId = areaId;
}
public String getAreaPostCode(){
return areaPostCode;
}
public void setAreaPostCode(String areaPostCode){
this.areaPostCode = areaPostCode;
}
public String getAreaName(){
return areaName;
}
public void setAreaName(String areaName){
this.areaName = areaName;
}
public int getParentAreaId(){
return parentAreaId;
}
public void setParentAreaId(int parentAreaId){
this.parentAreaId = parentAreaId;
this.tbAreaParent=this.areaId==parentAreaId?this:new TbAreaDAO().getTbAreaByAreaId(parentAreaId);
}
public String getAreaMemo(){
return areaMemo;
}
public void setAreaMemo(String areaMemo){
this.areaMemo = areaMemo;
}
public String getCreateTime(){
return createTime;
}
public void setCreateTime(String createTime){
this.createTime = createTime;
}
public TbArea getTbAreaParent() {
return tbAreaParent;
}
public void setTbAreaParent(TbArea tbAreaParent) {
this.tbAreaParent = tbAreaParent;
}
public TbArea(){
}
public TbArea(String areaPostCode,String areaName,int parentAreaId,String areaMemo,String createTime){
this.areaPostCode = areaPostCode;
this.areaName = areaName;
this.parentAreaId = parentAreaId;
this.areaMemo = areaMemo;
this.createTime = createTime;
}
public TbArea(int areaId,String areaPostCode,String areaName,int parentAreaId,String areaMemo,String createTime){
this.areaId = areaId;
this.areaPostCode = areaPostCode;
this.areaName = areaName;
this.parentAreaId = parentAreaId;
this.areaMemo = areaMemo;
this.createTime = createTime;
}
}