19 lines
790 B
Java
19 lines
790 B
Java
package data.dtos;
|
|
|
|
import data.enums.CustomPreparedStatementsRead;
|
|
|
|
/**
|
|
* Container for storing SQL statements to be executed, along with their aruments.
|
|
* @param statement an instance of `CustomPreparedStatementsRead` enum which contains the statement template to be executed.
|
|
* @param templateArgs an array of `Object` representing the arguments to be used in the statement template.
|
|
*/
|
|
public record QueryDTO(CustomPreparedStatementsRead statement, Object[] templateArgs) {
|
|
/**
|
|
* overloaded constructor that takes only a `CustomPreparedStatementsRead` object as parameter.
|
|
* @param customPreparedStatementsRead
|
|
*/
|
|
public QueryDTO(CustomPreparedStatementsRead customPreparedStatementsRead) {
|
|
this(customPreparedStatementsRead, new Object[]{});
|
|
}
|
|
}
|