Package com.asakusafw.modelgen.model

Examples of com.asakusafw.modelgen.model.ModelProperty


        assertThat(model.getGroupBy(), is(sources(desc, "word")));

        List<ModelProperty> properties = model.getProperties();
        assertThat(properties.size(), is(2));

        ModelProperty word = properties.get(0);
        assertThat(word.getName(), is("word"));
        assertThat(word.getType().getKind(), is(PropertyTypeKind.STRING));
        assertThat(word.getJoined(), is(nullValue()));
        assertThat(
                word.getFrom(),
                is(source(desc, "word", Aggregator.IDENT)));

        ModelProperty count = properties.get(1);
        assertThat(count.getName(), is("count"));
        assertThat(count.getType().getKind(), is(PropertyTypeKind.LONG));
        assertThat(count.getJoined(), is(nullValue()));
        assertThat(
                count.getFrom(),
                is(source(desc, "word", Aggregator.COUNT)));
    }
View Full Code Here


        assertThat(model.getGroupBy(), is(sources(desc)));

        List<ModelProperty> properties = model.getProperties();
        assertThat(properties.size(), is(1));

        ModelProperty count = properties.get(0);
        assertThat(count.getName(), is("count"));
        assertThat(count.getType().getKind(), is(PropertyTypeKind.LONG));
        assertThat(
                count.getFrom(),
                is(source(desc, "word", Aggregator.COUNT)));
    }
View Full Code Here

        assertThat(model.getGroupBy(), is(sources(desc, "sex", "age")));

        List<ModelProperty> properties = model.getProperties();
        assertThat(properties.size(), is(3));

        ModelProperty sex = properties.get(0);
        assertThat(sex.getName(), is("sex"));
        assertThat(sex.getType().getKind(), is(PropertyTypeKind.BYTE));
        assertThat(
                sex.getFrom(),
                is(source(desc, "sex", Aggregator.IDENT)));

        ModelProperty age = properties.get(1);
        assertThat(age.getName(), is("age"));
        assertThat(age.getType().getKind(), is(PropertyTypeKind.SHORT));
        assertThat(
                age.getFrom(),
                is(source(desc, "age", Aggregator.IDENT)));

        ModelProperty count = properties.get(2);
        assertThat(count.getName(), is("count"));
        assertThat(count.getType().getKind(), is(PropertyTypeKind.LONG));
        assertThat(
                count.getFrom(),
                is(source(desc, "name", Aggregator.COUNT)));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.modelgen.model.ModelProperty

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.