Package com.asakusafw.dmdl.thundergate.model

Examples of com.asakusafw.dmdl.thundergate.model.JoinedModelDescription


        target.on("a.id", "b.id");
        target.add("id", "a.id");
        target.add("hoge", "a.hoge");
        target.add("bar", "b.foo");

        JoinedModelDescription desc = target.toDescription();
        assertThat(desc.getFromModel().getSimpleName(), is("A"));
        assertThat(desc.getJoinModel().getSimpleName(), is("B"));

        assertThat(desc.getFromCondition(), is(sources(a, "id")));
        assertThat(desc.getJoinCondition(), is(sources(b, "id")));

        List<ModelProperty> props = desc.getProperties();
        assertThat(props.size(), is(3));

        ModelProperty id = props.get(0);
        assertThat(id.getName(), is("id"));
        assertThat(id.getType().getKind(), is(PropertyTypeKind.LONG));
View Full Code Here


            .toDescription();
        TableModelDescription right = new TableModelBuilder("RIGHT")
            .add(null, "SID", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "VALUE", new StringType(255))
            .toDescription();
        JoinedModelDescription join = new JoinedModelBuilder("SIMPLE", left, "l", right, "r")
            .on("l.RIGHT_ID", "r.SID")
            .add("ID", "r.SID")
            .add("LEFT", "l.VALUE")
            .add("RIGHT", "r.VALUE")
            .toDescription();
View Full Code Here

            .toDescription();
        TableModelDescription right = new TableModelBuilder("RIGHT")
            .add(null, "SID", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "VALUE", new StringType(255))
            .toDescription();
        JoinedModelDescription join = new JoinedModelBuilder("SIMPLE", left, "l", right, "r")
            .on("l.RIGHT_ID", "r.SID")
            .add("ID", "r.SID")
            .add("LEFT", "l.VALUE")
            .add("RIGHT", "r.VALUE")
            .toDescription();
View Full Code Here

        }

        pairingTrivialSource(left, right);
        pairingTrivialSource(right, left);

        return new JoinedModelDescription(
                getReference(),
                buildProperties(),
                left.condition,
                right.condition);
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.dmdl.thundergate.model.JoinedModelDescription

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.