Пример #1
0
 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));
 }
Пример #2
0
 public void delete(Long id) {
   railwayRepository.delete(id);
 }
Пример #3
0
 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);
 }
Пример #4
0
 public List<Map<String, Object>> getRailwayList() {
   return railwayRepository.getList();
 }
Пример #5
0
 public Railway getByRailwayCode(Integer railwayCode) {
   return railwayRepository.findByRailwayCode(railwayCode);
 }
Пример #6
0
 public Railway getRailway(Long id) {
   return railwayRepository.findOne(id);
 }