Package org.libreplan.business.planner.limiting.entities

Examples of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueDependency


            removeQueueDependencyIfAny(each);
        }
    }

    private void removeQueueDependencyIfAny(Dependency dependency) {
        LimitingResourceQueueDependency queueDependency = dependency.getQueueDependency();
        if (queueDependency != null) {
            queueDependency.getHasAsOrigin().remove(queueDependency);
            queueDependency.getHasAsDestiny().remove(queueDependency);
            dependency.setQueueDependency(null);
            dependencyDAO.save(dependency);
            removeQueueDependencyById(queueDependency.getId());
        }
    }
View Full Code Here


                LimitingResourceQueueElement origin = calculateQueueElementFromDependency((Task) d
                        .getOrigin());
                LimitingResourceQueueElement destiny = calculateQueueElementFromDependency((Task) d
                        .getDestination());

                LimitingResourceQueueDependency queueDependency = LimitingResourceQueueDependency
                        .create(origin, destiny, d,
                                toQueueDependencyType(d.getType()));
                d.setQueueDependency(queueDependency);
                limitingResourceQueueDependencyDAO.save(queueDependency);
            }
View Full Code Here

        }

        private void removeLimitingDependencyIfNeeded(Dependency d) {
            if (!d.isDependencyBetweenLimitedAllocatedTasks()
                    && (d.hasLimitedQueueDependencyAssociated())) {
                LimitingResourceQueueDependency queueDependency = d
                        .getQueueDependency();
                queueDependency.getHasAsOrigin().remove(queueDependency);
                queueDependency.getHasAsDestiny().remove(queueDependency);
                d.setQueueDependency(null);
                try {
                    limitingResourceQueueDependencyDAO.remove(queueDependency
                            .getId());
                } catch (InstanceNotFoundException e) {
                    e.printStackTrace();
                    throw new RuntimeException("Trying to delete instance "
                            + " does not exist");
View Full Code Here

TOP

Related Classes of org.libreplan.business.planner.limiting.entities.LimitingResourceQueueDependency

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.