Examples of DirectCriterionRequirement


Examples of org.libreplan.business.requirements.entities.DirectCriterionRequirement

    private Set<CriterionRequirement> asCriterionRequirements(
            Criterion... criterions) {
        Set<CriterionRequirement> result = new HashSet<CriterionRequirement>();
        for (Criterion each : criterions) {
            result.add(new DirectCriterionRequirement(each));
        }
        return result;
    }
View Full Code Here

Examples of org.libreplan.business.requirements.entities.DirectCriterionRequirement

        for (CriterionRequirementDTO criterionRequirementDTO : criterionRequirements) {
            Criterion criterion = getCriterion(criterionRequirementDTO.name,
                    criterionRequirementDTO.type);
            if (criterion != null) {
                if (criterionRequirementDTO instanceof DirectCriterionRequirementDTO) {
                    DirectCriterionRequirement directCriterionRequirement = getDirectCriterionRequirementByCriterion(
                            criterionRequirable, criterion);
                    if (directCriterionRequirement == null) {
                        try {
                            criterionRequirable
                                .addCriterionRequirement(DirectCriterionRequirement
View Full Code Here

Examples of org.libreplan.business.requirements.entities.DirectCriterionRequirement

    @Transactional
    public void testFindByCriteria1() throws InstanceNotFoundException {
        Criterion criterion = givenStoredCriterion();

        OrderLine orderLine1 = createValidOrderLine();
        orderLine1.addCriterionRequirement(new DirectCriterionRequirement(
                criterion));
        orderElementDAO.save(orderLine1);
        OrderLine orderLine2 = createValidOrderLine();
        orderElementDAO.save(orderLine2);
        OrderLine orderLine3 = createValidOrderLine();
View Full Code Here

Examples of org.libreplan.business.requirements.entities.DirectCriterionRequirement

    public void testFindByCriteria2() throws InstanceNotFoundException {
        Criterion criterion1 = givenStoredCriterion();
        Criterion criterion2 = givenStoredCriterion();

        OrderLine orderLine1 = createValidOrderLine();
        orderLine1.addCriterionRequirement(new DirectCriterionRequirement(
                criterion1));
        orderLine1.addCriterionRequirement(new DirectCriterionRequirement(
                criterion2));
        orderElementDAO.save(orderLine1);
        OrderLine orderLine2 = createValidOrderLine();
        orderElementDAO.save(orderLine2);
        OrderLine orderLine3 = createValidOrderLine();
        orderLine3.addCriterionRequirement(new DirectCriterionRequirement(
                criterion2));
        orderElementDAO.save(orderLine3);

        List<OrderElement> orderELements = orderElementDAO
                .findByLabelsAndCriteria(null, Collections.singleton(criterion1));
View Full Code Here

Examples of org.libreplan.business.requirements.entities.DirectCriterionRequirement

    public void testFindByCriteriaOnTree() throws InstanceNotFoundException {
        Criterion criterion1 = givenStoredCriterion();
        Criterion criterion2 = givenStoredCriterion();

        OrderLineGroup orderLineGroup = createValidOrderLineGroup();
        orderLineGroup.addCriterionRequirement(new DirectCriterionRequirement(
                criterion1));
        OrderElement child = orderLineGroup.getChildren().get(0);
        child.addCriterionRequirement(new DirectCriterionRequirement(criterion2));
        orderElementDAO.save(orderLineGroup);

        List<OrderElement> orderELements = orderElementDAO
                .findByLabelsAndCriteria(null,
                        Collections.singleton(criterion1));
View Full Code Here

Examples of org.libreplan.business.requirements.entities.DirectCriterionRequirement

        OrderLine orderLine1 = createValidOrderLine();
        orderLine1.addLabel(label);
        orderElementDAO.save(orderLine1);
        OrderLine orderLine2 = createValidOrderLine();
        orderLine2.addCriterionRequirement(new DirectCriterionRequirement(
                criterion));
        orderElementDAO.save(orderLine2);
        OrderLine orderLine3 = createValidOrderLine();
        orderLine3.addLabel(label);
        orderLine3.addCriterionRequirement(new DirectCriterionRequirement(
                criterion));

        orderElementDAO.save(orderLine3);

        List<OrderElement> orderELements = orderElementDAO
View Full Code Here

Examples of org.libreplan.business.requirements.entities.DirectCriterionRequirement

        Criterion criterion1 = givenStoredCriterion();
        Criterion criterion2 = givenStoredCriterion();

        OrderLine orderLine1 = createValidOrderLine();
        orderLine1.addLabel(label1);
        orderLine1.addCriterionRequirement(new DirectCriterionRequirement(
                criterion2));
        orderElementDAO.save(orderLine1);
        OrderLine orderLine2 = createValidOrderLine();
        orderLine2.addLabel(label2);
        orderLine2.addCriterionRequirement(new DirectCriterionRequirement(
                criterion1));
        orderElementDAO.save(orderLine2);
        OrderLine orderLine3 = createValidOrderLine();
        orderLine3.addLabel(label1);
        orderLine3.addLabel(label2);
        orderLine3.addCriterionRequirement(new DirectCriterionRequirement(
                criterion1));
        orderLine3.addCriterionRequirement(new DirectCriterionRequirement(
                criterion2));

        orderElementDAO.save(orderLine3);

        List<OrderElement> orderELements = orderElementDAO
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.