- All Implemented Interfaces:
ORMTemplate.Builder
Storm's integrations compose the engine builder first, handing it the connection and transaction strategies that bridge their platform, and wrap it here so the application-facing options and the customization callbacks apply on top of that composition.
- Since:
- 1.14
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the ORM template.config(StormConfig config) Sets the Storm configuration to apply to the template instance.decorator(UnaryOperator<TemplateDecorator> decorator) Sets a function that transforms theTemplateDecoratorto customize template processing.exceptionMapper(ExceptionMapper exceptionMapper) Sets the exception mapper that maps failures raised during query execution to the runtime exception thrown to the caller.Declares that the data source hands out connections with auto-commit disabled.queryObserver(QueryObserver queryObserver) Sets the query observer that is notified of query executions performed by the template.sqlCommenter(SqlCommenter sqlCommenter) Sets the SQL commenter that appends per-execution comment content to statements, such as the current trace context.
-
Constructor Details
-
BuilderImpl
public BuilderImpl(st.orm.core.template.ORMTemplate.Builder core)
-
-
Method Details
-
config
Description copied from interface:ORMTemplate.BuilderSets the Storm configuration to apply to the template instance.- Specified by:
configin interfaceORMTemplate.Builder- Parameters:
config- the Storm configuration; must not benull.- Returns:
- this builder.
-
decorator
Description copied from interface:ORMTemplate.BuilderSets a function that transforms theTemplateDecoratorto customize template processing.- Specified by:
decoratorin interfaceORMTemplate.Builder- Parameters:
decorator- the decorator function; must not benull.- Returns:
- this builder.
-
manualCommitConnections
Description copied from interface:ORMTemplate.BuilderDeclares that the data source hands out connections with auto-commit disabled.The declared mode is verified in both directions: a declared template that receives an auto-commit connection fails fast naming the misdeclaration, exactly like an undeclared template that receives a manual-commit one. With the declaration in place, the transactional path performs no auto-commit flips and releases connections in their arrived state; non-transactional connections get auto-commit enabled while Storm uses them and restored before release, so each statement still commits.
Cannot be combined with a custom connection provider and only valid for data source backed templates;
ORMTemplate.Builder.build()fails fast otherwise.- Specified by:
manualCommitConnectionsin interfaceORMTemplate.Builder- Returns:
- this builder.
-
exceptionMapper
Description copied from interface:ORMTemplate.BuilderSets the exception mapper that maps failures raised during query execution to the runtime exception thrown to the caller.- Specified by:
exceptionMapperin interfaceORMTemplate.Builder- Parameters:
exceptionMapper- the exception mapper; must not benull.- Returns:
- this builder.
-
queryObserver
Description copied from interface:ORMTemplate.BuilderSets the query observer that is notified of query executions performed by the template.- Specified by:
queryObserverin interfaceORMTemplate.Builder- Parameters:
queryObserver- the query observer; must not benull.- Returns:
- this builder.
-
sqlCommenter
Description copied from interface:ORMTemplate.BuilderSets the SQL commenter that appends per-execution comment content to statements, such as the current trace context. Note that per-execution content defeats prepared statement caching.- Specified by:
sqlCommenterin interfaceORMTemplate.Builder- Parameters:
sqlCommenter- the SQL commenter; must not benull.- Returns:
- this builder.
-
build
Description copied from interface:ORMTemplate.BuilderBuilds the ORM template.- Specified by:
buildin interfaceORMTemplate.Builder- Returns:
- the ORM template.
-