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

Public Member Functions

String getDescription ()
 
Dao createDao ()
 
WhereClause getQuery (Path entityPath)
 
boolean getCanDelete (Sendable v)
 
String getDescription (Sendable v)
 
void doDelete (Sendable v)
 
void doShow (Sendable v)
 
void onChange (Object entity)
 
void onDelete (Object entity)
 
boolean getCanChangeFor (Sendable v)
 
void doChangeFor (Sendable v, Path toPath)
 
Object getReferringEntity (Sendable v)
 
- Public Member Functions inherited from org.turro.activity.JpaParticipationCatcher< Sendable >
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 33 of file SendableActivityCatcher.java.

Member Function Documentation

◆ createDao()

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

Definition at line 41 of file SendableActivityCatcher.java.

41  {
42  return new ElephantPU();
43  }

◆ doChangeFor()

void org.turro.activity.SendableActivityCatcher.doChangeFor ( Sendable  v,
Path  toPath 
)

Definition at line 93 of file SendableActivityCatcher.java.

93  {
94  if(v != null && !toPath.isRoot()) {
95  WhereClause wc = new WhereClause();
96  wc.addClause("update Sendable");
97  wc.addClause("set entityPath = :to");
98  wc.addClause("where entityPath = :from");
99  wc.addNamedValue("to", toPath.getPath());
100  wc.addNamedValue("from", v.getEntityPath());
101  getDao().executeUpdate(wc);
102  }
103  }
int executeUpdate(String query)
Definition: Dao.java:463
Here is the call graph for this function:

◆ doDelete()

void org.turro.activity.SendableActivityCatcher.doDelete ( Sendable  v)

Definition at line 68 of file SendableActivityCatcher.java.

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

◆ doShow()

void org.turro.activity.SendableActivityCatcher.doShow ( Sendable  v)

Definition at line 73 of file SendableActivityCatcher.java.

73  {
74  // do nothing
75  }

◆ getCanChangeFor()

boolean org.turro.activity.SendableActivityCatcher.getCanChangeFor ( Sendable  v)

Definition at line 88 of file SendableActivityCatcher.java.

88  {
89  return true;
90  }

◆ getCanDelete()

boolean org.turro.activity.SendableActivityCatcher.getCanDelete ( Sendable  v)

Definition at line 58 of file SendableActivityCatcher.java.

58  {
59  return true;
60  }

◆ getDescription() [1/2]

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

Definition at line 36 of file SendableActivityCatcher.java.

36  {
37  return "Sendable";
38  }

◆ getDescription() [2/2]

String org.turro.activity.SendableActivityCatcher.getDescription ( Sendable  v)

Definition at line 63 of file SendableActivityCatcher.java.

63  {
64  return v != null ? DateFormats.format(v.getSchedule(), "MEDIUM", Application.getUsedLocale()) : "";
65  }
Here is the call graph for this function:

◆ getQuery()

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

Definition at line 46 of file SendableActivityCatcher.java.

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

◆ getReferringEntity()

Object org.turro.activity.SendableActivityCatcher.getReferringEntity ( Sendable  v)

Definition at line 106 of file SendableActivityCatcher.java.

106  {
107  return v.getEntity();
108  }
Here is the call graph for this function:

◆ onChange()

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

Definition at line 78 of file SendableActivityCatcher.java.

78  {
79  // do nothing
80  }

◆ onDelete()

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

Definition at line 83 of file SendableActivityCatcher.java.

83  {
84  // do nothing
85  }

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