use of org.dbflute.dbmeta.DBMetaProvider in project dbflute-core by dbflute.
the class ResourceContext method provideDBMetaChecked.
/**
* @param tableFlexibleName The flexible name of table. (NotNull)
* @return The instance of DB meta. (NotNull)
*/
public static DBMeta provideDBMetaChecked(String tableFlexibleName) {
assertResourceContextExists();
final ResourceContext context = getResourceContextOnThread();
final DBMetaProvider provider = context.getDBMetaProvider();
if (provider == null) {
String msg = "The provider of DB meta should exist:";
msg = msg + " tableFlexibleName=" + tableFlexibleName + " context=" + context;
throw new IllegalStateException(msg);
}
return provider.provideDBMetaChecked(tableFlexibleName);
}
use of org.dbflute.dbmeta.DBMetaProvider in project dbflute-core by dbflute.
the class AbstractOutsideSqlCommand method createOutsideSqlContext.
// ===================================================================================
// OutsideSql Element
// ==================
protected OutsideSqlContext createOutsideSqlContext() {
final DBMetaProvider dbmetaProvider = ResourceContext.dbmetaProvider();
final String outsideSqlPackage = ResourceContext.getOutsideSqlPackage();
final OutsideSqlContext context = _outsideSqlContextFactory.createContext(dbmetaProvider, outsideSqlPackage);
setupOutsideSqlContextProperty(context);
context.setupBehaviorQueryPathIfNeeds();
return context;
}
use of org.dbflute.dbmeta.DBMetaProvider in project dbflute-core by dbflute.
the class ResourceContext method provideDBMetaChecked.
/**
* @param entityType The entity type of table. (NotNull)
* @return The instance of DB meta. (NotNull)
*/
public static DBMeta provideDBMetaChecked(Class<?> entityType) {
assertResourceContextExists();
final ResourceContext context = getResourceContextOnThread();
final DBMetaProvider provider = context.getDBMetaProvider();
if (provider == null) {
String msg = "The provider of DB meta should exist:";
msg = msg + " entityType=" + entityType + " context=" + context;
throw new IllegalStateException(msg);
}
return provider.provideDBMetaChecked(entityType);
}
use of org.dbflute.dbmeta.DBMetaProvider in project dbflute-core by dbflute.
the class ResourceContext method dbmetaProvider.
/**
* @return The provider of DB meta. (NotNull)
*/
public static DBMetaProvider dbmetaProvider() {
assertResourceContextExists();
final ResourceContext context = getResourceContextOnThread();
final DBMetaProvider provider = context.getDBMetaProvider();
if (provider == null) {
String msg = "The provider of DB meta should exist: context=" + context;
throw new IllegalStateException(msg);
}
return provider;
}
Aggregations