Interface ProxyFactory
public interface ProxyFactory
Defines factory methods to create proxy of SPI classes.
- Author:
- Tadaya Tsuyukubo
-
Method Summary
Modifier and TypeMethodDescriptionwrapBatch(Batch batch, ConnectionInfo connectionInfo) Create a proxyBatch.wrapConnection(Connection connection, ConnectionInfo connectionInfo) Create a proxyConnection.wrapConnectionFactory(ConnectionFactory connectionFactory) Create a proxyConnectionFactory.wrapResult(Result result, QueryExecutionInfo executionInfo, QueriesExecutionContext queriesExecutionContext) Create a proxyResult.wrapRow(Row row, QueryExecutionInfo executionInfo) Create a proxyRow.wrapRowSegment(Result.RowSegment rowSegment, QueryExecutionInfo executionInfo) Create a proxyResult.RowSegment.wrapStatement(Statement statement, StatementInfo statementInfo, ConnectionInfo connectionInfo) Create a proxyStatement.
-
Method Details
-
wrapConnectionFactory
Create a proxyConnectionFactory.- Parameters:
connectionFactory- original connectionFactory- Returns:
- proxy connectionFactory
- Throws:
IllegalArgumentException- ifconnectionFactoryisnull
-
wrapConnection
Create a proxyConnection.- Parameters:
connection- original connectionconnectionInfo- connectionInfo- Returns:
- proxy connection
- Throws:
IllegalArgumentException- ifconnectionisnullIllegalArgumentException- ifconnectionInfoisnull
-
wrapBatch
Create a proxyBatch.- Parameters:
batch- original batchconnectionInfo- connectionInfo- Returns:
- proxy batch
- Throws:
IllegalArgumentException- ifbatchisnullIllegalArgumentException- ifconnectionInfoisnull
-
wrapStatement
Statement wrapStatement(Statement statement, StatementInfo statementInfo, ConnectionInfo connectionInfo) Create a proxyStatement.- Parameters:
statement- original statementstatementInfo- contextual information of creating theStatementconnectionInfo- connectionInfo- Returns:
- proxy statement
- Throws:
IllegalArgumentException- ifstatementisnullIllegalArgumentException- iforiginalQueryisnullIllegalArgumentException- ifupdatedQueryisnullIllegalArgumentException- ifconnectionInfoisnull
-
wrapResult
Result wrapResult(Result result, QueryExecutionInfo executionInfo, QueriesExecutionContext queriesExecutionContext) Create a proxyResult.- Parameters:
result- original resultexecutionInfo- executionInfoqueriesExecutionContext- queries execution context- Returns:
- proxy result
- Throws:
IllegalArgumentException- ifresultisnullIllegalArgumentException- ifexecutionInfoisnullIllegalArgumentException- ifqueriesExecutionContextisnull
-
wrapRow
Create a proxyRow.- Parameters:
row- original rowexecutionInfo- executionInfo- Returns:
- proxy row
- Throws:
IllegalArgumentException- ifrowisnullIllegalArgumentException- ifexecutionInfoisnull
-
wrapRowSegment
Create a proxyResult.RowSegment.- Parameters:
rowSegment- original rowSegmentexecutionInfo- executionInfo- Returns:
- proxy rowSegment
- Throws:
IllegalArgumentException- ifrowSegmentisnullIllegalArgumentException- ifexecutionInfoisnull- Since:
- 1.1.3
-