BrightSide Workbench Full Report + Source Code
org.turro.publication.entity.PublicationCategory Class Reference
Inheritance diagram for org.turro.publication.entity.PublicationCategory:
Collaboration diagram for org.turro.publication.entity.PublicationCategory:

Public Member Functions

String getDescription ()
 
void setDescription (String description)
 
Long getId ()
 
void setId (Long id)
 
String getName ()
 
void setName (String name)
 
boolean isPublishable ()
 
void setPublishable (boolean publishable)
 
String getConditionedBy ()
 
void setConditionedBy (String conditionedBy)
 
boolean isAvoidQueue ()
 
void setAvoidQueue (boolean avoidQueue)
 
Set< PublicationConstraintgetConstraints ()
 
void setConstraints (Set< PublicationConstraint > constraints)
 
boolean strongBond (ConstraintKeys keys)
 
boolean wideBond (ConstraintKeys keys)
 
boolean isRestricted ()
 
boolean isEmpty ()
 
NotificationConstraintSet getConstraintSet ()
 
List< PublicationgetPublications ()
 
Collection< PublicationSubscriptiongetSubscriptors ()
 
Collection< Long > getSubscriptorsId ()
 
Collection< PublicationBloggergetBloggers ()
 
Collection< Long > getBloggersId ()
 
boolean isBlogger (IContact contact)
 

Static Public Member Functions

static boolean isAnyBlogger (IContact contact)
 

Detailed Description

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

Definition at line 49 of file PublicationCategory.java.

Member Function Documentation

◆ getBloggers()

Collection<PublicationBlogger> org.turro.publication.entity.PublicationCategory.getBloggers ( )

Definition at line 180 of file PublicationCategory.java.

180  {
181  return new PublicationPU().getResultList(
182  "select ps from PublicationBlogger ps " +
183  "where ps.publicationCategory = ?",
184  new Object[] { this }
185  );
186  }

◆ getBloggersId()

Collection<Long> org.turro.publication.entity.PublicationCategory.getBloggersId ( )

Definition at line 188 of file PublicationCategory.java.

188  {
189  return new PublicationPU().getResultList(
190  "select ps.id from PublicationBlogger ps " +
191  "where ps.publicationCategory = ?",
192  new Object[] { this }
193  );
194  }

◆ getConditionedBy()

String org.turro.publication.entity.PublicationCategory.getConditionedBy ( )

Definition at line 103 of file PublicationCategory.java.

103  {
104  return conditionedBy;
105  }

◆ getConstraints()

Set<PublicationConstraint> org.turro.publication.entity.PublicationCategory.getConstraints ( )

Definition at line 119 of file PublicationCategory.java.

119  {
120  return constraints;
121  }
Here is the caller graph for this function:

◆ getConstraintSet()

NotificationConstraintSet org.turro.publication.entity.PublicationCategory.getConstraintSet ( )

Definition at line 147 of file PublicationCategory.java.

