package com.vci.server.workflow.server.service; import java.util.List; import com.vci.corba.common.VCIError; import com.vci.server.base.persistence.dao.BaseService; import com.vci.server.workflow.dao.PlwfpersonsetDaoImpl; import com.vci.server.workflow.objects.Plwfpersonset; public class PlwfpersonsetService extends BaseService{ private static PlwfpersonsetService instance = null; private PlwfpersonsetService(){ } public static PlwfpersonsetService getInstance(){ if(instance == null){ instance = new PlwfpersonsetService(); } return instance; } // add public boolean savePlwfpersonset(Plwfpersonset obj) throws VCIError { try { PlwfpersonsetDaoImpl daoImpl = new PlwfpersonsetDaoImpl(); daoImpl.saveOrUpdate(obj); return true; } catch (Exception e) { e.printStackTrace(); throw new VCIError("411116", new String[] {}); } } // query public List getPlwfpersonset(String tid) throws VCIError { try { PlwfpersonsetDaoImpl daoImpl = new PlwfpersonsetDaoImpl(); String hql ="from Plwfpersonset where pltempid='"+tid+"' order by plnodeorder asc"; return daoImpl.findEntities(hql); } catch (Exception e) { e.printStackTrace(); throw new VCIError("411117", new String[] {}); } } // del public boolean deletePlwfpersonset(Plwfpersonset obj) throws VCIError { try { PlwfpersonsetDaoImpl daoImpl = new PlwfpersonsetDaoImpl(); daoImpl.delete(obj); return true; } catch (Exception e) { e.printStackTrace(); throw new VCIError("411118", new String[] {}); } } }