BrightSide Workbench Full Report + Source Code
org.turro.entities.Students Class Reference

Static Public Member Functions

static long getChallengeCountFromEntity (Object entity)
 
static long getChallengeCountFromEntity (String entityPath)
 
static List< ChallengegetChallengesFromEntity (Object entity)
 
static List< ChallengegetChallengesFromEntity (String entityPath)
 
static long getChallengeCountFrom (IContact contact)
 
static long getChallengeCountFrom (String idContact)
 
static List< ChallengegetChallengesFrom (IContact contact)
 
static List< ChallengegetChallengesFrom (String idContact)
 
static long getResponseCountFromEntity (Object entity)
 
static long getResponseCountFromEntity (String entityPath)
 
static List< ResponsegetResponsesFromEntity (Object entity)
 
static List< ResponsegetResponsesFromEntity (String entityPath)
 
static long getResponseCountFrom (IContact contact)
 
static long getResponseCountFrom (String idContact)
 
static List< ResponsegetResponsesFrom (IContact contact)
 
static List< ResponsegetResponsesFrom (String idContact)
 
static double getResponseCountFrom (Dao dao, Challenge challenge)
 
static List< ResponsegetResponsesFrom (Dao dao, Challenge challenge)
 

Detailed Description

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

Definition at line 33 of file Students.java.

Member Function Documentation

◆ getChallengeCountFrom() [1/2]

static long org.turro.entities.Students.getChallengeCountFrom ( IContact  contact)
static

Definition at line 59 of file Students.java.

59  {
60  return getChallengeCountFrom(contact.getId());
61  }
static long getChallengeCountFrom(IContact contact)
Definition: Students.java:59
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChallengeCountFrom() [2/2]

static long org.turro.entities.Students.getChallengeCountFrom ( String  idContact)
static

Definition at line 63 of file Students.java.

63  {
64  WhereClause wc = new WhereClause();
65  wc.addClause("select count(distinct c) from Challenge c");
66  wc.addClause("where c.idChallenger = :idc");
67  wc.addNamedValue("idc", idContact);
68  return (long) new StudentsPU().getSingleResult(wc);
69  }
Here is the call graph for this function:

◆ getChallengeCountFromEntity() [1/2]

static long org.turro.entities.Students.getChallengeCountFromEntity ( Object  entity)
static

Definition at line 35 of file Students.java.

35  {
36  return getChallengeCountFrom(Entities.getController(entity).getPath());
37  }
Here is the call graph for this function:

◆ getChallengeCountFromEntity() [2/2]

static long org.turro.entities.Students.getChallengeCountFromEntity ( String  entityPath)
static

Definition at line 39 of file Students.java.

39  {
40  WhereClause wc = new WhereClause();
41  wc.addClause("select count(distinct c) from Challenge c");
42  wc.addClause("where c.entityPath = :path");
43  wc.addNamedValue("path", entityPath);
44  return (long) new StudentsPU().getSingleResult(wc);
45  }
Here is the call graph for this function:

◆ getChallengesFrom() [1/2]

static List<Challenge> org.turro.entities.Students.getChallengesFrom ( IContact  contact)
static

Definition at line 71 of file Students.java.

71  {
72  return getChallengesFrom(contact.getId());
73  }
static List< Challenge > getChallengesFrom(IContact contact)
Definition: Students.java:71
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChallengesFrom() [2/2]

static List<Challenge> org.turro.entities.Students.getChallengesFrom ( String  idContact)
static

Definition at line 75 of file Students.java.

75  {
76  WhereClause wc = new WhereClause();
77  wc.addClause("select c from Challenge c");
78  wc.addClause("where c.idChallenger = :idc");
79  wc.addNamedValue("idc", idContact);
80  return new StudentsPU().getResultList(wc);
81  }
Here is the call graph for this function:

◆ getChallengesFromEntity() [1/2]

static List<Challenge> org.turro.entities.Students.getChallengesFromEntity ( Object  entity)
static

Definition at line 47 of file Students.java.

47  {
48  return getChallengesFrom(Entities.getController(entity).getPath());
49  }
Here is the call graph for this function:

◆ getChallengesFromEntity() [2/2]

static List<Challenge> org.turro.entities.Students.getChallengesFromEntity ( String  entityPath)
static

Definition at line 51 of file Students.java.

