Package com.asakusafw.modelgen.model

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


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

     * 単純なテーブル
     * @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

        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

     */
    @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

     */
    @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

     */
    @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

     * 単純なテーブル
     * @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

     * booleanのgetter名に関するもの。
     * @throws Throwable 例外が発生した場合
     */
    @Test
    public void booleanGetter() throws Throwable {
        TableModelDescription model = new TableModelBuilder("Hello")
            .add(null, "id", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "frag", PropertyTypeKind.BOOLEAN)
            .toDescription();

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

     * Writableのテスト。
     * @throws Throwable 例外が発生した場合
     */
    @Test
    public void writable() throws Throwable {
        TableModelDescription model = new TableModelBuilder("Hello")
            .add(null, "id", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "value", new StringType(255))
            .add(null, "nothing", new StringType(255))
            .toDescription();

View Full Code Here

TOP

Related Classes of com.asakusafw.modelgen.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.