Top Description Fields Constructors Methods
org.jooq.tools.jdbc

public Class MockExecuteContext

extends Object
Class Inheritance
Imports
java.sql.Statement, org.jooq.DSLContext, .Query

A mock execution context.

This context is passed to MockDataProvider#execute(MockExecuteContext), as a context object containing all relevant information about a given query execution.

Author
Lukas Eder
See Also
MockDataProvider

Field Summary

Modifier and TypeField and Description
private final int
private final Object[][]
private final int[]
private final String[]
private final int[]
private final String[]

Constructor Summary

AccessConstructor and Description
public
MockExecuteContext(String[]
The SQL statement(s)
sql
,
Object[][]
The bind variable(s)
bindings
)

Create a new mock execution context.

public
MockExecuteContext(String[]
The SQL statement(s)
sql
,
Object[][]
The bind variable(s)
bindings
,
int
The corresponding value from MockStatement
autoGeneratedKeys
)

Create a new mock execution context.

public
MockExecuteContext(String[]
The SQL statement(s)
sql
,
Object[][]
The bind variable(s)
bindings
,
int[]
The corresponding value from MockStatement
columnIndexes
)

Create a new mock execution context.

public
MockExecuteContext(String[]
The SQL statement(s)
sql
,
Object[][]
The bind variable(s)
bindings
,
String[]
The corresponding value from MockStatement
columnNames
)

Create a new mock execution context.

pack-priv
MockExecuteContext(String[] sql, Object[][] bindings, int autoGeneratedKeys, int[] columnIndexes, String[] columnNames, int[] outParameterTypes)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The corresponding value from MockStatement.
autoGeneratedKeys
()

The corresponding value from MockStatement.

public boolean

Returns:

Whether this execution context is a from a batch statement.
batch
()

Whether this execution context is a from a batch statement.

public Object[][]

Returns:

All bind variables of a "single batch" statment, or an array of length 1 with the bind variables of a single statement.
batchBindings
()

Get all bind variables of a "single batch" statement.

public boolean

Returns:

Whether this execution context is from a "multi batch" statement.
batchMultiple
()

Whether this execution context is from a "multi batch" statement.

public boolean

Returns:

Whether this execution context is from a "single batch" statement.
batchSingle
()

Whether this execution context is from a "single batch" statement.

public String[]

Returns:

All batch SQL statements of a "multi batch" statement, or an array of length 1 with the single statement.
batchSQL
()

Get all batch SQL statements of a "multi batch" statement.

public Object[]

Returns:

The single (or first "single batch") set of bind variables.
bindings
()

Get the single (or first "single batch") set of bind variables.

public int[]

Returns:

The corresponding value from MockStatement.
columnIndexes
()

The corresponding value from MockStatement.

public String[]

Returns:

The corresponding value from MockStatement.
columnNames
()

The corresponding value from MockStatement.

public int[]

Returns:

the types of registered out parameters, if any.
outParameterTypes
()

Get the types of registered out parameters, if any.

public String

Returns:

The single (or first "multi batch") SQL statement.
sql
()

Get the single (or first "multi batch") SQL statement.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

autoGeneratedKeysback to summary
private final int autoGeneratedKeys
bindingsback to summary
private final Object[][] bindings
columnIndexesback to summary
private final int[] columnIndexes
columnNamesback to summary
private final String[] columnNames
outParameterTypesback to summary
private final int[] outParameterTypes
sqlback to summary
private final String[] sql

Constructor Detail

MockExecuteContextback to summary
public MockExecuteContext(String[] sql, Object[][] bindings)

Create a new mock execution context.

Parameters
sql:String[]

The SQL statement(s)

bindings:Object[][]

The bind variable(s)

MockExecuteContextback to summary
public MockExecuteContext(String[] sql, Object[][] bindings, int autoGeneratedKeys)

Create a new mock execution context.

Parameters
sql:String[]

The SQL statement(s)

bindings:Object[][]

The bind variable(s)

autoGeneratedKeys:int

The corresponding value from MockStatement

MockExecuteContextback to summary
public MockExecuteContext(String[] sql, Object[][] bindings, int[] columnIndexes)

Create a new mock execution context.

Parameters
sql:String[]

The SQL statement(s)

bindings:Object[][]

The bind variable(s)

columnIndexes:int[]

The corresponding value from MockStatement

MockExecuteContextback to summary
public MockExecuteContext(String[] sql, Object[][] bindings, String[] columnNames)

Create a new mock execution context.

Parameters
sql:String[]

The SQL statement(s)

bindings:Object[][]

The bind variable(s)

columnNames:String[]

The corresponding value from MockStatement

MockExecuteContextback to summary
pack-priv MockExecuteContext(String[] sql, Object[][] bindings, int autoGeneratedKeys, int[] columnIndexes, String[] columnNames, int[] outParameterTypes)

Method Detail

autoGeneratedKeysback to summary
public int autoGeneratedKeys()

The corresponding value from MockStatement.

Returns:int

The corresponding value from MockStatement.

batchback to summary
public boolean batch()

Whether this execution context is a from a batch statement.

Returns:boolean

Whether this execution context is a from a batch statement.

batchBindingsback to summary
public Object[][] batchBindings()

Get all bind variables of a "single batch" statement.

Returns:Object[][]

All bind variables of a "single batch" statment, or an array of length 1 with the bind variables of a single statement.

batchMultipleback to summary
public boolean batchMultiple()

Whether this execution context is from a "multi batch" statement.

Returns:boolean

Whether this execution context is from a "multi batch" statement.

See Also
DSLContext#batch(Query...)
batchSingleback to summary
public boolean batchSingle()

Whether this execution context is from a "single batch" statement.

Returns:boolean

Whether this execution context is from a "single batch" statement.

See Also
DSLContext#batch(Query)
batchSQLback to summary
public String[] batchSQL()

Get all batch SQL statements of a "multi batch" statement.

Returns:String[]

All batch SQL statements of a "multi batch" statement, or an array of length 1 with the single statement.

bindingsback to summary
public Object[] bindings()

Get the single (or first "single batch") set of bind variables.

Returns:Object[]

The single (or first "single batch") set of bind variables.

columnIndexesback to summary
public int[] columnIndexes()

The corresponding value from MockStatement.

Returns:int[]

The corresponding value from MockStatement.

columnNamesback to summary
public String[] columnNames()

The corresponding value from MockStatement.

Returns:String[]

The corresponding value from MockStatement.

outParameterTypesback to summary
public int[] outParameterTypes()

Get the types of registered out parameters, if any.

Returns:int[]

the types of registered out parameters, if any.

sqlback to summary
public String sql()

Get the single (or first "multi batch") SQL statement.

Returns:String

The single (or first "multi batch") SQL statement.