51  {
52  WhereClause wc = new WhereClause();
53  wc.addClause("select c from Challenge c");
54  wc.addClause("where c.entityPath = :path");
55  wc.addNamedValue("path", entityPath);
56  return new StudentsPU().getResultList(wc);
57  }
Here is the call graph for this function:

◆ getResponseCountFrom() [1/3]

static double org.turro.entities.Students.getResponseCountFrom ( Dao  dao,
Challenge  challenge 
)
static

Definition at line 131 of file Students.java.

131  {
132  WhereClause wc = new WhereClause();
133  wc.addClause("select count(distinct r) from Response r");
134  wc.addClause("where challenge.id = :idc");
135  wc.addNamedValue("idc", challenge.getId());
136  return (long) dao.getSingleResult(wc);
137  }
Here is the call graph for this function:

◆ getResponseCountFrom() [2/3]

static long org.turro.entities.Students.getResponseCountFrom ( IContact  contact)
static

Definition at line 107 of file Students.java.

107  {
108  return getResponseCountFrom(contact.getId());
109  }
static long getResponseCountFrom(IContact contact)
Definition: Students.java:107
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getResponseCountFrom() [3/3]

static long org.turro.entities.Students.getResponseCountFrom ( String  idContact)
static

Definition at line 111 of file Students.java.

111  {
112  WhereClause wc = new WhereClause();
113  wc.addClause("select count(distinct r) from Response r");
114  wc.addClause("where :idc member of r.studentIds");
115  wc.addNamedValue("idc", idContact);
116  return (long) new StudentsPU().getSingleResult(wc);
117  }
Here is the call graph for this function:

◆ getResponseCountFromEntity() [1/2]

static long org.turro.entities.Students.getResponseCountFromEntity ( Object  entity)
static

Definition at line 83 of file Students.java.

83  {
84  return getResponseCountFrom(Entities.getController(entity).getPath());
85  }
Here is the call graph for this function:

◆ getResponseCountFromEntity() [2/2]

static long org.turro.entities.Students.getResponseCountFromEntity ( String  entityPath)
static

Definition at line 87 of file Students.java.

87  {
88  WhereClause wc = new WhereClause();
89  wc.addClause("select count(distinct r) from Response r");
90  wc.addClause("where r.challenge.entityPath = :path");
91  wc.addNamedValue("path", entityPath);
92  return (long) new StudentsPU().getSingleResult(wc);
93  }
Here is the call graph for this function:

◆ getResponsesFrom() [1/3]

static List<Response> org.turro.entities.Students.getResponsesFrom ( Dao  dao,
Challenge  challenge 
)
static

Definition at line 139 of file Students.java.

139  {
140  WhereClause wc = new WhereClause();
141  wc.addClause("select r from Response r");
142  wc.addClause("where challenge.id = :idc");
143  wc.addNamedValue("idc", challenge.getId());
144  return dao.getResultList(wc);
145  }
Here is the call graph for this function:

◆ getResponsesFrom() [2/3]

static List<Response> org.turro.entities.Students.getResponsesFrom ( IContact  contact)
static

Definition at line 119 of file Students.java.

119  {
120  return getResponsesFrom(contact.getId());
121  }
static List< Response > getResponsesFrom(IContact contact)
Definition: Students.java:119
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getResponsesFrom() [3/3]

static List<Response> org.turro.entities.Students.getResponsesFrom ( String  idContact)
static

Definition at line 123 of file Students.java.

123  {
124  WhereClause wc = new WhereClause();
125  wc.addClause("select r from Response r");
126  wc.addClause("where :idc member of r.studentIds");
127  wc.addNamedValue("idc", idContact);
128  return new StudentsPU().getResultList(wc);
129  }
Here is the call graph for this function:

◆ getResponsesFromEntity() [1/2]

static List<Response> org.turro.entities.Students.getResponsesFromEntity ( Object  entity)
static

Definition at line 95 of file Students.java.

95  {
96  return getResponsesFrom(Entities.getController(entity).getPath());
97  }
Here is the call graph for this function:

◆ getResponsesFromEntity() [2/2]

static List<Response> org.turro.entities.Students.getResponsesFromEntity ( String  entityPath)
static

Definition at line 99 of file Students.java.

99  {
100  WhereClause wc = new WhereClause();
101  wc.addClause("select r from Response r");
102  wc.addClause("where r.challenge.entityPath = :path");
103  wc.addNamedValue("path", entityPath);
104  return new StudentsPU().getResultList(wc);
105  }
Here is the call graph for this function:

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