@Secured({"ROLE_ADMIN"}) @Override public void delete(long id) { LOGGER.debug("Delete the company with id: {}", id); computerDAO.removeByCompany_Id(id); companyDAO.delete(id); }
@Secured({"ROLE_ADMIN"}) @Override public void delete(Company c) { LOGGER.debug("Delete the company : {}", c); computerDAO.removeByCompany(c); companyDAO.delete(c); }
@Secured({"ROLE_USER"}) @Override @Transactional(readOnly = true) public Page<Company> getPage(Pageable pageable, String search) { LOGGER.debug("Populating the companies page : {}", pageable); return companyDAO.findByNameContaining(pageable, search); }
@Override @Secured({"ROLE_USER"}) @Transactional(readOnly = true) public boolean exist(long id) { LOGGER.debug("Exist computer with id : {}", id); return companyDAO.exists(id); }
@Secured({"ROLE_USER"}) @Override @Transactional(readOnly = true) public Company find(long id) { LOGGER.debug("Find company with id : {}", id); return companyDAO.findOne(id); }
@Secured({"ROLE_USER"}) @Override @Transactional(readOnly = true) public List<Company> listCompanies() { LOGGER.debug("List companies"); return companyDAO.findAll(); }