Examples of ExternalCompany


Examples of org.libreplan.business.externalcompanies.entities.ExternalCompany

        if (StringUtils.isEmpty(orderElementWithAdvanceMeasurementsListDTO.externalCompanyNif)) {
            return getErrorMessage("", "external company ID not specified");
        }

        ExternalCompany externalCompany;
        try {
            externalCompany = externalCompanyDAO
                    .findUniqueByNif(orderElementWithAdvanceMeasurementsListDTO.externalCompanyNif);
        } catch (InstanceNotFoundException e1) {
            return getErrorMessage(orderElementWithAdvanceMeasurementsListDTO.externalCompanyNif,
                    "external company not found");
        }

        if (!externalCompany.isSubcontractor()) {
            return getErrorMessage(orderElementWithAdvanceMeasurementsListDTO.externalCompanyNif,
                    "external company is not registered as subcontractor");
        }

        List<OrderElementWithAdvanceMeasurementsOrEndDateDTO> orderElements = orderElementWithAdvanceMeasurementsListDTO.orderElements;
View Full Code Here

Examples of org.libreplan.business.externalcompanies.entities.ExternalCompany

        }
        return false;
    }

    private boolean acceptExternalCompany(FilterPair filter,Order order) {
        ExternalCompany filterCustomer = (ExternalCompany) filter.getValue();
        if ((order.getCustomer() != null)
                && (order.getCustomer().getId().equals(filterCustomer.getId()))) {
            return true;
        }
        return false;
    }
View Full Code Here

Examples of org.libreplan.business.externalcompanies.entities.ExternalCompany

    private List<FilterPair> fillWithFirstTenFiltersCustomer() {
        List<ExternalCompany> externalCompanies = databaseSnapshots
                .snapshotExternalCompanies();
        for (int i = 0; getListMatching().size() < 10
                && i < externalCompanies.size(); i++) {
            ExternalCompany externalCompany = externalCompanies.get(i);
            addExternalCompany(externalCompany);
        }
        return getListMatching();
    }
View Full Code Here

Examples of org.libreplan.business.externalcompanies.entities.ExternalCompany

    private List<FilterPair> fillWithFirstTenFiltersCustomer() {
        List<ExternalCompany> externalCompanies = databaseSnapshots
                .snapshotExternalCompanies();
        for (int i = 0; getListMatching().size() < 10
                && i < externalCompanies.size(); i++) {
            ExternalCompany externalCompany = externalCompanies.get(i);
            addExternalCompany(externalCompany);
        }
        return getListMatching();
    }
View Full Code Here

Examples of org.libreplan.business.externalcompanies.entities.ExternalCompany

    }

    private HoursGroup associatedHoursGroup;

    private ExternalCompany getSubcontractorExternalCompanySaved() {
        ExternalCompany externalCompany = ExternalCompanyDAOTest
                .createValidExternalCompany();
        externalCompany.setSubcontractor(true);

        externalCompanyDAO.save(externalCompany);
        externalCompanyDAO.flush();
        sessionFactory.getCurrentSession().evict(externalCompany);

        externalCompany.dontPoseAsTransientObjectAnymore();

        return externalCompany;
    }
View Full Code Here

Examples of org.libreplan.business.externalcompanies.entities.ExternalCompany

    }

    private List<Order> getOrdersFiltered() {
        List<org.libreplan.business.labels.entities.Label> labels = new ArrayList<org.libreplan.business.labels.entities.Label>();
        List<Criterion> criteria = new ArrayList<Criterion>();
        ExternalCompany customer = null;
        OrderStatusEnum state = null;

        for (FilterPair filterPair : (List<FilterPair>) bdFilters
                .getSelectedElements()) {
            OrderFilterEnum type = (OrderFilterEnum) filterPair.getType();
View Full Code Here

Examples of org.libreplan.business.externalcompanies.entities.ExternalCompany

    @Autowired
    private IExternalCompanyDAO externalCompanyDAO;

    private ExternalCompany getSubcontractorExternalCompanySaved() {
        ExternalCompany externalCompany = ExternalCompanyDAOTest
                .createValidExternalCompany();
        externalCompany.setSubcontractor(true);

        externalCompanyDAO.save(externalCompany);
        externalCompanyDAO.flush();
        sessionFactory.getCurrentSession().evict(externalCompany);

        externalCompany.dontPoseAsTransientObjectAnymore();

        return externalCompany;
    }
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.