Class SQLUpdate
java.lang.Object
ece.ing3.java.projet.database.sql.queries.SQLWhereQuery<SQLUpdate>
ece.ing3.java.projet.database.sql.queries.SQLUpdate
- All Implemented Interfaces:
- SQLRequest
SQL update helper.
 
Provides a convenient way to build update SQL queries, reactive-style, for a provided model class.
- Author:
- Virgile, Nicolas, Louis-Félix
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
SQLUpdateCreates a new helper for a model class.- Parameters:
- modelClass- Model class
 
 
- 
- 
Method Details- 
getModelClass
- 
setSets a new value for a defined column.- Parameters:
- column- Column to target
- value- New column value
- Returns:
- This SQL insert helper
- Throws:
- NullPointerException- Column or value is- null
 
- 
updateUpdates the database according to the provided values and conditions.- Returns:
- Either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing
- Throws:
- IllegalArgumentException- No values where set
- DatabaseException- Database error
 
- 
toStringGenerate the SQL query for this insert helper.- Specified by:
- toStringin interface- SQLRequest
- Overrides:
- toStringin class- Object
- Returns:
- Generated SQL query
- Throws:
- IllegalArgumentException- No values where added
 
- 
getParametersDescription copied from interface:SQLRequestGets all the request's parameters- Specified by:
- getParametersin interface- SQLRequest
- Overrides:
- getParametersin class- SQLWhereQuery<SQLUpdate>
- Returns:
- Request parameters
 
 
-