} else if (entity instanceof IPreference) {
IPreference pref = (IPreference) entity;
modelEvent = new PreferenceEvent(pref);
} else if (entity instanceof ISearch) {
ISearch search = (ISearch) entity;
modelEvent = new SearchEvent(search, root);
} else if (entity instanceof ISearchFilter) {
ISearchFilter filter = (ISearchFilter) entity;
modelEvent = new SearchFilterEvent(filter, root);
}