Merge pull request #1475 from lpandzic/issue#1474

exposed varargs methods in JPQLQueryFactory
This commit is contained in:
John Tims 2015-08-27 21:39:26 -04:00
commit fa317643f7
3 changed files with 18 additions and 0 deletions

View File

@ -101,6 +101,14 @@ public interface JPQLQueryFactory extends QueryFactory<JPQLQuery<?>> {
*/
JPQLQuery<?> from(EntityPath<?> from);
/**
* Create a new Query with the given source
*
* @param from from
* @return from(from)
*/
JPQLQuery<?> from(EntityPath<?>... from);
/**
* Create a new UPDATE clause
*

View File

@ -105,6 +105,11 @@ public class HibernateQueryFactory implements JPQLQueryFactory {
return query().from(from);
}
@Override
public HibernateQuery<?> from(EntityPath<?>... from) {
return query().from(from);
}
@Override
public HibernateUpdateClause update(EntityPath<?> path) {
return new HibernateUpdateClause(session.get(), path, templates);

View File

@ -116,6 +116,11 @@ public class JPAQueryFactory implements JPQLQueryFactory {
return query().from(from);
}
@Override
public JPAQuery<?> from(EntityPath<?>... from) {
return query().from(from);
}
@Override
public JPAUpdateClause update(EntityPath<?> path) {
if (templates != null) {