BrightSide Workbench Full Report + Source Code
org.turro.tags.Tags Class Reference

Static Public Member Functions

static TagSet search (String root, String value, int max)
 
static TagSet getAvailables ()
 
static TagSet getAvailables (String root)
 
static TagSet getSiblings (Set< String > tagNames)
 
static TagSet getSiblings (String root, Set< String > tagNames)
 
static List< TagItemgetAsItemFrom (String entityPath)
 
static List< TaggetFrom (String entityPath)
 
static List< TaggetFromRoot (String root)
 
static boolean existsTag (String tagName)
 
static void setTags (Object entity, String tags)
 
static void setTags (String entityPath, String tags)
 
static void setTags (Object entity, Collection< String > tags)
 
static void setTags (String entityPath, Collection< String > tags)
 
static boolean hasTag (Object entity, String tagName)
 
static boolean hasTag (String entityPath, String tagName)
 
static boolean hasTag (Dao dao, String entityPath, String tagName)
 
static void addTag (Object entity, String tagName)
 
static void addTag (String entityPath, String tagName)
 
static void changeTag (String entityPath, String oldName, String newName)
 
static void removeTag (Object entity, String tagName)
 
static void removeTag (String entityPath, String tagName)
 
static Tag getTag (Dao dao, String entityPath, String tagName)
 
static List< String > getIdentifiers (String root, Set< TagItem > set)
 
static List< String > getIdentifiers (Dao dao, String root, Set< TagItem > set)
 
static List< String > getEntityPaths (String root, Set< TagItem > set)
 
static List< String > getEntityPaths (Dao dao, String root, Set< TagItem > set)
 
static List< String > getIdentifiers (Dao dao, String root, List< TagSet > sets)
 
static List< String > getEntityPaths (String root, List< TagSet > sets)
 
static List< String > getEntityPaths (Dao dao, String root, List< TagSet > sets)
 
static void addResultCriteria (WhereClause wc, List< TagSet > sets)
 
static List< String > getCommonIdentifiers (String source, String rootTarget)
 
static List< Long > getCommonLongIdentifiers (String source, String rootTarget)
 
static List< String > getCommonEntityPaths (String source, String rootTarget)
 
static List< String > getCommonIdentifiers (Dao dao, String source, String rootTarget)
 
static List< Long > getCommonLongIdentifiers (Dao dao, String source, String rootTarget)
 
static List< String > getCommonEntityPaths (Dao dao, String source, String rootTarget)
 
static TagSet getTags (Object entity)
 
static TagSet getTags (String entityPath)
 
static void removeTags (Object entity)
 
static void removeTags (String entityPath)
 
static void removeTags (String root, List< String > tags)
 
static void removeMemberTags (long member)
 
static Collection< String > tagChoices (Object entity)
 
static Collection< String > tagChoices (String entityPath)
 
static ITagCtrl getControl (Object entity)
 
static String tagsString (Object entity)
 
static String tagsString (String entityPath)
 
static Set< String > getAllPaths (String root)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 45 of file Tags.java.

Member Function Documentation

◆ addResultCriteria()

static void org.turro.tags.Tags.addResultCriteria ( WhereClause  wc,
List< TagSet sets 
)
static

Definition at line 291 of file Tags.java.

