Package com.asakusafw.modelgen.model

Examples of com.asakusafw.modelgen.model.JoinedModelDescription


            .toDescription();
        TableModelDescription b = new TableModelBuilder("B")
            .add(null, "id", PropertyTypeKind.LONG)
            .add(null, "foo", new StringType(255))
            .toDescription();
        JoinedModelDescription j = new JoinedModelBuilder("J", a, "a", b, "b")
            .on("a.id", "b.id")
            .add("id", "a.id")
            .add("hoge", "a.hoge")
            .add("bar", "b.foo")
            .toDescription();
View Full Code Here


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

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

        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

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

        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(2));

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

TOP

Related Classes of com.asakusafw.modelgen.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.