Package com.asakusafw.modelgen.model

Examples of com.asakusafw.modelgen.model.StringType


     */
    @Test
    public void attributes() {
        TableModelBuilder target = new TableModelBuilder("Attribute");
        target.add(null, "id", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY);
        target.add(null, "str", new StringType(255), Attribute.UNIQUE, Attribute.NOT_NULL);
        TableModelDescription desc = target.toDescription();

        assertThat(desc.getReference().getSimpleName(), is("Attribute"));

        List<ModelProperty> properties = desc.getProperties();
View Full Code Here


     */
    @Test
    public void simple() {
        TableModelDescription a = new TableModelBuilder("A")
            .add(null, "id", PropertyTypeKind.LONG)
            .add(null, "hoge", new StringType(255))
            .toDescription();
        TableModelDescription b = new TableModelBuilder("B")
            .add(null, "id", PropertyTypeKind.LONG)
            .add(null, "foo", new StringType(255))
            .toDescription();

        JoinedModelBuilder target = new JoinedModelBuilder(
                "J",
                a, "a",
View Full Code Here

     */
    @Test
    public void fill() {
        TableModelDescription a = new TableModelBuilder("A")
            .add(null, "id", PropertyTypeKind.LONG)
            .add(null, "hoge", new StringType(255))
            .toDescription();
        TableModelDescription b = new TableModelBuilder("B")
            .add(null, "id", PropertyTypeKind.LONG)
            .add(null, "hoge", new StringType(255))
            .toDescription();

        JoinedModelBuilder target = new JoinedModelBuilder(
                "J",
                a, "a",
View Full Code Here

     * 単純なワードカウント。
     */
    @Test
    public void simple() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "word", new StringType(255))
            .toDescription();

        SummarizedModelDescription model = new SummarizedModelBuilder("S", desc, "a")
            .add("word", Aggregator.IDENT, "a.word")
            .add("count", Aggregator.COUNT, "a.word")
View Full Code Here

     * 全てを単一のグループにまとめる。
     */
    @Test
    public void singleGroup() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "word", new StringType(255))
            .toDescription();

        SummarizedModelDescription model = new SummarizedModelBuilder("S", desc, "a")
            .add("count", Aggregator.COUNT, "a.word")
            .toDescription();
View Full Code Here

    @Test
    public void multiGroupKey() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "sex", PropertyTypeKind.BYTE)
            .add(null, "age", PropertyTypeKind.SHORT)
            .add(null, "name", new StringType(255))
            .toDescription();

        SummarizedModelDescription model = new SummarizedModelBuilder("S", desc, "a")
            .add("sex", Aggregator.IDENT, "sex")
            .add("age", Aggregator.IDENT, "age")
View Full Code Here

TOP

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

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.