Interface SqmCreationContext

All Superinterfaces:
BindingContext
All Known Subinterfaces:
NodeBuilder
All Known Implementing Classes:
SqmCriteriaNodeBuilder

@Incubating public interface SqmCreationContext extends BindingContext
The context in which all SQM creations occur.

Since we need to be able to parse and type check queries completely outside the usual lifecycle of a Hibernate SessionFactory, it's extremely important that code which builds SQM trees does not access the factory or other services or object not exposed by this context object.

  • Method Details

    • getQueryEngine

      QueryEngine getQueryEngine()
    • getNodeBuilder

      default NodeBuilder getNodeBuilder()
    • classForName

      default Class<?> classForName(String className)
      Obtain a Java class object with the given fully-qualified name. This method may only be used for unmanaged types, for example, for select new, or for references to static final constants or to enum values.
      API Note:
      Avoid calling this method, since Class objects are not available to the query validator in Hibernate Processor at compilation time. If you must call it, be prepared to robustly handle the case in which the class is not present, in which case this method might return something arbitrary like Object[].class.
    • getMappingMetamodel

      default MappingMetamodel getMappingMetamodel()
      Specified by:
      getMappingMetamodel in interface BindingContext
    • getJpaMetamodel

      default JpaMetamodel getJpaMetamodel()
      Specified by:
      getJpaMetamodel in interface BindingContext