Skip to content

Commit

Permalink
add convenient factory method to QueryDsl (#1243)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamura-to authored Dec 22, 2024
2 parents c08a1a4 + 36646f6 commit 4e90559
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 4e90559

Please sign in to comment.