public void load(Object myaction) throws Exception { DepartAction action = (DepartAction) myaction; if (action.getDepart() != null) { String departid = action.getDepart().getDepartid(); if (departid != null) { TSysDepart object = (TSysDepart) getBaseDao().findById(TSysDepart.class, departid); action.setTsysDepart(object); } String updepartid = action.getDepart().getUpdepartid(); if (updepartid != null) { TSysDepart object = (TSysDepart) getBaseDao().findById(TSysDepart.class, updepartid); object.setDepartid(null); object.setDepartcode(null); object.setDepartname(null); action.setTsysDepart(object); } } }