Package com.asakusafw.vocabulary.model

Examples of com.asakusafw.vocabulary.model.TableModel


    static String getTableName(Class<?> modelType) {
        OriginalName original = modelType.getAnnotation(OriginalName.class);
        if (original != null) {
            return original.value();
        }
        TableModel meta = modelType.getAnnotation(TableModel.class);
        if (meta != null) {
            return meta.name();
        }

        StackTraceElement caller = getCaller();
        throw new UnsupportedOperationException(MessageFormat.format(
                "クラス{0}には@{1}の指定がないため、テーブル名を自動的に判別できませんでした。{2}()をオーバーライドして明示的に指定して下さい",
View Full Code Here


    static List<String> getColumnNames(Class<?> modelType) {
        ColumnOrder original = modelType.getAnnotation(ColumnOrder.class);
        if (original != null) {
            return new ArrayList<String>(Arrays.asList(original.value()));
        }
        TableModel meta = modelType.getAnnotation(TableModel.class);
        if (meta != null) {
            return Arrays.asList(meta.columns());
        }

        StackTraceElement caller = getCaller();
        throw new UnsupportedOperationException(MessageFormat.format(
                "クラス{0}には@{1}の指定がないため、カラム名を自動的に判別できませんでした。{2}()をオーバーライドして明示的に指定して下さい",
View Full Code Here

    static List<String> getPrimaryKeyNames(Class<?> modelType) {
        PrimaryKey original = modelType.getAnnotation(PrimaryKey.class);
        if (original != null) {
            return new ArrayList<String>(Arrays.asList(original.value()));
        }
        TableModel meta = modelType.getAnnotation(TableModel.class);
        if (meta != null) {
            return Arrays.asList(meta.primary());
        }

        StackTraceElement caller = getCaller();
        throw new UnsupportedOperationException(MessageFormat.format(
                "クラス{0}には@{1}の指定がないため、主キー名を自動的に判別できませんでした。{2}()をオーバーライドして明示的に指定して下さい",
View Full Code Here

TOP

Related Classes of com.asakusafw.vocabulary.model.TableModel

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.