Package cz.cvut.fel.wa2.interior.entity

Examples of cz.cvut.fel.wa2.interior.entity.GaeUser


        Eshop eshop = eshopDAO.findEagerlyById(Eshop.class, eshopId);
        if (eshop == null) {
            throw new NotExistingEntityException("E-shop with ID " + eshopId + " does not exist.");
        }

        Product product = productDAO.findByComplexId(Product.class, productId, Eshop.class, eshopId);
        if (product == null) {
            throw new NotExistingEntityException("Product with ID " + productId + " does not exist.");
        }

        Product linkedProduct = productDAO.findByComplexId(Product.class, linkedProductId, Eshop.class, linkedEshopId);
        if (linkedProduct == null) {
            throw new NotExistingEntityException("Product with ID " + linkedProductId + " does not exist.");
        }

        if (eshopId.equals(linkedEshopId)) {
View Full Code Here


        Eshop eshop = eshopDAO.findEagerlyById(Eshop.class, eshopId);
        if (eshop == null) {
            throw new NotExistingEntityException("E-shop with ID " + eshopId + " does not exist.");
        }

        Product product = productDAO.findByComplexId(Product.class, productId, Eshop.class, eshopId);
        if (product == null) {
            throw new NotExistingEntityException("Product with ID " + productId + " does not exist.");
        }

        Product linkedProduct = productDAO.findByComplexId(Product.class, linkedProductId, Eshop.class, linkedEshopId);
        if (linkedProduct == null) {
            throw new NotExistingEntityException("Product with ID " + linkedProductId + " does not exist.");
        }

        if (eshopId.equals(linkedEshopId)) {
View Full Code Here

        productDAO.removeByComplexId(Product.class, productId, Eshop.class, eshopId);
    }

    @Override
    public ProductDTO findById(UriInfo uriInfo, Long eshopId, Long productId) throws NotExistingEntityException {
        Product product = productDAO.findByComplexId(Product.class, productId, Eshop.class, eshopId);
        if (product == null) {
            throw new NotExistingEntityException("Product with ID " + productId + " does not exist.");
        }

        return new ProductDTO(product, uriInfo, true);
View Full Code Here

TOP

Related Classes of cz.cvut.fel.wa2.interior.entity.GaeUser

Copyright © 2018 www.massapicom. 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.