Package org.optaplanner.core.api.domain.variable

Examples of org.optaplanner.core.api.domain.variable.InverseRelationShadowVariable


    private void processPropertyAnnotations(DescriptorPolicy descriptorPolicy) {

    }

    public void linkShadowSources(DescriptorPolicy descriptorPolicy) {
        InverseRelationShadowVariable shadowVariableAnnotation = variablePropertyAccessor.getReadMethod()
                .getAnnotation(InverseRelationShadowVariable.class);
        Class<?> masterClass = getVariablePropertyType();
        EntityDescriptor sourceEntityDescriptor = getEntityDescriptor().getSolutionDescriptor()
                .findEntityDescriptor(masterClass);
        if (sourceEntityDescriptor == null) {
            throw new IllegalArgumentException("The entityClass (" + entityDescriptor.getEntityClass()
                    + ") has a " + InverseRelationShadowVariable.class.getSimpleName()
                    + " annotated property (" + variablePropertyAccessor.getName()
                    + ") with a masterClass (" + masterClass
                    + ") which is not a valid planning entity.");
        }
        String sourceVariableName = shadowVariableAnnotation.sourceVariableName();
        sourceVariableDescriptor = sourceEntityDescriptor.getVariableDescriptor(sourceVariableName);
        if (sourceVariableDescriptor == null) {
            throw new IllegalArgumentException("The entityClass (" + entityDescriptor.getEntityClass()
                    + ") has a " + InverseRelationShadowVariable.class.getSimpleName()
                    + " annotated property (" + variablePropertyAccessor.getName()
View Full Code Here

TOP

Related Classes of org.optaplanner.core.api.domain.variable.InverseRelationShadowVariable

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.