Examples of MappingFactor


Examples of com.asakusafw.dmdl.semantics.trait.MappingFactor

            final String target) {
        return new BaseMatcher<MappingFactor>() {
            @Override
            public boolean matches(Object object) {
                if (object instanceof MappingFactor) {
                    MappingFactor factor = (MappingFactor) object;
                    return factor.getKind() == kind
                        && factor.getSource().getName().identifier.equals(source)
                        && factor.getTarget().getName().identifier.equals(target);
                }
                return false;
            }
            @Override
            public void describeTo(Description desc) {
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.trait.MappingFactor

        List<MappingFactor> results = Lists.create();
        if (mapping == null) {
            for (PropertyDeclaration property : sourceModel.getDeclaredProperties()) {
                PropertyDeclaration targetProperty = model.findPropertyDeclaration(property.getName().identifier);
                if (targetProperty != null) {
                    results.add(new MappingFactor(
                            source.getName(),
                            PropertyMappingKind.ANY,
                            source.createPropertySymbol(property.getName()),
                            targetProperty.getSymbol()));
                }
            }
        } else {
            for (AstPropertyMapping propertyMapping : mapping.properties) {
                PropertyDeclaration targetProperty = model.findPropertyDeclaration(propertyMapping.target.identifier);
                if (targetProperty != null) {
                    results.add(new MappingFactor(
                            source.getName(),
                            PropertyMappingKind.ANY,
                            source.createPropertySymbol(propertyMapping.source),
                            targetProperty.getSymbol()));
                }
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.trait.MappingFactor

        List<MappingFactor> results = Lists.create();
        for (AstPropertyFolding propertyFolding : folding.properties) {
            PropertyDeclaration targetProperty = model.findPropertyDeclaration(propertyFolding.target.identifier);
            PropertyMappingKind mapping = resolveAggregateFunction(propertyFolding.aggregator);
            if (targetProperty != null && mapping != null) {
                results.add(new MappingFactor(
                        source.getName(),
                        mapping,
                        source.createPropertySymbol(propertyFolding.source),
                        targetProperty.getSymbol()));
            }
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.