OctaviusTemplate

class OctaviusTemplate(dataSource: DataSource, val exceptionTranslator: SQLExceptionTranslator = OctaviusExceptionTranslator())

Template class that simplifies executing Octavius operations and provides proper integration with Spring's transaction management and exception translation mechanism.

Constructors

Link copied to clipboard
constructor(dataSource: DataSource, exceptionTranslator: SQLExceptionTranslator = OctaviusExceptionTranslator())

Properties

Link copied to clipboard
val exceptionTranslator: SQLExceptionTranslator

the translator used to convert SQLExceptions into Spring's DataAccessException hierarchy

Functions

Link copied to clipboard
fun <T> execute(action: OctaviusSessionOperations.() -> T): T

Executes the given action within an OctaviusSession, translating any exceptions thrown. The session is passed as the receiver of action, so its operations are available directly. Connection management and transaction synchronization are handled automatically.