Class HibernateOrmDevJsonRpcService
java.lang.Object
io.quarkus.hibernate.orm.runtime.dev.HibernateOrmDevJsonRpcService
-
Constructor Details
-
HibernateOrmDevJsonRpcService
public HibernateOrmDevJsonRpcService()
-
-
Method Details
-
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 arbitraryhql
query in the givenpersistence 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 theJsonRpcRouter
.- Parameters:
persistenceUnit
- The name of the persistence unit within which the query will be executedhql
- The Hibernate Query Language (HQL) statement to executepageNumber
- The page number, used for selection query results paginationpageSize
- The page size, used for selection query results pagination- Returns:
- a
JsonRpcMessage<String>
containing the resultingHibernateOrmDevJsonRpcService.DataSet
serialized to JSON.
-