Examples of DependentPlanningVariable


Examples of org.drools.planner.api.domain.variable.DependentPlanningVariable

    public void processAnnotations() {
        processPropertyAnnotations();
    }

    private void processPropertyAnnotations() {
        DependentPlanningVariable dependentPlanningVariableAnnotation = variablePropertyDescriptor.getReadMethod()
                .getAnnotation(DependentPlanningVariable.class);
        String masterPropertyName = dependentPlanningVariableAnnotation.master();
        masterPlanningVariableDescriptor = planningEntityDescriptor.getPlanningVariableDescriptor(masterPropertyName);
        if (masterPlanningVariableDescriptor == null) {
            throw new IllegalStateException("The planningEntityClass ("
                    + planningEntityDescriptor.getPlanningEntityClass()
                    + ") has a DependentPlanningVariable annotated property (" + variablePropertyDescriptor.getName()
                    + ") that refers to a masterPropertyName (" + masterPropertyName
                    + ") that does not exist on that class (" + planningEntityDescriptor.getPlanningEntityClass()
                    + ").");
        }
        masterPlanningVariableDescriptor.addDependentPlanningVariableDescriptor(this);
        String mappedByPropertyName = dependentPlanningVariableAnnotation.mappedBy();
        if (!mappedByPropertyName.equals("")) {
            Class<?> oppositeClass = variablePropertyDescriptor.getPropertyType();
            PlanningEntityDescriptor oppositePlanningEntityDescriptor
                    = planningEntityDescriptor.getSolutionDescriptor().getPlanningEntityDescriptor(oppositeClass);
            if (oppositePlanningEntityDescriptor == null) {
View Full Code Here

Examples of org.drools.planner.api.domain.variable.DependentPlanningVariable

    public void processAnnotations() {
        processPropertyAnnotations();
    }

    private void processPropertyAnnotations() {
        DependentPlanningVariable dependentPlanningVariableAnnotation = variablePropertyDescriptor.getReadMethod()
                .getAnnotation(DependentPlanningVariable.class);
        String masterPropertyName = dependentPlanningVariableAnnotation.master();
        masterPlanningVariableDescriptor = planningEntityDescriptor.getPlanningVariableDescriptor(masterPropertyName);
        if (masterPlanningVariableDescriptor == null) {
            throw new IllegalStateException("The planningEntityClass ("
                    + planningEntityDescriptor.getPlanningEntityClass()
                    + ") has a DependentPlanningVariable annotated property (" + variablePropertyDescriptor.getName()
                    + ") that refers to a masterPropertyName (" + masterPropertyName
                    + ") that does not exist on that class (" + planningEntityDescriptor.getPlanningEntityClass()
                    + ").");
        }
        masterPlanningVariableDescriptor.addDependentPlanningVariableDescriptor(this);
        String mappedByPropertyName = dependentPlanningVariableAnnotation.mappedBy();
        if (!mappedByPropertyName.equals("")) {
            Class<?> oppositeClass = variablePropertyDescriptor.getPropertyType();
            PlanningEntityDescriptor oppositePlanningEntityDescriptor
                    = planningEntityDescriptor.getSolutionDescriptor().getPlanningEntityDescriptor(oppositeClass);
            if (oppositePlanningEntityDescriptor == null) {
View Full Code Here

Examples of org.drools.planner.api.domain.variable.DependentPlanningVariable

    public void processAnnotations() {
        processPropertyAnnotations();
    }

    private void processPropertyAnnotations() {
        DependentPlanningVariable dependentPlanningVariableAnnotation = variablePropertyDescriptor.getReadMethod()
                .getAnnotation(DependentPlanningVariable.class);
        String masterPropertyName = dependentPlanningVariableAnnotation.master();
        masterPlanningVariableDescriptor = planningEntityDescriptor.getPlanningVariableDescriptor(masterPropertyName);
        if (masterPlanningVariableDescriptor == null) {
            throw new IllegalStateException("The planningEntityClass ("
                    + planningEntityDescriptor.getPlanningEntityClass()
                    + ") has a DependentPlanningVariable annotated property (" + variablePropertyDescriptor.getName()
                    + ") that refers to a masterPropertyName (" + masterPropertyName
                    + ") that does not exist on that class (" + planningEntityDescriptor.getPlanningEntityClass()
                    + ").");
        }
        masterPlanningVariableDescriptor.addDependentPlanningVariableDescriptor(this);
        String mappedByPropertyName = dependentPlanningVariableAnnotation.mappedBy();
        if (!mappedByPropertyName.equals("")) {
            Class<?> oppositeClass = variablePropertyDescriptor.getPropertyType();
            PlanningEntityDescriptor oppositePlanningEntityDescriptor
                    = planningEntityDescriptor.getSolutionDescriptor().getPlanningEntityDescriptor(oppositeClass);
            if (oppositePlanningEntityDescriptor == null) {
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.