Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 public void delete(Long id) {
   railwayRepository.delete(id);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 4
0
 public List<Map<String, Object>> getRailwayList() {
   return railwayRepository.getList();
 }
Ejemplo n.º 5
0
 public Railway getByRailwayCode(Integer railwayCode) {
   return railwayRepository.findByRailwayCode(railwayCode);
 }
Ejemplo n.º 6
0
 public Railway getRailway(Long id) {
   return railwayRepository.findOne(id);
 }