74 lines
1.7 KiB
Java
74 lines
1.7 KiB
Java
package cn.bean;
|
||
|
||
import java.io.Serializable;
|
||
|
||
import com.amarsoft.are.ARE;
|
||
import com.amarsoft.are.jbo.BizObject;
|
||
import com.amarsoft.are.jbo.BizObjectManager;
|
||
import com.amarsoft.are.jbo.JBOFactory;
|
||
|
||
/**
|
||
* 重新构建机构对象,区别于ASUser,该类仅仅是一个简单的POJO
|
||
* @author yangsong
|
||
* @date 2014-1-21
|
||
*/
|
||
public class Org implements Serializable, Cloneable {
|
||
|
||
private static final long serialVersionUID = -8829895456144735807L;
|
||
|
||
public String orgId;
|
||
public String orgName;
|
||
public String orgLevel;
|
||
public String status;
|
||
public String sortNo;
|
||
public Org(){
|
||
|
||
}
|
||
public Org(String orgID){
|
||
try{
|
||
BizObjectManager bm = JBOFactory.getFactory().getManager("jbo.sys.ORG_INFO");
|
||
BizObject org = bm.createQuery("OrgID=:OrgID").setParameter("OrgID", orgID).getSingleResult(false);
|
||
if(org==null)return;
|
||
this.orgId = orgID;
|
||
this.orgLevel = org.getAttribute("OrgLevel").getString();
|
||
this.orgName = org.getAttribute("OrgName").getString();
|
||
this.sortNo = org.getAttribute("SortNo").getString();
|
||
this.status = org.getAttribute("Status").getString();
|
||
}catch(Exception e){
|
||
ARE.getLog().error("构造Org对象出错!");
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
public String getOrgId() {
|
||
return orgId;
|
||
}
|
||
public void setOrgId(String orgId) {
|
||
this.orgId = orgId;
|
||
}
|
||
public String getOrgName() {
|
||
return orgName;
|
||
}
|
||
public void setOrgName(String orgName) {
|
||
this.orgName = orgName;
|
||
}
|
||
public String getOrgLevel() {
|
||
return orgLevel;
|
||
}
|
||
public void setOrgLevel(String orgLevel) {
|
||
this.orgLevel = orgLevel;
|
||
}
|
||
public String getStatus() {
|
||
return status;
|
||
}
|
||
public void setStatus(String status) {
|
||
this.status = status;
|
||
}
|
||
public String getSortNo() {
|
||
return sortNo;
|
||
}
|
||
public void setSortNo(String sortNo) {
|
||
this.sortNo = sortNo;
|
||
}
|
||
|
||
}
|