- All Known Implementing Classes:
JpaTemplateImpl,PreparedStatementTemplateImpl
public interface QueryFactory
QueryFactory relies on preview features of the Java platform:
QueryFactoryrefers 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.
Factory for creating queries.
-
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.
-
Method Details
-
createBindVars
BindVars createBindVars()Create a new bind variables instance that can be used to add bind variables to a batch.- Returns:
- a new bind variables instance.
-
create
Create a new query for the specifiedtemplate.- Parameters:
template- the template to process.- Returns:
- a query that can be executed.
- Throws:
PersistenceException- if the template is invalid.
-
QueryFactorywhen preview features are enabled.