Package com.asakusafw.dmdl.thundergate.model

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


    /**
     * 複数のグループ化キーを指定。
     */
    @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();

View Full Code Here


    /**
     * 空。
     */
    @Test(expected = RuntimeException.class)
    public void empty() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "word", PropertyTypeKind.STRING)
            .toDescription();

        new SummarizedModelBuilder("S", desc, "a")
            .toDescription();
View Full Code Here

    /**
     * 集約するカラムが見つからない。
     */
    @Test(expected = RuntimeException.class)
    public void missingAggregatingColumn() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "word", PropertyTypeKind.STRING)
            .toDescription();

        new SummarizedModelBuilder("S", desc, "a")
            .add("word", Aggregator.IDENT, "a.MISSING");
View Full Code Here

    /**
     * グループ化カラムが見つからない。
     */
    @Test(expected = RuntimeException.class)
    public void missingGroupingColumn() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "word", PropertyTypeKind.STRING)
            .toDescription();

        new SummarizedModelBuilder("S", desc, "a")
            .groupBy("a.MISSING");
View Full Code Here

    /**
     * 集約すべきカラムを集約していない。
     */
    @Test(expected = RuntimeException.class)
    public void invalidIdent() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "word", PropertyTypeKind.STRING)
            .add(null, "value", PropertyTypeKind.INT)
            .toDescription();

        new SummarizedModelBuilder("S", desc, "a")
View Full Code Here

    /**
     * 利用できない集約関数を利用している。
     */
    @Test(expected = RuntimeException.class)
    public void invalidAggregation() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "word", PropertyTypeKind.STRING)
            .add(null, "name", PropertyTypeKind.STRING)
            .toDescription();

        new SummarizedModelBuilder("S", desc, "a")
View Full Code Here

    /**
     * グループ化キーがモデルに含まれない。
     */
    @Test(expected = RuntimeException.class)
    public void noGroupColumn() {
        TableModelDescription desc = new TableModelBuilder("A")
            .add(null, "word", PropertyTypeKind.STRING)
            .toDescription();

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

    /**
     * simple table.
     */
    @Test
    public void simple() {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("comment", "VALUE", new StringType(255))
            .toDescription();
        emitDmdl(RecordModelGenerator.generate(table));

        ModelLoader loader = generateJava();
View Full Code Here

    /**
     * all types.
     */
    @Test
    public void primitives() {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add(null, "TYPE_BOOLEAN", PropertyTypeKind.BOOLEAN)
            .add(null, "TYPE_BYTE", PropertyTypeKind.BYTE)
            .add(null, "TYPE_SHORT", PropertyTypeKind.SHORT)
            .add(null, "TYPE_INT", PropertyTypeKind.INT)
            .add(null, "TYPE_LONG", PropertyTypeKind.LONG)
View Full Code Here

    /**
     * table with primary keys.
     */
    @Test
    public void primary_keys() {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("SID", "SID", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add("comment", "VALUE", new StringType(255))
            .toDescription();
        emitDmdl(RecordModelGenerator.generate(table));

View Full Code Here

TOP

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

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.