291  {
292  wc.addClause("and (");
293  String orSep = "";
294  int count = 0;
295  for(Set<TagItem> set : sets) {
296  wc.addClause(orSep + "(");
297  String andSep = "";
298  List<String> tags = set.stream().map(t -> t.getTagName()).collect(Collectors.toList());
299  if(!tags.isEmpty()) {
300  for(String tag : tags) {
301  wc.addClause(andSep + "exists (");
302  wc.addClause("select t2.entityPath from Tag t2");
303  wc.addClause("where t2.entityPath = t.entityPath");
304  wc.addClause("and t2.tagName = :tag" + count);
305  wc.addNamedValue("tag" + count, tag);
306  wc.addClause(")");
307  count++;
308  andSep = "and ";
309  }
310  }
311  wc.addClause(")");
312  orSep = "or ";
313  }
314  wc.addClause(")");
315  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addTag() [1/2]

static void org.turro.tags.Tags.addTag ( Object  entity,
String  tagName 
)
static

Definition at line 188 of file Tags.java.

188  {
189  addTag(Entities.getController(entity).getPath(), tagName);
190  }
static void addTag(Object entity, String tagName)
Definition: Tags.java:188
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addTag() [2/2]

static void org.turro.tags.Tags.addTag ( String  entityPath,
String  tagName 
)
static

Definition at line 192 of file Tags.java.

192  {
193  Dao dao = new ElephantPU();
194  if(!hasTag(dao, entityPath, tagName)) {
195  Tag tag = new Tag();
196  tag.setEntityPath(entityPath);
197  tag.setTagName(tagName);
198  if(!tag.isEmpty()) dao.saveObject(tag);
199  }
200  }
static boolean hasTag(Object entity, String tagName)
Definition: Tags.java:176
Here is the call graph for this function:

◆ changeTag()

static void org.turro.tags.Tags.changeTag ( String  entityPath,
String  oldName,
String  newName 
)
static

Definition at line 202 of file Tags.java.

202  {
203  Dao dao = new ElephantPU();
204  WhereClause wc = new WhereClause();
205  wc.addClause("update Tag");
206  wc.addClause("set tagName = :newtag");
207  wc.addNamedValue("newtag", newName);
208  wc.addClause("where entityPath = :path");
209  wc.addNamedValue("path", entityPath);
210  wc.addClause("and tagName = :oldtag");
211  wc.addNamedValue("oldtag", oldName);
212  dao.executeUpdate(wc);
213  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ existsTag()

static boolean org.turro.tags.Tags.existsTag ( String  tagName)
static

Definition at line 140 of file Tags.java.

140  {
141  Dao dao = new ElephantPU();
142  return ((Long) dao.getSingleResult(
143  " select count(*) from Tag " +
144  " where tagName = ?",
145  new Object[] { tagName }
146  )) > 0;
147  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllPaths()

static Set<String> org.turro.tags.Tags.getAllPaths ( String  root)
static

Definition at line 434 of file Tags.java.

434  {
435  return new HashSet<>(SqlClause.select("distinct t.entityPath").from("Tag t")
436  .where().startsWith("t.entityPath", "/" + root + "/")
437  .dao(new ElephantPU())
438  .resultList(String.class));
439  }
Here is the caller graph for this function:

◆ getAsItemFrom()

static List<TagItem> org.turro.tags.Tags.getAsItemFrom ( String  entityPath)
static

Definition at line 116 of file Tags.java.

116  {
117  return getFrom(entityPath).stream().map(s -> new TagItem(s.getTagName(), 0)).collect(Collectors.toList());
118  }
static List< Tag > getFrom(String entityPath)
Definition: Tags.java:120
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAvailables() [1/2]

static TagSet org.turro.tags.Tags.getAvailables ( )
static

Definition at line 65 of file Tags.java.

65  {
66  return getAvailables(null);
67  }
static TagSet getAvailables()
Definition: Tags.java:65
Here is the caller graph for this function:

◆ getAvailables() [2/2]

static TagSet org.turro.tags.Tags.getAvailables ( String  root)
static

Definition at line 69 of file Tags.java.

69  {
70  Dao dao = new ElephantPU();
71  WhereClause wc = new WhereClause();
72  wc.addClause("select new org.turro.tags.TagItem(t.tagName, count(t))");
73  wc.addClause("from Tag t");
74  if(!Strings.isBlank(root)) {
75  wc.addClause("where t.entityPath like concat('/', :root, '/%')");
76  wc.addNamedValue("root", root);
77  }
78  wc.addClause("group by t.tagName");
79  return new TagSet(dao.getResultList(wc));
80  }
Here is the call graph for this function:

◆ getCommonEntityPaths() [1/2]

static List<String> org.turro.tags.Tags.getCommonEntityPaths ( Dao  dao,
String  source,
String  rootTarget 
)
static

Definition at line 337 of file Tags.java.

337  {
338  WhereClause wc = new WhereClause();
339  wc.addClause("select distinct t.entityPath from Tag t");
340  wc.addClause("where t.entityPath like concat('/', :target, '/%')");
341  wc.addNamedValue("target", rootTarget);
342  wc.addClause("and exists (");
343  wc.addClause("select t2.entityPath from Tag t2");
344  wc.addClause("where t2.entityPath = :source");
345  wc.addNamedValue("source", source);
346  wc.addClause("and t2.tagName = t.tagName");
347  wc.addClause(")");
348  return dao.getResultList(String.class, wc);
349  }
Here is the call graph for this function:

◆ getCommonEntityPaths() [2/2]

static List<String> org.turro.tags.Tags.getCommonEntityPaths ( String  source,
String  rootTarget 
)
static

Definition at line 325 of file Tags.java.

325  {
326  return getCommonEntityPaths(new ElephantPU(), source, rootTarget);
327  }
static List< String > getCommonEntityPaths(String source, String rootTarget)
Definition: Tags.java:325
Here is the caller graph for this function:

◆ getCommonIdentifiers() [1/2]

static List<String> org.turro.tags.Tags.getCommonIdentifiers ( Dao  dao,
String  source,
String  rootTarget 
)
static

Definition at line 329 of file Tags.java.

329  {
330  return getCommonEntityPaths(dao, source, rootTarget).stream().map(s -> Path.getIdentifier(s)).collect(Collectors.toList());
331  }
Here is the call graph for this function:

◆ getCommonIdentifiers() [2/2]

static List<String> org.turro.tags.Tags.getCommonIdentifiers ( String  source,
String  rootTarget 
)
static

Definition at line 317 of file Tags.java.

317  {
318  return getCommonEntityPaths(source, rootTarget).stream().map(s -> Path.getIdentifier(s)).collect(Collectors.toList());
319  }
Here is the call graph for this function:

◆ getCommonLongIdentifiers() [1/2]

static List<Long> org.turro.tags.Tags.getCommonLongIdentifiers ( Dao  dao,
String  source,
String  rootTarget 
)
static

Definition at line 333 of file Tags.java.

333  {
334  return getCommonEntityPaths(dao, source, rootTarget).stream().map(s -> Path.getLongIdentifier(s)).collect(Collectors.toList());
335  }
Here is the call graph for this function:

◆ getCommonLongIdentifiers() [2/2]

static List<Long> org.turro.tags.Tags.getCommonLongIdentifiers ( String  source,
String  rootTarget 
)
static

Definition at line 321 of file Tags.java.

321  {
322  return getCommonEntityPaths(source, rootTarget).stream().map(s -> Path.getLongIdentifier(s)).collect(Collectors.toList());
323  }
Here is the call graph for this function:

◆ getControl()

static ITagCtrl org.turro.tags.Tags.getControl ( Object  entity)
static

Definition at line 411 of file Tags.java.

411  {
412  if(entity == null) return null;
413  ITagCtrl ctrl = Plugins.loadImplementation(ITagCtrl.class, "tag-label");
414  ctrl.setEntity(entity);
415  ctrl.updateControls();
416  return ctrl;
417  }
Here is the call graph for this function:

◆ getEntityPaths() [1/4]

static List<String> org.turro.tags.Tags.getEntityPaths ( Dao  dao,
String  root,
List< TagSet sets 
)
static

Definition at line 279 of file Tags.java.

279  {
280  WhereClause wc = new WhereClause();
281  wc.addClause("select distinct t.entityPath from Tag t");
282  wc.addClause("where 1=1");
283  if(!Strings.isBlank(root)) {
284  wc.addClause("and t.entityPath like concat('/', :root, '/%')");
285  wc.addNamedValue("root", root);
286  }
287  addResultCriteria(wc, sets);
288  return dao.getResultList(String.class, wc);
289  }
static void addResultCriteria(WhereClause wc, List< TagSet > sets)
Definition: Tags.java:291
Here is the call graph for this function:

◆ getEntityPaths() [2/4]

static List<String> org.turro.tags.Tags.getEntityPaths ( Dao  dao,
String  root,
Set< TagItem set 
)
static

Definition at line 246 of file Tags.java.

246  {
247  List<String> tags = set.stream().map(t -> t.getTagName()).collect(Collectors.toList());
248  if(!tags.isEmpty()) {
249  WhereClause wc = new WhereClause();
250  wc.addClause("select distinct t.entityPath from Tag t");
251  wc.addClause("where 1=1");
252  if(!Strings.isBlank(root)) {
253  wc.addClause("and t.entityPath like concat('/', :root, '/%')");
254  wc.addNamedValue("root", root);
255  }
256  int count = 0;
257  for(String tag : tags) {
258  wc.addClause("and exists (");
259  wc.addClause("select t2.entityPath from Tag t2");
260  wc.addClause("where t2.entityPath = t.entityPath");
261  wc.addClause("and t2.tagName = :tag" + count);
262  wc.addNamedValue("tag" + count, tag);
263  wc.addClause(")");
264  count++;
265  }
266  return dao.getResultList(String.class, wc);
267  }
268  return Collections.EMPTY_LIST;
269  }
Here is the call graph for this function:

◆ getEntityPaths() [3/4]

static List<String> org.turro.tags.Tags.getEntityPaths ( String  root,
List< TagSet sets 
)
static

Definition at line 275 of file Tags.java.

275  {
276  return getEntityPaths(new ElephantPU(), root, sets);
277  }
static List< String > getEntityPaths(String root, Set< TagItem > set)
Definition: Tags.java:242
Here is the call graph for this function:

◆ getEntityPaths() [4/4]

static List<String> org.turro.tags.Tags.getEntityPaths ( String  root,
Set< TagItem set 
)
static

Definition at line 242 of file Tags.java.

242  {
243  return getEntityPaths(new ElephantPU(), root, set);
244  }
Here is the caller graph for this function:

◆ getFrom()

static List<Tag> org.turro.tags.Tags.getFrom ( String  entityPath)
static

Definition at line 120 of file Tags.java.

120  {
121  Dao dao = new ElephantPU();
122  WhereClause wc = new WhereClause();
123  wc.addClause("select t from Tag t");
124  wc.addClause("where t.entityPath = :path");
125  wc.addNamedValue("path", entityPath);
126  wc.addClause("order by t.tagName");
127  return dao.getResultList(wc);
128  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFromRoot()

static List<Tag> org.turro.tags.Tags.getFromRoot ( String  root)
static

Definition at line 130 of file Tags.java.

130  {
131  Dao dao = new ElephantPU();
132  WhereClause wc = new WhereClause();
133  wc.addClause("select t from Tag t");
134  wc.addClause("where t.entityPath like :path");
135  wc.addNamedValue("path", root + "%");
136  wc.addClause("order by t.tagName");
137  return dao.getResultList(wc);
138  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIdentifiers() [1/3]

static List<String> org.turro.tags.Tags.getIdentifiers ( Dao  dao,
String  root,
List< TagSet sets 
)
static

Definition at line 271 of file Tags.java.

271  {
272  return getEntityPaths(dao, root, sets).stream().map(s -> Path.getIdentifier(s)).collect(Collectors.toList());
273  }
Here is the call graph for this function:

◆ getIdentifiers() [2/3]

static List<String> org.turro.tags.Tags.getIdentifiers ( Dao  dao,
String  root,
Set< TagItem set 
)
static

Definition at line 238 of file Tags.java.

238  {
239  return getEntityPaths(dao, root, set).stream().map(s -> Path.getIdentifier(s)).collect(Collectors.toList());
240  }
Here is the call graph for this function:

◆ getIdentifiers() [3/3]

static List<String> org.turro.tags.Tags.getIdentifiers ( String  root,
Set< TagItem set 
)
static

Definition at line 234 of file Tags.java.

234  {
235  return getIdentifiers(new ElephantPU(), root, set);
236  }
static List< String > getIdentifiers(String root, Set< TagItem > set)
Definition: Tags.java:234
Here is the caller graph for this function:

◆ getSiblings() [1/2]

static TagSet org.turro.tags.Tags.getSiblings ( Set< String >  tagNames)
static

Definition at line 82 of file Tags.java.

82  {
83  return getSiblings(null, tagNames);
84  }
static TagSet getSiblings(Set< String > tagNames)
Definition: Tags.java:82
Here is the caller graph for this function:

◆ getSiblings() [2/2]

static TagSet org.turro.tags.Tags.getSiblings ( String  root,
Set< String >  tagNames 
)
static

Definition at line 86 of file Tags.java.

86  {
87  Dao dao = new ElephantPU();
88  TagSet finalSet = null;
89  for(String tag : tagNames) {
90  TagSet set = getSiblings(dao, root, tag);
91  if(finalSet != null) {
92  finalSet.retainAll(set);
93  } else {
94  finalSet = set;
95  }
96  }
97  return Optional.ofNullable(finalSet).orElseGet(() -> TagSet.empty());
98  }
Here is the call graph for this function:

◆ getTag()

static Tag org.turro.tags.Tags.getTag ( Dao  dao,
String  entityPath,
String  tagName 
)
static

Definition at line 227 of file Tags.java.

227  {
228  TagPK tagPk = new TagPK();
229  tagPk.setEntityPath(entityPath);
230  tagPk.setTagName(tagName);
231  return dao.find(Tag.class, tagPk);
232  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTags() [1/2]

static TagSet org.turro.tags.Tags.getTags ( Object  entity)
static

Definition at line 351 of file Tags.java.

351  {
352  return getTags(Entities.getController(entity).getPath());
353  }
static TagSet getTags(Object entity)
Definition: Tags.java:351
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTags() [2/2]

static TagSet org.turro.tags.Tags.getTags ( String  entityPath)
static

Definition at line 355 of file Tags.java.

355  {
356  Dao dao = new ElephantPU();
357  WhereClause wc = new WhereClause();
358  wc.addClause("select new org.turro.tags.TagItem(t.tagName, count(t))");
359  wc.addClause("from Tag t");
360  wc.addClause("where t.entityPath = :path");
361  wc.addNamedValue("path", entityPath);
362  wc.addClause("group by t.tagName");
363  return new TagSet(dao.getResultList(wc));
364  }
Here is the call graph for this function:

◆ hasTag() [1/3]

static boolean org.turro.tags.Tags.hasTag ( Dao  dao,
String  entityPath,
String  tagName 
)
static

Definition at line 184 of file Tags.java.

184  {
185  return getTag(dao, entityPath, tagName) != null;
186  }
static Tag getTag(Dao dao, String entityPath, String tagName)
Definition: Tags.java:227
Here is the call graph for this function:

◆ hasTag() [2/3]

static boolean org.turro.tags.Tags.hasTag ( Object  entity,
String  tagName 
)
static

Definition at line 176 of file Tags.java.

176  {
177  return hasTag(Entities.getController(entity).getPath(), tagName);
178  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasTag() [3/3]

static boolean org.turro.tags.Tags.hasTag ( String  entityPath,
String  tagName 
)
static

Definition at line 180 of file Tags.java.

180  {
181  return hasTag(new ElephantPU(), entityPath, tagName);
182  }
Here is the call graph for this function:

◆ removeMemberTags()

static void org.turro.tags.Tags.removeMemberTags ( long  member)
static

Definition at line 389 of file Tags.java.

389  {
390  Dao dao = new ElephantPU();
391  WhereClause wc = new WhereClause();
392  wc.addClause("delete from Tag");
393  wc.addClause("where entityPath like :path");
394  wc.addNamedValue("path", "/%/%##" + member);
395  dao.executeUpdate(wc);
396  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeTag() [1/2]

static void org.turro.tags.Tags.removeTag ( Object  entity,
String  tagName 
)
static

Definition at line 215 of file Tags.java.

215  {
216  removeTag(Entities.getController(entity).getPath(), tagName);
217  }
static void removeTag(Object entity, String tagName)
Definition: Tags.java:215
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeTag() [2/2]

static void org.turro.tags.Tags.removeTag ( String  entityPath,
String  tagName 
)
static

Definition at line 219 of file Tags.java.

219  {
220  Dao dao = new ElephantPU();
221  Tag tag = getTag(dao, entityPath, tagName);
222  if(tag != null) {
223  dao.deleteObject(tag);
224  }
225  }
Here is the call graph for this function:

◆ removeTags() [1/3]

static void org.turro.tags.Tags.removeTags ( Object  entity)
static

Definition at line 366 of file Tags.java.

366  {
367  removeTags(Entities.getController(entity).getPath());
368  }
static void removeTags(Object entity)
Definition: Tags.java:366
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeTags() [2/3]

static void org.turro.tags.Tags.removeTags ( String  entityPath)
static

Definition at line 370 of file Tags.java.

370  {
371  Dao dao = new ElephantPU();
372  WhereClause wc = new WhereClause();
373  wc.addClause("delete from Tag");
374  wc.addClause("where entityPath = :path");
375  wc.addNamedValue("path", entityPath);
376  dao.executeUpdate(wc);
377  }
Here is the call graph for this function:

◆ removeTags() [3/3]

static void org.turro.tags.Tags.removeTags ( String  root,
List< String >  tags 
)
static

Definition at line 379 of file Tags.java.

379  {
380  Dao dao = new ElephantPU();
381  WhereClause wc = new WhereClause();
382  wc.addClause("delete from Tag");
383  wc.addClause("where entityPath like :path");
384  wc.addIn("and", "tagName", tags);
385  wc.addNamedValue("path", "/" + root + "/%");
386  dao.executeUpdate(wc);
387  }
Here is the call graph for this function:

◆ search()

static TagSet org.turro.tags.Tags.search ( String  root,
String  value,
int  max 
)
static

Definition at line 47 of file Tags.java.

47  {
48  Dao dao = new ElephantPU();
49  WhereClause wc = new WhereClause();
50  wc.addClause("select new org.turro.tags.TagItem(t.tagName, count(t))");
51  wc.addClause("from Tag t");
52  wc.addClause("where t.entityPath like '/contact/%'");
53  if(!Strings.isBlank(root)) {
54  wc.addClause("and t.entityPath like concat('/', :root, '/%')");
55  wc.addNamedValue("root", root);
56  }
57  if(!Strings.isBlank(value)) {
58  wc.addLikeFields(new String[]{ "t.tagName" }, value.toString());
59  }
60  wc.addClause("group by t.tagName");
61  wc.addClause("order by t.tagName");
62  return new TagSet(dao.getResultList(wc, max));
63  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTags() [1/4]

static void org.turro.tags.Tags.setTags ( Object  entity,
Collection< String >  tags 
)
static

Definition at line 161 of file Tags.java.

161  {
162  setTags(Entities.getController(entity).getPath(), tags);
163  }
static void setTags(Object entity, String tags)
Definition: Tags.java:149
Here is the call graph for this function:

◆ setTags() [2/4]

static void org.turro.tags.Tags.setTags ( Object  entity,
String  tags 
)
static

Definition at line 149 of file Tags.java.

149  {
150  setTags(Entities.getController(entity).getPath(), tags);
151  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTags() [3/4]

static void org.turro.tags.Tags.setTags ( String  entityPath,
Collection< String >  tags 
)
static

Definition at line 165 of file Tags.java.

165  {
166  if(tags == null || tags.isEmpty()) {
167  removeTags(entityPath);
168  } else {
169  removeTags(entityPath);
170  for(String tag : tags) {
171  addTag(entityPath, tag);
172  }
173  }
174  }
Here is the call graph for this function:

◆ setTags() [4/4]

static void org.turro.tags.Tags.setTags ( String  entityPath,
String  tags 
)
static

Definition at line 153 of file Tags.java.

153  {
154  if(Strings.isBlank(tags)) {
155  removeTags(entityPath);
156  } else {
157  setTags(entityPath, Arrays.asList(tags.split("\\s*,\\s*")));
158  }
159  }
Here is the call graph for this function:

◆ tagChoices() [1/2]

static Collection<String> org.turro.tags.Tags.tagChoices ( Object  entity)
static

Definition at line 398 of file Tags.java.

398  {
399  return tagChoices(Entities.getController(entity).getPath());
400  }
static Collection< String > tagChoices(Object entity)
Definition: Tags.java:398
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tagChoices() [2/2]

static Collection<String> org.turro.tags.Tags.tagChoices ( String  entityPath)
static

Definition at line 402 of file Tags.java.

402  {
403  Dao dao = new ElephantPU();
404  return dao.getResultList(
405  " select distinct tagName from Tag " +
406  " where entityPath <> ?",
407  new Object[] { entityPath }
408  );
409  }

◆ tagsString() [1/2]

static String org.turro.tags.Tags.tagsString ( Object  entity)
static

Definition at line 419 of file Tags.java.

419  {
420  return tagsString(Entities.getController(entity).getPath());
421  }
static String tagsString(Object entity)
Definition: Tags.java:419
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tagsString() [2/2]

static String org.turro.tags.Tags.tagsString ( String  entityPath)
static

Definition at line 423 of file Tags.java.

423  {
424  PhraseBuilder pb = new PhraseBuilder();
425  for(String tag : getTags(entityPath).getTagNames()) {
426  pb.addWord(tag);
427  pb.addPendingSeparator(",");
428  }
429  return pb.toString();
430  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: