public void insertIndustryclass(String industryclass, String pid) throws XueWenServiceException { List<Object> names = StringToList.tranfer(industryclass); for (Object obj : names) { Industryclass ind = new Industryclass(); ind.setName(obj.toString()); ind.setpId(pid); industryclassRepository.save(ind); } }
public List<Industryclass> getAllIndustry() throws XueWenServiceException { List<Industryclass> industryclasses = industryclassRepository.findAll(); if (industryclasses != null && industryclasses.size() > 0) { for (Industryclass industryclass : industryclasses) { List<Jobs> jobs = jobsRepository.findByPId(industryclass.getId()); if (jobs != null && jobs.size() > 0) { industryclass.setIndustryClass(jobs); } } } return industryclasses; }
public List<Industryclass> findAllIndustryClass() throws XueWenServiceException { return industryclassRepository.findAll(); }
public Industryclass findIndustryClass(String id) throws XueWenServiceException { return industryclassRepository.findOneById(id); }