BrightSide Workbench Full Report + Source Code
org.turro.forum.db.UniquePath Class Reference

Static Public Member Functions

static void normalizeUniquePaths (Topic topic)
 
static void normalizeUniquePaths (Post post)
 
static void normalizeUniquePaths (Topic topic, final JpaCriteria criteria, Dao dao, Dao execute)
 
static void normalizeUniquePaths (Post post, final JpaCriteria criteria, Dao dao, Dao execute)
 
static void normalizeUniquePaths ()
 

Detailed Description

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

Definition at line 33 of file UniquePath.java.

Member Function Documentation

◆ normalizeUniquePaths() [1/5]

static void org.turro.forum.db.UniquePath.normalizeUniquePaths ( )
static

Definition at line 59 of file UniquePath.java.

59  {
60  Dao dao = new ElephantPU(); //query
61  Dao execute = new ElephantPU(); //update within query
62  JpaCriteria criteria = new JpaCriteria(dao);
63  JpaQuery<Topic> jqc = criteria.query(Topic.class);
64  dao.getResultList(jqc.select()).forEach((topic) -> {
65  normalizeUniquePaths(topic, criteria, dao, execute);
66  });
67  }
static void normalizeUniquePaths()
Definition: UniquePath.java:59
Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalizeUniquePaths() [2/5]

static void org.turro.forum.db.UniquePath.normalizeUniquePaths ( Post  post)
static

Definition at line 40 of file UniquePath.java.

40  {
41  Dao dao = new ElephantPU();
42  normalizeUniquePaths(post, new JpaCriteria(dao), dao, new ElephantPU());
43  }
Here is the call graph for this function:

◆ normalizeUniquePaths() [3/5]

static void org.turro.forum.db.UniquePath.normalizeUniquePaths ( Post  post,
final JpaCriteria  criteria,
Dao  dao,
Dao  execute 
)
static

Definition at line 52 of file UniquePath.java.

52  {
53  JpaCriteriaUpdate<Post> jud = criteria.createCriteriaUpdate(Post.class);
54  execute.executeUpdate(jud.set("uniquePath", post.getCurrentParent().getUniquePath() + ElephantPU.getObjectPath(post))
55  .where(criteria.equal(jud.field("id"), post.getId())));
56  post.getPosts(dao).forEach(p -> normalizeUniquePaths(p, criteria, dao, execute));
57  }
Here is the call graph for this function:

◆ normalizeUniquePaths() [4/5]

static void org.turro.forum.db.UniquePath.normalizeUniquePaths ( Topic  topic)
static

Definition at line 35 of file UniquePath.java.

35  {
36  Dao dao = new ElephantPU();
37  normalizeUniquePaths(topic, new JpaCriteria(dao), dao, new ElephantPU());
38  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalizeUniquePaths() [5/5]

static void org.turro.forum.db.UniquePath.normalizeUniquePaths ( Topic  topic,
final JpaCriteria  criteria,
Dao  dao,
Dao  execute 
)
static

Definition at line 45 of file UniquePath.java.

45  {
46  JpaCriteriaUpdate<Topic> jud = criteria.createCriteriaUpdate(Topic.class);
47  execute.executeUpdate(jud.set("uniquePath", topic.getEntityPath() + ElephantPU.getObjectPath(topic))
48  .where(criteria.equal(jud.field("id"), topic.getId())));
49  topic.getPosts(dao).forEach(p -> normalizeUniquePaths(p, criteria, dao, execute));
50  }
Here is the call graph for this function:

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