本文整理汇总了Java中org.lastaflute.db.dbflute.exception.ProvidedClassificationNotFoundException类的典型用法代码示例。如果您正苦于以下问题:Java ProvidedClassificationNotFoundException类的具体用法?Java ProvidedClassificationNotFoundException怎么用?Java ProvidedClassificationNotFoundException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ProvidedClassificationNotFoundException类属于org.lastaflute.db.dbflute.exception包,在下文中一共展示了ProvidedClassificationNotFoundException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: provide
import org.lastaflute.db.dbflute.exception.ProvidedClassificationNotFoundException; //导入依赖的package包/类
@Override
public ClassificationMeta provide(String classificationName) throws ProvidedClassificationNotFoundException {
final ClassificationMeta meta = resolveMeta(classificationName);
if (meta == null) {
handleClassificationNotFound(classificationName);
}
return meta;
}
示例2: resolveMeta
import org.lastaflute.db.dbflute.exception.ProvidedClassificationNotFoundException; //导入依赖的package包/类
protected ClassificationMeta resolveMeta(String classificationName) // returns null when not found
throws ProvidedClassificationNotFoundException { // and throws when project not found
final String projectDelimiter = getProjectDelimiter(); // dot means group delimiter so use other mark here
if (classificationName.contains(projectDelimiter)) { // e.g. sea-land: means land classification in sea project
final String projectName = Srl.substringFirstFront(classificationName, projectDelimiter);
final String pureName = Srl.substringFirstRear(classificationName, projectDelimiter);
return chooseClassificationFinder(projectName).apply(pureName);
} else { // e.g. sea: means sea classification
return getDefaultClassificationFinder().apply(classificationName);
}
}
示例3: chooseClassificationFinder
import org.lastaflute.db.dbflute.exception.ProvidedClassificationNotFoundException; //导入依赖的package包/类
@Override
protected Function<String, ClassificationMeta> chooseClassificationFinder(String projectName)
throws ProvidedClassificationNotFoundException {
if (DBCurrent.getInstance().projectName().equals(projectName)) {
return clsName -> onMainSchema(clsName).orElse(null); // null means not found
} else {
throw new ProvidedClassificationNotFoundException("Unknown DBFlute project name: " + projectName);
}
}
开发者ID:lastaflute,项目名称:lastaflute-example-harbor,代码行数:10,代码来源:HarborListedClassificationProvider.java
示例4: handleClassificationNotFound
import org.lastaflute.db.dbflute.exception.ProvidedClassificationNotFoundException; //导入依赖的package包/类
protected void handleClassificationNotFound(String classificationName) throws ProvidedClassificationNotFoundException {
throw new ProvidedClassificationNotFoundException("Not found the classification: " + classificationName);
}
示例5: chooseClassificationFinder
import org.lastaflute.db.dbflute.exception.ProvidedClassificationNotFoundException; //导入依赖的package包/类
/**
* Choose DB classification finder for the project. <br>
* (not contains application classification)
* <pre>
* e.g.
* protected Function<String, ClassificationMeta> chooseClassificationFinder(String projectName)
* throws ProvidedClassificationNotFoundException {
* if (DBCurrent.getInstance().projectName().equals(projectName)) {
* return clsName -> onMainSchema(clsName).orElse(null); // null means not found
* } else {
* throw new ProvidedClassificationNotFoundException("Unknown DBFlute project name: " + projectName);
* }
* }
* </pre>
* @param projectName The project name of DBFlute. (NotNull)
* @return The finder of classification as function "from classification name to null-allowed meta". (NotNull)
* @throws ProvidedClassificationNotFoundException When the project is not found.
*/
protected abstract Function<String, ClassificationMeta> chooseClassificationFinder(String projectName)
throws ProvidedClassificationNotFoundException;
示例6: provide
import org.lastaflute.db.dbflute.exception.ProvidedClassificationNotFoundException; //导入依赖的package包/类
ClassificationMeta provide(String classificationName) throws ProvidedClassificationNotFoundException;