public TdWarehouse findByTitle(String title) { if (null == title) { return null; } return repository.findByTitle(title); }
public TdWarehouse findByTitleAndIdNot(String title, Long id) { if (null == title || null == id) { return null; } return repository.findByTitleAndIdNot(title, id); }
public Page<TdWarehouse> searchAndOrderBySortIdAsc(String keywords, int page, int size) { PageRequest pageRequest = new PageRequest(page, size); return repository .findByTitleContainingOrProvinceContainingOrCityContainingOrAddressContainingOrderBySortIdAsc( keywords, keywords, keywords, keywords, pageRequest); }
/** * 查找 * * @param id ID * @return */ public TdWarehouse findOne(Long id) { if (null == id) { return null; } return repository.findOne(id); }
public Page<TdWarehouse> findAllOrderBySortIdAsc(int page, int size) { PageRequest pageRequest = new PageRequest(page, size, new Sort(Direction.ASC, "sortId")); return repository.findAll(pageRequest); }
public List<TdWarehouse> findAll() { return (List<TdWarehouse>) repository.findAll(); }
/** * 查找 * * @param ids * @return */ public List<TdWarehouse> findAll(Iterable<Long> ids) { return (List<TdWarehouse>) repository.findAll(ids); }
public void delete(List<TdWarehouse> entities) { if (null != entities) { repository.delete(entities); } }
/** * 删除 * * @param e 菜单项 */ public void delete(TdWarehouse e) { if (null != e) { repository.delete(e); } }
/** * 删除 * * @param id 菜单项ID */ public void delete(Long id) { if (null != id) { repository.delete(id); } }
public List<TdWarehouse> save(List<TdWarehouse> entities) { return (List<TdWarehouse>) repository.save(entities); }
/** * 保存 * * @param e * @return */ public TdWarehouse save(TdWarehouse e) { return repository.save(e); }