Exemplo n.º 1
0
 public Map<Long, KeyTag> getKeyTagMapInId(List<Long> idList) {
   List<KeyTag> list = this.getKeyTagListInId(idList);
   Map<Long, KeyTag> map = new HashMap<Long, KeyTag>();
   for (KeyTag o : list) {
     map.put(o.getTagId(), o);
   }
   return map;
 }
Exemplo n.º 2
0
 public long createKeyTag(String name) {
   KeyTag o = this.getKeyTagByName(name);
   if (o != null) {
     return o.getTagId();
   }
   Query query = manager.createQuery();
   query.addField("name", name);
   query.addField("searchcount", 0);
   long id = query.insert(KeyTag.class).longValue();
   return id;
 }