Examples of ICriterionTypeDAO


Examples of org.libreplan.business.resources.daos.ICriterionTypeDAO

        if (!isNameSpecified()) {
            return true;
        }

        /* Check the constraint. */
        ICriterionTypeDAO criterionTypeDAO = Registry.getCriterionTypeDAO();

        if (isNewObject()) {
            return !criterionTypeDAO.existsByNameAnotherTransaction(this);
        } else {
            try {
                CriterionType c =
                    criterionTypeDAO.findUniqueByNameAnotherTransaction(name);
                return c.getId().equals(getId());
            } catch (InstanceNotFoundException e) {
                return true;
            }

View Full Code Here

Examples of org.libreplan.business.resources.daos.ICriterionTypeDAO

     * @throws ChangeTypeCriterionTypeException
     */
    @AssertTrue(message = "Criteria of this criterion type have been assigned to some resource.")
    protected boolean isChangeTypeConstraint() {
        /* Check the constraint. */
        ICriterionTypeDAO criterionTypeDAO = Registry.getCriterionTypeDAO();

        if (isNewObject()) {
            return true;
        }

        if (!criterionTypeDAO.hasDiferentTypeSaved(getId(), getResource())) {
            return true;
        }

        return (!(criterionTypeDAO
                .checkChildrenAssignedToAnyResource(this)));
    }
View Full Code Here

Examples of org.libreplan.business.resources.daos.ICriterionTypeDAO

    public static CriterionSatisfaction createUnvalidated(String code,
            String criterionTypeName, String criterionName, Resource resource,
            LocalDate startDate, LocalDate finishDate)
            throws InstanceNotFoundException {

        ICriterionTypeDAO criterionTypeDAO =
            Registry.getCriterionTypeDAO();

        /* Get CriterionType. */
        CriterionType criterionType = criterionTypeDAO.findUniqueByName(
            criterionTypeName);

        /* Get Criterion. */
        Criterion criterion = criterionType.getCriterion(
            criterionName);
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.