Package com.asakusafw.dmdl.thundergate.model

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


                column.aggregator,
                column.source.getDeclaring(),
                column.source.getName(),
                column.source.getType(),
                Collections.<Attribute>emptySet());
        return new ModelProperty(column.name, source);
    }
View Full Code Here


                    "プロパティが追加されていません ({0})",
                    getReference()));
        }
        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

                Aggregator.IDENT,
                getReference(),
                column.name,
                column.type,
                column.attributes);
        return new ModelProperty(column.name, source);
    }
View Full Code Here

        Map<String, ModelProperty> properties = new TreeMap<String, ModelProperty>(String.CASE_INSENSITIVE_ORDER);
        for (ModelProperty property : model.getProperties()) {
            properties.put(property.getSource().getName(), property);
        }

        ModelProperty sid = properties.get(config.getSidColumn());
        if (sid == null) {
            LOG.warn("テーブル{}にはカラム{}が定義されていないため、キャッシュはサポートされません",
                    model.getReference().getSimpleName(),
                    config.getSidColumn());
            return null;
        }
        if (sid.getType().getKind() != PropertyTypeKind.LONG) {
            LOG.warn("テーブル{}のカラム{}がBIGINTでないため、キャッシュはサポートされません",
                    model.getReference().getSimpleName(),
                    config.getSidColumn());
            return null;
        }

        ModelProperty timestamp = properties.get(config.getTimestampColumn());
        if (timestamp == null) {
            LOG.warn("テーブル{}にはカラム{}が定義されていないため、キャッシュはサポートされません",
                    model.getReference().getSimpleName(),
                    config.getTimestampColumn());
            return null;
        }
        if (timestamp.getType().getKind() != PropertyTypeKind.DATETIME) {
            LOG.warn("テーブル{}のカラム{}がDATETIMEでないため、キャッシュはサポートされません",
                    model.getReference().getSimpleName(),
                    config.getTimestampColumn());
            return null;
        }

        if (config.getDeleteFlagColumn() != null) {
            ModelProperty deleteFlag = properties.get(config.getDeleteFlagColumn());
            if (deleteFlag == null) {
                LOG.info("テーブル{}のカラム{}が定義されていないため、このテーブルに対する論理削除機能は無効化されます",
                        model.getReference().getSimpleName(),
                        config.getDeleteFlagColumn());
            } else if (acceptsLiteral(deleteFlag.getType(), config.getDeleteFlagValue()) == false) {
                LOG.warn("テーブル{}のカラム{}は指定した論理削除の値({})を利用できないため、キャッシュはサポートされません", new Object[] {
                        model.getReference().getSimpleName(),
                        config.getDeleteFlagColumn(),
                        config.getDeleteFlagValue(),
                });
View Full Code Here

                    AstBuilder.toName(property)));
        }

        List<AstSimpleName> grouping = Lists.create();
        for (Source source : group) {
            ModelProperty property = resolver.get(source.getName());
            assert property != null : source;
            grouping.add(AstBuilder.toName(property));
        }

        return new AstSummarize(
View Full Code Here

TOP

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

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.