예제 #1
0
  /** Insert tag. */
  public void insertEntity(Tag tag) {
    // tracking positions
    trackPositionChanges(tag);

    tagDAO.insert(tag);

    this.trackContactChanges(tag);
  }
예제 #2
0
  /** Delete tag. */
  public void deleteEntity(Tag tag) {
    // for Position tracking
    tag.getPositionTags().clear();
    tag.getContactTags().clear();
    trackPositionChanges(tag);
    trackContactChanges(tag);

    tagDAO.delete(tag);
  }
예제 #3
0
 /**
  * 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;
 }
예제 #4
0
 /**
  * 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);
 }
예제 #5
0
 /** Update tag. */
 public void updateEntity(Tag tag) {
   // tracking positions
   trackPositionChanges(tag);
   this.trackContactChanges(tag);
   tagDAO.update(tag);
 }