T
- The class that the code will be operating on.ID
- The class of the ID column associated with the class. The T class does not require an ID field. The class
needs an ID parameter however so you can use Void or Object to satisfy the compiler.public class DeleteBuilder<T,ID> extends StatementBuilder<T,ID>
StatementBuilder.StatementInfo, StatementBuilder.StatementType, StatementBuilder.WhereOperation
addTableName, dao, databaseType, tableInfo, tableName, type, where
Constructor and Description |
---|
DeleteBuilder(DatabaseType databaseType,
TableInfo<T,ID> tableInfo,
Dao<T,ID> dao) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendStatementEnd(StringBuilder sb,
List<ArgumentHolder> argList)
Append the end of our statement string to the StringBuilder.
|
protected void |
appendStatementStart(StringBuilder sb,
List<ArgumentHolder> argList)
Append the start of our statement string to the StringBuilder.
|
int |
delete()
A short cut to
Dao.delete(PreparedDelete) . |
DeleteBuilder<T,ID> |
limit(Long maxRows)
Limit the rows affected to maxRows maximum number of rows.
|
PreparedDelete<T> |
prepare()
Build and return a prepared delete that can be used by
Dao.delete(PreparedDelete) method. |
void |
reset()
Clear out all of the statement settings so we can reuse the builder.
|
appendStatementString, appendWhereStatement, buildStatementString, getResultFieldTypes, getTableName, prepareStatement, prepareStatementInfo, prepareStatementString, setWhere, shouldPrependTableNameToColumns, verifyColumnName, where
public PreparedDelete<T> prepare() throws SQLException
Dao.delete(PreparedDelete)
method. If you change
the where or make other calls you will need to re-call this method to re-prepare the statement for execution.SQLException
public int delete() throws SQLException
Dao.delete(PreparedDelete)
.SQLException
public DeleteBuilder<T,ID> limit(Long maxRows)
public void reset()
StatementBuilder
reset
in class StatementBuilder<T,ID>
protected void appendStatementStart(StringBuilder sb, List<ArgumentHolder> argList)
StatementBuilder
appendStatementStart
in class StatementBuilder<T,ID>
protected void appendStatementEnd(StringBuilder sb, List<ArgumentHolder> argList)
StatementBuilder
appendStatementEnd
in class StatementBuilder<T,ID>
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.