BrightSide Workbench Full Report + Source Code
org.turro.activity.PublicationParticipationCatcher Class Reference
Inheritance diagram for org.turro.activity.PublicationParticipationCatcher:
Collaboration diagram for org.turro.activity.PublicationParticipationCatcher:

Public Member Functions

String getDescription ()
 
Dao createDao ()
 
WhereClause getQuery (Path entityPath)
 
boolean getCanDelete (Publication v)
 
String getDescription (Publication v)
 
void doDelete (Publication v)
 
void doShow (Publication v)
 
void onChange (Object entity)
 
void onDelete (Object entity)
 
boolean getCanChangeFor (Publication v)
 
void doChangeFor (Publication v, Path toPath)
 
Object getReferringEntity (Publication v)
 
- Public Member Functions inherited from org.turro.activity.JpaParticipationCatcher< Publication >
List< IParticipationgetParticipations (Path entityPath)
 
Dao getDao ()
 
abstract Dao createDao ()
 
abstract WhereClause getQuery (Path entityPath)
 
abstract boolean getCanDelete (V v)
 
abstract boolean getCanChangeFor (V v)
 
abstract String getDescription (V v)
 
abstract void doDelete (V v)
 
abstract void doShow (V v)
 
abstract void doChangeFor (V v, Path toPath)
 
abstract Object getReferringEntity (V v)
 

Detailed Description

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

Definition at line 34 of file PublicationParticipationCatcher.java.

Member Function Documentation

◆ createDao()

Dao org.turro.activity.PublicationParticipationCatcher.createDao ( )

Definition at line 42 of file PublicationParticipationCatcher.java.

42  {
43  return new PublicationPU();
44  }

◆ doChangeFor()

void org.turro.activity.PublicationParticipationCatcher.doChangeFor ( Publication  v,
Path  toPath 
)

Definition at line 97 of file PublicationParticipationCatcher.java.

97  {
98  if(v != null && !toPath.isRoot() && "contact".equals(toPath.getRoot())) {
99  WhereClause wc = new WhereClause();
100  wc.addClause("update Publication");
101  wc.addClause("set idContact = :to");
102  wc.addClause("where idContact = :from");
103  wc.addNamedValue("to", toPath.getLastNode());
104  wc.addNamedValue("from", v.getIdContact());
105  getDao().executeUpdate(wc);
106  }
107  }
int executeUpdate(String query)
Definition: Dao.java:463
Here is the call graph for this function:

◆ doDelete()

void org.turro.activity.PublicationParticipationCatcher.doDelete ( Publication  v)

Definition at line 69 of file PublicationParticipationCatcher.java.

69  {
70  getDao().deleteObject(v);
71  }
void deleteObject(Object obj)
Definition: Dao.java:162
Here is the call graph for this function:

◆ doShow()

void org.turro.activity.PublicationParticipationCatcher.doShow ( Publication  v)

Definition at line 74 of file PublicationParticipationCatcher.java.

74  {
75  PublicationMenu.showPublication(v.getId());
76  }
Here is the call graph for this function:

◆ getCanChangeFor()

boolean org.turro.activity.PublicationParticipationCatcher.getCanChangeFor ( Publication  v)

Definition at line 92 of file PublicationParticipationCatcher.java.

92  {
93  return true;
94  }

◆ getCanDelete()

boolean org.turro.activity.PublicationParticipationCatcher.getCanDelete ( Publication  v)

Definition at line 59 of file PublicationParticipationCatcher.java.

59  {
60  return false;
61  }

◆ getDescription() [1/2]

String org.turro.activity.PublicationParticipationCatcher.getDescription ( )

Definition at line 37 of file PublicationParticipationCatcher.java.

37  {
38  return "BrightSide Publications - " + I_.get("Author");
39  }
Here is the call graph for this function:

◆ getDescription() [2/2]

String org.turro.activity.PublicationParticipationCatcher.getDescription ( Publication  v)

Definition at line 64 of file PublicationParticipationCatcher.java.

64  {
65  return v.getTitle();
66  }
Here is the call graph for this function:

◆ getQuery()

WhereClause org.turro.activity.PublicationParticipationCatcher.getQuery ( Path  entityPath)

Definition at line 47 of file PublicationParticipationCatcher.java.

47  {
48  if(!entityPath.isRoot() && "contact".equals(entityPath.getRoot())) {
49  WhereClause wc = new WhereClause();
50  wc.addClause("select distinct publication from Publication as publication");
51  wc.addClause("where publication.idContact = :id");
52  wc.addNamedValue("id", entityPath.getLastNode());
53  return wc;
54  }
55  return null;
56  }
Here is the call graph for this function:

◆ getReferringEntity()

Object org.turro.activity.PublicationParticipationCatcher.getReferringEntity ( Publication  v)

Definition at line 110 of file PublicationParticipationCatcher.java.

110  {
111  return v;
112  }

◆ onChange()

void org.turro.activity.PublicationParticipationCatcher.onChange ( Object  entity)

Definition at line 79 of file PublicationParticipationCatcher.java.

79  {
80  if(entity instanceof IContact) {
81  IContact contact = (IContact) entity;
82  // do nothing
83  }
84  }

◆ onDelete()

void org.turro.activity.PublicationParticipationCatcher.onDelete ( Object  entity)

Definition at line 87 of file PublicationParticipationCatcher.java.

87  {
88  // do nothing
89  }

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