Module storm

Class JpaTemplateImpl

java.lang.Object
st.orm.template.impl.JpaTemplateImpl
All Implemented Interfaces:
QueryFactory, JpaTemplate

public final class JpaTemplateImpl extends Object implements JpaTemplate, QueryFactory
JpaTemplateImpl relies on preview features of the Java platform:
Programs can only use JpaTemplateImpl when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
  • Constructor Details

    • JpaTemplateImpl

      public JpaTemplateImpl(@Nonnull jakarta.persistence.EntityManager entityManager)
  • Method Details

    • query

      public jakarta.persistence.Query query(@Nonnull StringTemplatePREVIEW template)
      Creates a query for the specified query template.
      Specified by:
      query in interface JpaTemplate
      Parameters:
      template - the query template.
      Returns:
      the query.
    • createBindVars

      public BindVars createBindVars()
      Create a new bind variables instance that can be used to add bind variables to a batch.
      Specified by:
      createBindVars in interface QueryFactory
      Returns:
      a new bind variables instance.
    • create

      public Query create(@Nonnull StringTemplatePREVIEW template)
      Description copied from interface: QueryFactory
      Create a new query for the specified template.
      Specified by:
      create in interface QueryFactory
      Parameters:
      template - the template to process.
      Returns:
      a query that can be executed.
    • toORM

      public ORMTemplate toORM()
      Returns an ORM template for this JPA template.
      Specified by:
      toORM in interface JpaTemplate
    • withTableNameResolver

      public JpaTemplate withTableNameResolver(@Nullable TableNameResolver tableNameResolver)
      Returns a new JPA template with the specified table name resolver.
      Specified by:
      withTableNameResolver in interface JpaTemplate
      Parameters:
      tableNameResolver - the table name resolver.
      Returns:
      a new JPA template.
    • withColumnNameResolver

      public JpaTemplate withColumnNameResolver(@Nullable ColumnNameResolver columnNameResolver)
      Returns a new jpa statement template with the specified column name resolver.
      Specified by:
      withColumnNameResolver in interface JpaTemplate
      Parameters:
      columnNameResolver - the column name resolver.
      Returns:
      a new jpa statement template.
    • withForeignKeyResolver

      public JpaTemplate withForeignKeyResolver(@Nullable ForeignKeyResolver foreignKeyResolver)
      Returns a new jpa statement template with the specified foreign key resolver.
      Specified by:
      withForeignKeyResolver in interface JpaTemplate
      Parameters:
      foreignKeyResolver - the foreign key resolver.
      Returns:
      a new jpa statement template.
    • withTableAliasResolver

      public JpaTemplate withTableAliasResolver(@Nonnull TableAliasResolver tableAliasResolver)
      Returns a new JPA template with the specified table alias resolver.
      Specified by:
      withTableAliasResolver in interface JpaTemplate
      Parameters:
      tableAliasResolver - the table alias resolver.
      Returns:
      a new JPA template.
    • withProviderFilter

      public JpaTemplate withProviderFilter(@Nullable Predicate<Provider> providerFilter)
      Returns a new jpa statement template with the specified provider filter.
      Specified by:
      withProviderFilter in interface JpaTemplate
      Parameters:
      providerFilter - the provider filter.
      Returns:
      a new jpa statement template.