java.lang.Object
st.orm.template.impl.JpaTemplateImpl
- All Implemented Interfaces:
QueryFactory,JpaTemplate
JpaTemplateImpl relies on preview features of the Java platform:
JpaTemplateImplrefers to one or more preview APIs:StringTemplate.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(StringTemplatePREVIEW template) Create a new query for the specifiedtemplate.Create a new bind variables instance that can be used to add bind variables to a batch.jakarta.persistence.Queryquery(StringTemplatePREVIEW template) Creates a query for the specified querytemplate.toORM()Returns an ORM template for this JPA template.withColumnNameResolver(ColumnNameResolver columnNameResolver) Returns a new jpa statement template with the specified column name resolver.withForeignKeyResolver(ForeignKeyResolver foreignKeyResolver) Returns a new jpa statement template with the specified foreign key resolver.withProviderFilter(Predicate<Provider> providerFilter) Returns a new jpa statement template with the specified provider filter.withTableAliasResolver(TableAliasResolver tableAliasResolver) Returns a new JPA template with the specified table alias resolver.withTableNameResolver(TableNameResolver tableNameResolver) Returns a new JPA template with the specified table name resolver.
-
Constructor Details
-
JpaTemplateImpl
public JpaTemplateImpl(@Nonnull jakarta.persistence.EntityManager entityManager)
-
-
Method Details
-
query
Creates a query for the specified querytemplate.- Specified by:
queryin interfaceJpaTemplate- Parameters:
template- the query template.- Returns:
- the query.
-
createBindVars
Create a new bind variables instance that can be used to add bind variables to a batch.- Specified by:
createBindVarsin interfaceQueryFactory- Returns:
- a new bind variables instance.
-
create
Description copied from interface:QueryFactoryCreate a new query for the specifiedtemplate.- Specified by:
createin interfaceQueryFactory- Parameters:
template- the template to process.- Returns:
- a query that can be executed.
-
toORM
Returns an ORM template for this JPA template.- Specified by:
toORMin interfaceJpaTemplate
-
withTableNameResolver
Returns a new JPA template with the specified table name resolver.- Specified by:
withTableNameResolverin interfaceJpaTemplate- Parameters:
tableNameResolver- the table name resolver.- Returns:
- a new JPA template.
-
withColumnNameResolver
Returns a new jpa statement template with the specified column name resolver.- Specified by:
withColumnNameResolverin interfaceJpaTemplate- Parameters:
columnNameResolver- the column name resolver.- Returns:
- a new jpa statement template.
-
withForeignKeyResolver
Returns a new jpa statement template with the specified foreign key resolver.- Specified by:
withForeignKeyResolverin interfaceJpaTemplate- Parameters:
foreignKeyResolver- the foreign key resolver.- Returns:
- a new jpa statement template.
-
withTableAliasResolver
Returns a new JPA template with the specified table alias resolver.- Specified by:
withTableAliasResolverin interfaceJpaTemplate- Parameters:
tableAliasResolver- the table alias resolver.- Returns:
- a new JPA template.
-
withProviderFilter
Returns a new jpa statement template with the specified provider filter.- Specified by:
withProviderFilterin interfaceJpaTemplate- Parameters:
providerFilter- the provider filter.- Returns:
- a new jpa statement template.
-
JpaTemplateImplwhen preview features are enabled.