Class CriteriaQueryCompiler

java.lang.Object
ch.tocco.nice2.persist.core.spi.entity.query.ql.AbstractQueryCompiler
ch.tocco.nice2.persist.core.impl.hibernate.pojo.CriteriaQueryCompiler
All Implemented Interfaces:
QueryCompiler

@Component public class CriteriaQueryCompiler extends AbstractQueryCompiler
Compiles Nice2 Node trees into Queries backed by JPA Criteria.
  • Constructor Details

  • Method Details

    • compile

      public Query compile(Context ctx, String queryString) throws PersistException
      Description copied from interface: QueryCompiler
      Compile a query string to an executable query.
      Parameters:
      ctx - The context to compile the query for.
      queryString - The query string.
      Returns:
      The compiled executable query.
      Throws:
      PersistException - If an error occurs.
    • compile

      public Query compile(Context ctx, FuncallNode tree) throws PersistException
      Description copied from interface: QueryCompiler
      Compile a query AST to an executable query.
      Parameters:
      ctx - The context to compile the query for.
      tree - The root of the tree.
      Returns:
      The compiled executable query.
      Throws:
      PersistException - If an error occurs.