diff --git a/doma-core/src/main/java/org/seasar/doma/jdbc/criteria/QueryDsl.java b/doma-core/src/main/java/org/seasar/doma/jdbc/criteria/QueryDsl.java index 577b9dde2..cd636f146 100644 --- a/doma-core/src/main/java/org/seasar/doma/jdbc/criteria/QueryDsl.java +++ b/doma-core/src/main/java/org/seasar/doma/jdbc/criteria/QueryDsl.java @@ -37,6 +37,18 @@ public QueryDsl(Config config) { this.config = Objects.requireNonNull(config); } + /** + * Creates an instance. + * + * @param provider the instance of {@link ConfigProvider} + * @return a new QueryDsl instance + * @throws org.seasar.doma.DomaIllegalArgumentException if {@code provider} is not {@link + * ConfigProvider} + */ + public static QueryDsl of(Object provider) { + return new QueryDsl(Config.get(provider)); + } + /** * Creates a WithQueryDsl. *