当前位置: 首页>>代码示例>>Java>>正文


Java DBMetaNotFoundException类代码示例

本文整理汇总了Java中org.dbflute.exception.DBMetaNotFoundException的典型用法代码示例。如果您正苦于以下问题:Java DBMetaNotFoundException类的具体用法?Java DBMetaNotFoundException怎么用?Java DBMetaNotFoundException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DBMetaNotFoundException类属于org.dbflute.exception包,在下文中一共展示了DBMetaNotFoundException类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getConditionValue

import org.dbflute.exception.DBMetaNotFoundException; //导入依赖的package包/类
private ConditionValue getConditionValue(Object item, String column) {
    try {
        if (item instanceof ConditionBean) {
            return getValue(((ConditionBean) item).localCQ(), column);
        } else if (item instanceof ConditionQuery) {
            return getValue((ConditionQuery) item, column);
        } else {
            throw new IllegalArgumentException("Not a valid argument: " + item);
        }
    } catch (DBMetaNotFoundException e) {
        throw new IllegalArgumentException("Column '" + column + "' does not exist.", e);
    }
}
 
开发者ID:taktos,项目名称:dbflute-hamcrest,代码行数:14,代码来源:HasCondition.java

示例2: matches

import org.dbflute.exception.DBMetaNotFoundException; //导入依赖的package包/类
@Override
public boolean matches(Object item) {
    if (item == null || !(item instanceof ConditionBean)) {
        return false;
    }
    String[] tables = table.split("\\.");
    ConditionQuery cq;
    try {
        cq = getCQ(((ConditionBean) item).localCQ(), tables);
    } catch (DBMetaNotFoundException e) {
        throw new IllegalArgumentException("No relation table '" + table + "' found.", e);
    }
    return subsequent.matches(cq);
}
 
开发者ID:taktos,项目名称:dbflute-hamcrest,代码行数:15,代码来源:HasRelation.java

示例3: findForeignInfo

import org.dbflute.exception.DBMetaNotFoundException; //导入依赖的package包/类
private ForeignInfo findForeignInfo(DBMeta meta, String foreignTable) {
    try {
        return meta.findForeignInfo(foreignTable);
    } catch (DBMetaNotFoundException e) {
        try {
            return meta.findForeignInfo(foreignTable + "AsOne");
        } catch (DBMetaNotFoundException ne) {
            throw new IllegalArgumentException("Table '" + foreignTable + "' does not exist");
        }
    }
}
 
开发者ID:taktos,项目名称:dbflute-hamcrest,代码行数:12,代码来源:ShouldSelect.java

示例4: findDBMeta

import org.dbflute.exception.DBMetaNotFoundException; //导入依赖的package包/类
/**
 * Find DB meta by table flexible name. (accept quoted name and schema prefix)
 * @param tableFlexibleName The flexible name of table. (NotNull)
 * @return The instance of DB meta. (NotNull)
 * @throws org.dbflute.exception.DBMetaNotFoundException When the DB meta is not found.
 */
public static DBMeta findDBMeta(String tableFlexibleName) {
    DBMeta dbmeta = byTableFlexibleName(tableFlexibleName);
    if (dbmeta == null) {
        String msg = "The DB meta was not found by the table flexible name: key=" + tableFlexibleName;
        throw new DBMetaNotFoundException(msg);
    }
    return dbmeta;
}
 
开发者ID:lastaflute,项目名称:lastaflute-example-harbor,代码行数:15,代码来源:DBMetaInstanceHandler.java


注:本文中的org.dbflute.exception.DBMetaNotFoundException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。