Package com.asakusafw.compiler.flow

Examples of com.asakusafw.compiler.flow.DataClass.findProperty()


        DataObjectMirror cache = context.createModelCache(term.source());
        context.add(cache.createReset());
        for (Joined.Mapping mapping : term.mappings()) {
            // input: joined(destination), output: origin(source)
            Property source = inputType.findProperty(mapping.destination());
            Property destination = outputType.findProperty(mapping.source());
            context.add(destination.createSetter(
                    cache.get(),
                    source.createGetter(context.getInput())));
        }
        ResultMirror result = context.getOutput(outputPort);
View Full Code Here


            for (Joined.Mapping mapping : term.mappings()) {
                if (saw.contains(mapping.destination())) {
                    continue;
                }
                saw.add(mapping.destination());
                Property sourceProperty = inputType.findProperty(mapping.source());
                Property destinationProperty = outputType.findProperty(mapping.destination());
                process.add(destinationProperty.createSetter(
                        resultCache.get(),
                        sourceProperty.createGetter(input)));
            }
View Full Code Here

        context.add(cache.createReset());
        Expression inputObject = context.getInput();
        Expression outputObject = cache.get();
        for (DataClass.Property sourceProperty : sourceType.getProperties()) {
            Property sinkProperty = sinkType.findProperty(sourceProperty.getName());
            if (sinkProperty == null) {
                // skip this property
            } else if (sourceProperty.getType().equals(sinkProperty.getType()) == false) {
                getEnvironment().error(
                        "{0}において、{1}.{2}と{3}.{4}のプロパティ型が一致しません",
View Full Code Here

        if (valueClass == null) {
            valueClass = new DataClass.Unresolved(environment.getModelFactory(), slot.getType());
            environment.error("型{0}をロードできませんでした", slot.getType());
        } else {
            for (String name : slot.getSortPropertyNames()) {
                Property property = valueClass.findProperty(name);
                if (property == null) {
                    environment.error("型{0}のプロパティをロードできませんでした", slot.getType(), name);
                } else {
                    sortProperties.add(property);
                }
View Full Code Here

        }

        List<ShuffleModel.Term> terms = Lists.create();
        for (String name : keyInfo.getGroupProperties()) {
            int termId = terms.size() + 1;
            DataClass.Property property = target.findProperty(name);
            if (property == null) {
                error("データクラス{0}にはプロパティ{1}が定義されていません", target, name);
                continue;
            }
            terms.add(new ShuffleModel.Term(
View Full Code Here

                    property,
                    ShuffleModel.Arrangement.GROUPING));
        }
        for (ShuffleKey.Order order : keyInfo.getOrderings()) {
            int termId = terms.size() + 1;
            DataClass.Property property = target.findProperty(order.getProperty());
            if (property == null) {
                error("データクラス{0}にはプロパティ{1}が定義されていません",
                        target,
                        order.getProperty());
                continue;
View Full Code Here

        context.add(cache.createReset());
        Expression inputObject = context.getInput();
        Expression outputObject = cache.get();
        for (DataClass.Property sourceProperty : sourceType.getProperties()) {
            Property sinkProperty = sinkType.findProperty(sourceProperty.getName());
            if (sinkProperty == null) {
                getEnvironment().error(
                        "{0}において、{2}.{3}に対応するプロパティが{1}に定義されていません",
                        context.getOperatorDescription().getName(),
                        sinkType,
View Full Code Here

            for (Joined.Mapping mapping : term.mappings()) {
                if (saw.contains(mapping.destination())) {
                    continue;
                }
                saw.add(mapping.destination());
                Property sourceProperty = inputType.findProperty(mapping.source());
                Property destinationProperty = outputType.findProperty(mapping.destination());
                process.add(destinationProperty.createSetter(
                        resultCache.get(),
                        sourceProperty.createGetter(input)));
            }
View Full Code Here

        DataClass dataClass = toDataClass(input);
        ShuffleKey key = input.getDescription().getShuffleKey();
        assert key != null;
        List<Property> results = Lists.create();
        for (String name : key.getGroupProperties()) {
            Property property = dataClass.findProperty(name);
            if (property == null) {
                getEnvironment().error(
                        "型{0}にプロパティ{1}が見つかりませんでした",
                        dataClass,
                        name);
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.