Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
dev.rafex.ether.jdbc.client.JdbcDatabaseClient Class Reference

Implementation of DatabaseClient using JDBC. More...

Inheritance diagram for dev.rafex.ether.jdbc.client.JdbcDatabaseClient:
Collaboration diagram for dev.rafex.ether.jdbc.client.JdbcDatabaseClient:

Public Member Functions

long[] batch (final String sql, final List< StatementBinder > binders)
 Executes a batch of SQL commands with the specified binders.
int execute (final SqlQuery query)
 Executes a SQL command (UPDATE, INSERT, DELETE) and returns the number of affected rows.
 JdbcDatabaseClient (final DataSource dataSource)
 Creates a new JdbcDatabaseClient with the specified data source.

Detailed Description

Implementation of DatabaseClient using JDBC.

This class delegates database operations to a DataSource and handles connection management, statement binding, and exception wrapping.

Definition at line 54 of file JdbcDatabaseClient.java.

Constructor & Destructor Documentation

◆ JdbcDatabaseClient()

dev.rafex.ether.jdbc.client.JdbcDatabaseClient.JdbcDatabaseClient ( final DataSource dataSource)

Creates a new JdbcDatabaseClient with the specified data source.

Parameters
dataSourcethe data source to use for database connections
Exceptions
NullPointerExceptionif dataSource is null

Definition at line 64 of file JdbcDatabaseClient.java.

Member Function Documentation

◆ batch()

long[] dev.rafex.ether.jdbc.client.JdbcDatabaseClient.batch ( final String sql,
final List< StatementBinder > binders )

Executes a batch of SQL commands with the specified binders.

Parameters
sqlthe SQL command to execute
bindersthe list of statement binders
Returns
an array of update counts for each batch command
Exceptions
DatabaseAccessExceptionif the batch execution fails

Implements dev.rafex.ether.database.core.DatabaseClient.

Definition at line 161 of file JdbcDatabaseClient.java.

◆ execute()

int dev.rafex.ether.jdbc.client.JdbcDatabaseClient.execute ( final SqlQuery query)

Executes a SQL command (UPDATE, INSERT, DELETE) and returns the number of affected rows.

Parameters
querythe SQL command to execute
Returns
the number of rows affected
Exceptions
DatabaseAccessExceptionif the execution fails

Implements dev.rafex.ether.database.core.DatabaseClient.

Definition at line 141 of file JdbcDatabaseClient.java.


The documentation for this class was generated from the following file: