Examples of findPropertyDeclaration()


Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

                "model = {",
                "  @directio.hive.varchar(length = 3)",
                "  simple : TEXT;",
                "};"
        }).findModelDeclaration("model");
        PropertyDeclaration property = model.findPropertyDeclaration("simple");
        HiveFieldTrait trait = property.getTrait(HiveFieldTrait.class);
        assertThat(trait, is(notNullValue()));
        assertThat(trait.getTypeKind(), is(HiveFieldTrait.TypeKind.VARCHAR));
        assertThat(trait.getStringLength(), is(3));
    }
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

    @Test
    public void simple() {
        DmdlSemantics resolved = resolve();
        ModelDeclaration simple = resolved.findModelDeclaration("simple");
        assertThat(simple, not(nullValue()));
        PropertyDeclaration property = simple.findPropertyDeclaration("a");
        assertThat(property, not(nullValue()));
        assertThat(property.getType(), is(type(BasicTypeKind.INT)));
    }

    /**
 
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

    public void projections() {
        DmdlSemantics resolved = resolve();
        ModelDeclaration simple = resolved.findModelDeclaration("simple");
        assertThat(simple, not(nullValue()));

        PropertyDeclaration a = simple.findPropertyDeclaration("a");
        assertThat(a, not(nullValue()));
        assertThat(a.getType(), is(type(BasicTypeKind.INT)));

        PropertyDeclaration b = simple.findPropertyDeclaration("b");
        assertThat(b, not(nullValue()));
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

        PropertyDeclaration a = simple.findPropertyDeclaration("a");
        assertThat(a, not(nullValue()));
        assertThat(a.getType(), is(type(BasicTypeKind.INT)));

        PropertyDeclaration b = simple.findPropertyDeclaration("b");
        assertThat(b, not(nullValue()));
        assertThat(b.getType(), is(type(BasicTypeKind.LONG)));

        ProjectionsTrait trait = simple.getTrait(ProjectionsTrait.class);
        assertThat(trait, not(nullValue()));
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

    public void join() {
        DmdlSemantics resolved = resolve();
        ModelDeclaration simple = resolved.findModelDeclaration("simple");
        assertThat(simple, not(nullValue()));

        PropertyDeclaration sid = simple.findPropertyDeclaration("sid");
        assertThat(sid, not(nullValue()));
        assertThat(sid.getType(), is(type(BasicTypeKind.LONG)));

        PropertyDeclaration aValue = simple.findPropertyDeclaration("a_value");
        assertThat(aValue, not(nullValue()));
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

        PropertyDeclaration sid = simple.findPropertyDeclaration("sid");
        assertThat(sid, not(nullValue()));
        assertThat(sid.getType(), is(type(BasicTypeKind.LONG)));

        PropertyDeclaration aValue = simple.findPropertyDeclaration("a_value");
        assertThat(aValue, not(nullValue()));
        assertThat(aValue.getType(), is(type(BasicTypeKind.TEXT)));

        PropertyDeclaration bValue = simple.findPropertyDeclaration("b_value");
        assertThat(bValue, not(nullValue()));
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

        PropertyDeclaration aValue = simple.findPropertyDeclaration("a_value");
        assertThat(aValue, not(nullValue()));
        assertThat(aValue.getType(), is(type(BasicTypeKind.TEXT)));

        PropertyDeclaration bValue = simple.findPropertyDeclaration("b_value");
        assertThat(bValue, not(nullValue()));
        assertThat(bValue.getType(), is(type(BasicTypeKind.DATE)));

        JoinTrait trait = simple.getTrait(JoinTrait.class);
        assertThat(trait, not(nullValue()));
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

    public void summarize() {
        DmdlSemantics resolved = resolve();
        ModelDeclaration simple = resolved.findModelDeclaration("simple");
        assertThat(simple, not(nullValue()));

        PropertyDeclaration key = simple.findPropertyDeclaration("key");
        assertThat(key, not(nullValue()));
        assertThat(key.getType(), is(type(BasicTypeKind.INT)));

        PropertyDeclaration sum = simple.findPropertyDeclaration("sum");
        assertThat(sum, not(nullValue()));
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

        PropertyDeclaration key = simple.findPropertyDeclaration("key");
        assertThat(key, not(nullValue()));
        assertThat(key.getType(), is(type(BasicTypeKind.INT)));

        PropertyDeclaration sum = simple.findPropertyDeclaration("sum");
        assertThat(sum, not(nullValue()));
        assertThat(sum.getType(), is(type(BasicTypeKind.LONG)));

        PropertyDeclaration count = simple.findPropertyDeclaration("count");
        assertThat(count, not(nullValue()));
View Full Code Here

Examples of com.asakusafw.dmdl.semantics.ModelDeclaration.findPropertyDeclaration()

        PropertyDeclaration sum = simple.findPropertyDeclaration("sum");
        assertThat(sum, not(nullValue()));
        assertThat(sum.getType(), is(type(BasicTypeKind.LONG)));

        PropertyDeclaration count = simple.findPropertyDeclaration("count");
        assertThat(count, not(nullValue()));
        assertThat(count.getType(), is(type(BasicTypeKind.LONG)));

        PropertyDeclaration max = simple.findPropertyDeclaration("max");
        assertThat(max, not(nullValue()));
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.