1 package jimm.datavision.gui.cmd; 2 import jimm.datavision.source.Query; 3 import jimm.util.I18N; 4 5 10 public class WhereClauseEditCommand extends CommandAdapter { 11 12 protected Query query; 13 protected String newWhereClause; 14 protected String oldWhereClause; 15 16 public WhereClauseEditCommand(Query query, String whereClause) { 17 super(I18N.get("WhereClauseEditCommand.name")); 18 this.query = query; 19 newWhereClause = whereClause; 20 oldWhereClause = query.getEditableWhereClause(); 21 } 22 23 public void perform() { 24 query.setEditableWhereClause(newWhereClause); 25 } 26 27 public void undo() { 28 query.setEditableWhereClause(oldWhereClause); 29 } 30 31 } 32 | Popular Tags |