2016-07-31 12:06:17 +02:00
|
|
|
package baeldung.data;
|
|
|
|
|
|
|
|
|
|
import com.mysema.query.jpa.impl.JPAQuery;
|
|
|
|
|
import org.apache.deltaspike.data.spi.DelegateQueryHandler;
|
|
|
|
|
import org.apache.deltaspike.data.spi.QueryInvocationContext;
|
|
|
|
|
|
|
|
|
|
import javax.inject.Inject;
|
|
|
|
|
|
|
|
|
|
public class QueryDslRepositoryExtension<E> implements QueryDslSupport, DelegateQueryHandler {
|
|
|
|
|
|
2018-06-16 18:12:35 +02:00
|
|
|
@Inject private QueryInvocationContext context;
|
2016-07-31 12:06:17 +02:00
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JPAQuery jpaQuery() {
|
|
|
|
|
return new JPAQuery(context.getEntityManager());
|
|
|
|
|
}
|
|
|
|
|
}
|