BAEL-150 Introduction to DeltaSpike
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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 {
|
||||
|
||||
@Inject
|
||||
private QueryInvocationContext context;
|
||||
|
||||
@Override
|
||||
public JPAQuery jpaQuery() {
|
||||
return new JPAQuery(context.getEntityManager());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user