Examples of HypermarketDao


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

  private final Logger log = Logger.getLogger(getClass().getSimpleName());
 
  @Override
  public String execute(CommandParams<?> request) throws ServletException, IOException {
    String page = null;
    AbstractDao<Hypermarket> hypermarketDao = new HypermarketDao();
    try {
      List<Hypermarket> hypermarkets = hypermarketDao.findAll();
      request.setAttribute(Commands.ABOUT_HYPERMARKETS, hypermarkets);
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ABOUT_CHAIN_PAGE_PATH);
    } catch (DaoException e) {
      log.error("Was not able to retrieve current hypermarket information", e);
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ERROR_PAGE_PATH);
View Full Code Here

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

public class AboutCommand implements Command {
 
  @Override
  public String execute(CommandParams<?> request) throws ServletException, IOException {
    String page = null;
    HypermarketDao hypermarketDao = new HypermarketDao();
    try {
      String strId = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.CURRENT_HYPERMARKET_ID);
      int intId = Integer.parseInt(strId);
      Hypermarket hypermarket = hypermarketDao.findEntityById(intId);
      request.setAttribute(Commands.ABOUT_HYPERMARKET, hypermarket);
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ABOUT_PAGE_PATH);
    } catch (DaoException e) {
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ERROR_PAGE_PATH);
    }
View Full Code Here

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

  @Override
  public String execute(HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException {
    String page = null;
    HypermarketDao hypermarketDao = new HypermarketDao();
    try {
      List<Hypermarket> hypermarkets = hypermarketDao.findAll();
      request.setAttribute("hypermarkets", hypermarkets);
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ABOUT_CHAIN_PAGE_PATH);
    } catch (DaoException e) {
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ERROR_PAGE_PATH);
    }
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.