Method Signatures

There are 8 (eight) separate method signatures for each generated finder, and 4 (four) for deleters, inserters,updaters and questions.

FINDERS

// connection, params..., limit, offset - throw exception
public static <ReturnType> <methodNameofBaseSqlObject>(Connection connection, Type parameterValueOne, Type parameterValueTwo, [ additional parameters ...], Integer limit, Integer offset) throws H2ZeroFinderException, SQLException 

// connection, params... - throw exception
public static <ReturnType> <methodNameofBaseSqlObject>(Connection connection, Type parameterValueOne, Type parameterValueTwo, [ additional parameters ...]) throws H2ZeroFinderException, SQLException 

// params..., limit, offset - throw exception
public static <ReturnType> <methodNameofBaseSqlObject>(Type parameterValueOne, Type parameterValueTwo, [ additional parameters ...], Integer limit, Integer offset) throws H2ZeroFinderException, SQLException 

// params... - throw exception
public static <ReturnType> <methodNameofBaseSqlObject>(Type parameterValueOne, Type parameterValueTwo, [ additional parameters ...]) throws H2ZeroFinderException, SQLException 

// connection, params..., limit, offset - silently swallow exceptions and log them
public static <ReturnType> <methodNameofBaseSqlObject>Silent(Connection connection, Type parameterValueOne, Type parameterValueTwo, [ additional parameters ...], Integer limit, Integer offset) 

// connection, params... - silently swallow exceptions and log them
public static <ReturnType> <methodNameofBaseSqlObject>Silent(Connection connection, Type parameterValueOne, Type parameterValueTwo, [ additional parameters ...]) 

// params..., limit, offset - silently swallow exceptions and log them
public static <ReturnType> <methodNameofBaseSqlObject>Silent(Type parameterValueOne, Type parameterValueTwo, [ additional parameters ...], Integer limit, Integer offset) 

// connection, params... - silently swallow exceptions and log them
public static <ReturnType> <methodNameofBaseSqlObject>Silent(Type parameterValueOne, Type parameterValueTwo, [ additional parameters ...]) 

For the generated code, the following method signatures and the descriptions are noted below:

Connection and parameters exception signature

<methodNameOfBaseSqlObject>(Connection connection, Type parameterOne, Type parameterTwo) throws SQLException, <MethodSpecificException>

This method is best used when a transaction is required and an exception is required to be thrown if the method failed in some way. A Connection object with a transaction can be created as follows:

Connection connection = null;
connection = ConnectionManager.getConnection();
connection.setAutoCommit(false);

Then the connection can be re-used for all SQL interactions within a transaction.

IMPORTANT - You must explicitly call connection.commit() or connection.rollback() when the transaction is finalised. You must also return (i.e. close) the connection to the conneciton pool when done.

Parameters Exception signature

<methodNameOfBaseSqlObject>(Type parameterOne, Type parameterTwo) throws SQLException, <MethodSpecificException>

This method is best used when a single transaction within the method is required and exceptions are required to be caught on failure.

The Connection will be automatically created and cleaned-up after usage within this method. Please note that this is not done within a transaction, in order to complete a number of queries within a transaction, you must use pass in a Connection object that you have explicitly created.

Silent connection and parameters signature

<methodNameOfBaseSqlObject>Silent(Connection connection, Type parameterOne, Type parameterTwo)

*Silent method signatures are the majority use cases for all base sql objects. In the rare case that an exception is required to be thrown, then the exception methods may be used. The Connection object allows complete control over a number of transactional SQL queries.

Depending on the actual usage, the return value will either be null or an empty ArrayList, or dependent on the base SQL object that this method was invoked upon.

This method is best used when a transaction is required. A Connection object with a transaction can be created as follows:

Connection connection = null;
connection = ConnectionManager.getConnection();
connection.setAutoCommit(false);

IMPORTANT - You must explicitly call connection.commit() or connection.rollback() when the transaction is finalised. You must also return (i.e. close) the connection to the conneciton pool when done.

Silent parameters signature

<methodNameOfBaseSqlObject>Silent(Type parameterOne, Type parameterTwo)

*Silent method signatures are the majority use cases for all base sql objects. In the rare case that an exception is required to be thrown, then the exception methods may be used.

Depending on the actual usage, the return value will either be null or an empty ArrayList, or dependent on the base SQL object that this method was invoked upon.

The Connection will be automatically created and cleaned-up after usage within this method. Please note that this is not done within a transaction, in order to complete a number of queries within a transaction, you must use pass in a Connection object that you have explicitly created.