@Override
    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public void addComponent(Product product, Component component) {
        // Check arguments
        // TODO: contracts checking is better to check with AOP
        if (product == null || product.getName() == null || product.getName().isEmpty()) {
            // TODO: throw
        }
        if (component == null || component.getComponent() == null
                || component.getComponent().getName() == null || component.getComponent().getName().isEmpty()) {
            // TODO: throw
        }

        // Find product and component
        ProductEntity productEntity = productsDAO.findByName(product.getName());
        ProductEntity componentEntity = productsDAO.findByName(component.getComponent().getName());

        // TODO: check that component is not already part of product

        BomClosureEntity ref = new BomClosureEntity();
        ref.setProduct(productEntity);
        ref.setComponent(componentEntity);
        ref.setAmount(component.getAmount());
        ref.setLength(1);
        bomClosureDAO.insert(ref);

        // TODO: Create refs to all parents of product

    }