public List<Railway> findAll(Railway criteria) { PlainSpecification<Railway> spec1 = new PlainSpecification<Railway>(new SearchCriteria("id", "=", criteria.getId())); PlainSpecification<Railway> spec2 = new PlainSpecification<Railway>( new SearchCriteria("railwayCode", "like", criteria.getRailwayCode())); return railwayRepository.findAll(Specifications.where(spec1).and(spec2)); }
public void delete(Long id) { railwayRepository.delete(id); }
public Railway save(Railway railway) { // logger.debug("railway.getId()=" + railway.getId()); // logger.debug("railway.getRailwayCode()=" + railway.getRailwayCode()); // logger.debug("railway.getVersion()=" + railway.getVersion()); return railwayRepository.save(railway); }
public List<Map<String, Object>> getRailwayList() { return railwayRepository.getList(); }
public Railway getByRailwayCode(Integer railwayCode) { return railwayRepository.findByRailwayCode(railwayCode); }
public Railway getRailway(Long id) { return railwayRepository.findOne(id); }