147  {
148  return new NotificationConstraintSet(getConstraints().stream()
149  .map(c -> new NotificationConstraint(c.getKeyId(), c.isOptional()))
150  .collect(Collectors.toCollection(HashSet::new)));
151  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDescription()

String org.turro.publication.entity.PublicationCategory.getDescription ( )

Definition at line 71 of file PublicationCategory.java.

71  {
72  return description;
73  }

◆ getId()

Long org.turro.publication.entity.PublicationCategory.getId ( )

Definition at line 79 of file PublicationCategory.java.

79  {
80  return id;
81  }
Here is the caller graph for this function:

◆ getName()

String org.turro.publication.entity.PublicationCategory.getName ( )

Definition at line 87 of file PublicationCategory.java.

87  {
88  return name;
89  }
Here is the caller graph for this function:

◆ getPublications()

List<Publication> org.turro.publication.entity.PublicationCategory.getPublications ( )

Definition at line 153 of file PublicationCategory.java.

153  {
154  WhereClause wc = new WhereClause();
155  wc.addClause("select d from Publication d");
156  wc.addClause("where d.publicationCategory = :category");
157  wc.addNamedValue("category", this);
158  Dao dao = new PublicationPU();
159  return dao.getResultList(Publication.class, wc);
160  }
Here is the call graph for this function:

◆ getSubscriptors()

Collection<PublicationSubscription> org.turro.publication.entity.PublicationCategory.getSubscriptors ( )

Definition at line 163 of file PublicationCategory.java.

163  {
164  return new PublicationPU().getResultList(
165  "select ps from PublicationSubscription ps " +
166  "where ps.publicationCategory = ?",
167  new Object[] { this }
168  );
169  }

◆ getSubscriptorsId()

Collection<Long> org.turro.publication.entity.PublicationCategory.getSubscriptorsId ( )

Definition at line 172 of file PublicationCategory.java.

172  {
173  return new PublicationPU().getResultList(
174  "select ps.id from PublicationSubscription ps " +
175  "where ps.publicationCategory = ?",
176  new Object[] { this }
177  );
178  }

◆ isAnyBlogger()

static boolean org.turro.publication.entity.PublicationCategory.isAnyBlogger ( IContact  contact)
static

Definition at line 205 of file PublicationCategory.java.

205  {
206  return new PublicationPU().getSingleResultOrNull(
207  "select distinct ps.idContact from PublicationBlogger ps " +
208  "where ps.idContact = ?",
209  new Object[] { contact.getId() }
210  ) != null;
211  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAvoidQueue()

boolean org.turro.publication.entity.PublicationCategory.isAvoidQueue ( )

Definition at line 111 of file PublicationCategory.java.

111  {
112  return avoidQueue;
113  }
Here is the caller graph for this function:

◆ isBlogger()

boolean org.turro.publication.entity.PublicationCategory.isBlogger ( IContact  contact)

Definition at line 196 of file PublicationCategory.java.

196  {
197  return new PublicationPU().getSingleResultOrNull(
198  "select ps from PublicationBlogger ps " +
199  "where ps.idContact = ? " +
200  "and ps.publicationCategory = ?",
201  new Object[] { contact.getId(), this }
202  ) != null;
203  }
Here is the call graph for this function:

◆ isEmpty()

boolean org.turro.publication.entity.PublicationCategory.isEmpty ( )

Helpers

Definition at line 143 of file PublicationCategory.java.

143  {
144  return Strings.isBlank(name);
145  }

◆ isPublishable()

boolean org.turro.publication.entity.PublicationCategory.isPublishable ( )

Definition at line 95 of file PublicationCategory.java.

95  {
96  return publishable;
97  }

◆ isRestricted()

boolean org.turro.publication.entity.PublicationCategory.isRestricted ( )

Definition at line 137 of file PublicationCategory.java.

Here is the call graph for this function:

◆ setAvoidQueue()

void org.turro.publication.entity.PublicationCategory.setAvoidQueue ( boolean  avoidQueue)

Definition at line 115 of file PublicationCategory.java.

115  {
116  this.avoidQueue = avoidQueue;
117  }

◆ setConditionedBy()

void org.turro.publication.entity.PublicationCategory.setConditionedBy ( String  conditionedBy)

Definition at line 107 of file PublicationCategory.java.

107  {
108  this.conditionedBy = conditionedBy;
109  }

◆ setConstraints()

void org.turro.publication.entity.PublicationCategory.setConstraints ( Set< PublicationConstraint constraints)

Definition at line 123 of file PublicationCategory.java.

123  {
124  this.constraints = constraints;
125  }

◆ setDescription()

void org.turro.publication.entity.PublicationCategory.setDescription ( String  description)

Definition at line 75 of file PublicationCategory.java.

75  {
76  this.description = description;
77  }

◆ setId()

void org.turro.publication.entity.PublicationCategory.setId ( Long  id)

Definition at line 83 of file PublicationCategory.java.

83  {
84  this.id = id;
85  }

◆ setName()

void org.turro.publication.entity.PublicationCategory.setName ( String  name)

Definition at line 91 of file PublicationCategory.java.

91  {
92  this.name = name;
93  }

◆ setPublishable()

void org.turro.publication.entity.PublicationCategory.setPublishable ( boolean  publishable)

Definition at line 99 of file PublicationCategory.java.

99  {
100  this.publishable = publishable;
101  }

◆ strongBond()

boolean org.turro.publication.entity.PublicationCategory.strongBond ( ConstraintKeys  keys)

Definition at line 129 of file PublicationCategory.java.

129  {
130  return getConstraintSet().strongBond(keys);
131  }
Here is the call graph for this function:

◆ wideBond()

boolean org.turro.publication.entity.PublicationCategory.wideBond ( ConstraintKeys  keys)

Definition at line 133 of file PublicationCategory.java.

133  {
134  return getConstraintSet().wideBond(keys);
135  }
Here is the call graph for this function:

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