Package org.drools.planner.api.domain.variable

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


    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

    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

Related Classes of org.drools.planner.api.domain.variable.DependentPlanningVariable

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.