1 56 package org.objectstyle.cayenne.map.event; 57 58 import org.objectstyle.cayenne.query.Query; 59 60 67 public class QueryEvent extends MapEvent { 68 protected Query query; 69 70 public QueryEvent(Object source, Query query) { 71 super(source); 72 setQuery(query); 73 } 74 75 public QueryEvent(Object source, Query query, String oldName) { 76 this(source, query); 77 setOldName(oldName); 78 } 79 80 public QueryEvent(Object source, Query query, int type) { 81 this(source, query); 82 setId(type); 83 } 84 85 public String getNewName() { 86 return (query != null) ? query.getName() : null; 87 } 88 89 public Query getQuery() { 90 return query; 91 } 92 93 public void setQuery(Query query) { 94 this.query = query; 95 } 96 } 97 | Popular Tags |