} else if (entity instanceof IPerson) {
IPerson person = (IPerson) entity;
modelEvent = new PersonEvent(person, root);
} else if (entity instanceof IBookMark) {
IBookMark mark = (IBookMark) entity;
BookMarkEvent eventTemplate = (BookMarkEvent) template;
IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
modelEvent = new BookMarkEvent(mark, oldParent, root);
} else if (entity instanceof ISearchMark) {
ISearchMark mark = (ISearchMark) entity;
SearchMarkEvent eventTemplate = (SearchMarkEvent) template;
IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
modelEvent = new SearchMarkEvent(mark, oldParent, root);
} else if (entity instanceof INewsBin) {
INewsBin newsBin = (INewsBin) entity;
NewsBinEvent eventTemplate = (NewsBinEvent) template;
IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
modelEvent = new NewsBinEvent(newsBin, oldParent, root);
} else if (entity instanceof IFolder) {
IFolder folder = (IFolder) entity;
FolderEvent eventTemplate = (FolderEvent) template;
IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
modelEvent = new FolderEvent(folder, oldParent, root);
} else if (entity instanceof ILabel) {
ILabel label = (ILabel) entity;
LabelEvent eventTemplate = (LabelEvent) template;
ILabel oldLabel = eventTemplate == null ? null : eventTemplate.getOldLabel();
modelEvent = new LabelEvent(oldLabel, label, root);
} else if (entity instanceof ISearchCondition) {
ISearchCondition searchCond = (ISearchCondition) entity;
modelEvent = new SearchConditionEvent(searchCond, root);
} else if (entity instanceof IPreference) {