#1579 - ENH: for UpdateQuery add setLabel() and update() as top level methods

This commit is contained in:
rob bygrave
2018-12-19 13:58:28 +13:00
parent 51f79e769c
commit ebdc28e1cd
3 changed files with 53 additions and 0 deletions
+10
View File
@@ -154,9 +154,19 @@ public interface UpdateQuery<T> {
*/
UpdateQuery<T> setProfileLocation(ProfileLocation profileLocation);
/**
* Set the label on the update query.
*/
UpdateQuery<T> setLabel(String label);
/**
* Return the query expression list to add predicates to.
*/
ExpressionList<T> where();
/**
* Execute the update returning the number of rows updated.
*/
int update();
}
@@ -48,8 +48,19 @@ public class DefaultUpdateQuery<T> implements UpdateQuery<T> {
return this;
}
@Override
public UpdateQuery<T> setLabel(String label) {
query.setLabel(label);
return this;
}
@Override
public ExpressionList<T> where() {
return query.where();
}
@Override
public int update() {
return query.update();
}
}