答案 0 :(得分:1)
您只需检查SQLContainer代码即可。
短语
通常情况下,SQLContainer会自动处理刷新 必需的。
表示SQLContainer会在对其状态进行一些更改后自行刷新。例如,添加 orderBy 后,将调用刷新():
/**
* Adds the given OrderBy to this container and refreshes the container
* contents with the new sorting rules.
*
* Note that orderBy.getColumn() must return a column name that exists in
* this container.
*
* @param orderBy
* OrderBy to be added to the container sorting rules
*/
public void addOrderBy(OrderBy orderBy) {
if (orderBy == null) {
return;
}
if (!propertyIds.contains(orderBy.getColumn())) {
throw new IllegalArgumentException(
"The column given for sorting does not exist in this container.");
}
sorters.add(orderBy);
refresh();
}
所有其他操作都适用(请注意刷新()电话):
public void rollback() throws UnsupportedOperationException, SQLException {
debug(null, "Rolling back changes...");
removedItems.clear();
addedItems.clear();
modifiedItems.clear();
refresh();
}