Examples of QuestionTag


Examples of com.tmm.enterprise.microblog.domain.QuestionTag

  @SuppressWarnings("unchecked")
  public QuestionTag loadOrCreateTagByName(String name)
  {
    Query query = getEntityManager().createQuery("select t from QuestionTag t where t.tag = ?1");
    query.setParameter(1, name);
    QuestionTag tag = null;
   
    try{
      List<QuestionTag> tags = (List<QuestionTag>)query.getResultList();
      if (tags==null || tags.isEmpty())
      {
        tag = new QuestionTag();
        tag.setTag(name);
        persist(tag);
      }
      else
      {
        tag = tags.get(0);
View Full Code Here

Examples of com.tmm.enterprise.microblog.domain.QuestionTag

      q.setAssignedTo(contact);

      if (tags != null && !"".equals(tags)) {
        String[] listTags = tags.split(",");
        for (String t : listTags) {
          QuestionTag tag = questionTagDao.loadOrCreateTagByName(t.trim());
          q.addTag(tag);
        }
      }

      questionDao.persist(q);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.