Examples of DepartmentDao


Examples of by.bsuir.hypermarket.dao.concrete.DepartmentDao

  private final Logger log = Logger.getLogger(getClass().getSimpleName());
 
  @Override
  public String execute(CommandParams<?> request) throws ServletException, IOException {
    String page = null;
    AbstractDao<Department> departmentDao = new DepartmentDao();
    try {
      List<Department> departments = departmentDao.findAll();
      request.setAttribute(Commands.CATALOG_DEPARTMENTS, departments);
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.CATALOG_PAGE_PATH);
    } catch (DaoException e) {
      log.error("Was not able to execute catalog command");
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ERROR_PAGE_PATH);
View Full Code Here

Examples of com.ateam.webstore.dao.DepartmentDAO

public class DepartmentService implements RepositoryService<Department> {

  @Override
  public Department store(Department department) {

    DepartmentDAO repository = new DepartmentDAO();
    return repository.save(department);
   
  }
View Full Code Here

Examples of com.ateam.webstore.dao.DepartmentDAO

  }

  @Override
  public void remove(Department department) {

    DepartmentDAO repository = new DepartmentDAO();
    repository.delete(department);
   
  }
View Full Code Here

Examples of com.ateam.webstore.dao.DepartmentDAO

  }

  @Override
  public Collection<Department> getAll() {

    DepartmentDAO repository = new DepartmentDAO();
    return repository.getAll();
   
  }
View Full Code Here

Examples of com.ateam.webstore.dao.DepartmentDAO

   
  }

  @Override
  public Department getById(Serializable id) {
    DepartmentDAO repository = new DepartmentDAO();
    return repository.get(id);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.