/** Insert tag. */ public void insertEntity(Tag tag) { // tracking positions trackPositionChanges(tag); tagDAO.insert(tag); this.trackContactChanges(tag); }
/** Delete tag. */ public void deleteEntity(Tag tag) { // for Position tracking tag.getPositionTags().clear(); tag.getContactTags().clear(); trackPositionChanges(tag); trackContactChanges(tag); tagDAO.delete(tag); }
/** * Get tag by primary key. * * @return tag selected by id. */ public Tag getEntityById(int id) { final Tag tag = tagDAO.getById(id); // tag.initChanges(); return tag; }
/** * List tags. * * @param search search filter to apply * @param sort sorting criteria * @return the list of all tags sorted by requested criterion */ public List<Tag> getAllEntities(TagSearch search, SortCriteria sort) { return tagDAO.search(search, sort); }
/** Update tag. */ public void updateEntity(Tag tag) { // tracking positions trackPositionChanges(tag); this.trackContactChanges(tag); tagDAO.update(tag); }