Examples of TableModelDescription


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

        List<ModelProperty> properties = Lists.create();
        for (Column column : columns) {
            ModelProperty property = toProperty(column);
            properties.add(property);
        }
        return new TableModelDescription(getReference(), properties);
    }
View Full Code Here

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

    private AstScript convert(ModelDescription model) {
        assert model != null;
        AstModelDefinition<?> def;
        if (model instanceof TableModelDescription) {
            TableModelDescription tableModel = (TableModelDescription) model;
            AstAttribute cacheSupport = generateCacheSupport(tableModel);
            if (cacheSupport == null) {
                def = RecordModelGenerator.generate(tableModel);
            } else {
                def = RecordModelGenerator.generate(tableModel, cacheSupport);
View Full Code Here

Examples of com.asakusafw.modelgen.model.TableModelDescription

    /**
     * 利用できない集約関数を利用している。
     */
    @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

Examples of com.asakusafw.modelgen.model.TableModelDescription

    /**
     * グループ化キーがモデルに含まれない。
     */
    @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

Examples of com.asakusafw.modelgen.model.TableModelDescription

     * 単純なテーブル
     * @throws Throwable 例外が発生した場合
     */
    @Test
    public void simple() throws Throwable {
        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();
        JoinedModelDescription j = new JoinedModelBuilder("J", a, "a", b, "b")
            .on("a.id", "b.id")
View Full Code Here

Examples of com.asakusafw.modelgen.model.TableModelDescription

        List<ModelProperty> properties = new ArrayList<ModelProperty>();
        for (Column column : columns) {
            ModelProperty property = toProperty(column);
            properties.add(property);
        }
        return new TableModelDescription(getReference(), properties);
    }
View Full Code Here

Examples of com.asakusafw.modelgen.model.TableModelDescription

     */
    @Test
    public void simple() throws Throwable {
        init("simple");

        TableModelDescription model = new TableModelBuilder("Model")
            .add(null, "id", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .toDescription();

        new Table().emit(model);
        new TsvIn().emit(model);
View Full Code Here

Examples of com.asakusafw.modelgen.model.TableModelDescription

     */
    @Test
    public void complex() throws Throwable {
        init("complex");

        TableModelDescription model = new TableModelBuilder("Model")
            .add(null, "id", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "value", new StringType(255))
            .add(null, "date", PropertyTypeKind.DATE)
            .add(null, "price", PropertyTypeKind.INT)
            .add(null, "flag", PropertyTypeKind.BOOLEAN)
View Full Code Here

Examples of com.asakusafw.modelgen.model.TableModelDescription

     */
    @Test
    public void empty() throws Throwable {
        init("empty");

        TableModelDescription model = new TableModelBuilder("Model")
            .add(null, "id", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .toDescription();

        new Table().emit(model);
        new TsvIn().emit(model);
View Full Code Here

Examples of com.asakusafw.modelgen.model.TableModelDescription

     * 単純なテーブル
     * @throws Throwable 例外が発生した場合
     */
    @Test
    public void simple() throws Throwable {
        TableModelDescription model = new TableModelBuilder("Hello")
            .add(null, "id", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "value", new StringType(255))
            .toDescription();

        new Table().emit(model);
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.