Class HibernateOrmDevJsonRpcService

java.lang.Object
io.quarkus.hibernate.orm.runtime.dev.HibernateOrmDevJsonRpcService

public class HibernateOrmDevJsonRpcService extends Object
  • Constructor Details

    • HibernateOrmDevJsonRpcService

      public HibernateOrmDevJsonRpcService()
  • Method Details

    • getInfo

      public HibernateOrmDevInfo getInfo()
    • getNumberOfPersistenceUnits

      public int getNumberOfPersistenceUnits()
    • getNumberOfEntityTypes

      public int getNumberOfEntityTypes()
    • getNumberOfNamedQueries

      public int getNumberOfNamedQueries()
    • executeHQL

      public JsonRpcMessage<Object> executeHQL(String persistenceUnit, String hql, Integer pageNumber, Integer pageSize)
      Execute an arbitrary hql query in the given persistence unit. The query might be both a selection or a mutation statement. For selection queries, the result count is retrieved though a count query and the results, paginated based on pageNumber and pageSize are returned. For mutation statements, a custom message including the number of affected records is returned.

      This method handles result serialization (to JSON) internally, and returns a JsonRpcMessage<String> to avoid further processing by the JsonRpcRouter.

      Parameters:
      persistenceUnit - The name of the persistence unit within which the query will be executed
      hql - The Hibernate Query Language (HQL) statement to execute
      pageNumber - The page number, used for selection query results pagination
      pageSize - The page size, used for selection query results pagination
      Returns:
      a JsonRpcMessage<String> containing the resulting HibernateOrmDevJsonRpcService.DataSet serialized to JSON.