本文整理汇总了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);
}
}
示例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);
}
示例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");
}
}
}
示例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;
}