Class QueryImplementor

java.lang.Object
io.quarkus.rest.data.panache.deployment.utils.QueryImplementor

public final class QueryImplementor extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.quarkus.gizmo.ResultHandle
    getDataParams(io.quarkus.gizmo.BytecodeCreator creator, Map<String,io.quarkus.gizmo.ResultHandle> fieldValues)
     
    io.quarkus.gizmo.AssignableResultHandle
    getQuery(io.quarkus.gizmo.BytecodeCreator creator, io.quarkus.gizmo.ResultHandle namedQuery, Map<String,io.quarkus.gizmo.ResultHandle> fieldValues)
    Returns the name of the query or if it is not defined, then it will return a query built by the search parameters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QueryImplementor

      public QueryImplementor()
  • Method Details

    • getQuery

      public io.quarkus.gizmo.AssignableResultHandle getQuery(io.quarkus.gizmo.BytecodeCreator creator, io.quarkus.gizmo.ResultHandle namedQuery, Map<String,io.quarkus.gizmo.ResultHandle> fieldValues)
      Returns the name of the query or if it is not defined, then it will return a query built by the search parameters.
       
       String query;
       if (namedQuery != null) {
           query = "#" + namedQuery;
       } else {
           query = String.join(" AND ", queryList);
       }
       
       
      Parameters:
      creator - a bytecode creator to be used for code generation.
      namedQuery - HQL query to list entities.
      fieldValues - fields query params.
      Returns:
      query.
    • getDataParams

      public io.quarkus.gizmo.ResultHandle getDataParams(io.quarkus.gizmo.BytecodeCreator creator, Map<String,io.quarkus.gizmo.ResultHandle> fieldValues)