1 19 20 package org.apache.cayenne.map.event; 21 22 import org.apache.cayenne.query.Query; 23 24 31 public class QueryEvent extends MapEvent { 32 protected Query query; 33 34 public QueryEvent(Object source, Query query) { 35 super(source); 36 setQuery(query); 37 } 38 39 public QueryEvent(Object source, Query query, String oldName) { 40 this(source, query); 41 setOldName(oldName); 42 } 43 44 public QueryEvent(Object source, Query query, int type) { 45 this(source, query); 46 setId(type); 47 } 48 49 public String getNewName() { 50 return (query != null) ? query.getName() : null; 51 } 52 53 public Query getQuery() { 54 return query; 55 } 56 57 public void setQuery(Query query) { 58 this.query = query; 59 } 60 } 61 | Popular Tags |