BrightSide Workbench Full Report + Source Code
org.turro.students.wrappers.ChallengeWrapper Class Reference
Inheritance diagram for org.turro.students.wrappers.ChallengeWrapper:
Collaboration diagram for org.turro.students.wrappers.ChallengeWrapper:

Public Member Functions

 ChallengeWrapper (Challenge entity)
 
String getTabLabel ()
 
String getSelfLabel ()
 
String getTooltiptext ()
 
boolean isAuthor ()
 
- Public Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
 DaoEntity ()
 
 DaoEntity (Class< T > persistentClass)
 
 DaoEntity (T entity)
 
Dao getDao ()
 
getEntity ()
 
IElephantEntity getIee ()
 
find (ID id)
 
save ()
 
boolean delete ()
 
ID getId ()
 
List< String > getMessages ()
 
boolean canDelete ()
 
boolean canSave ()
 
boolean equals (Object obj)
 
int hashCode ()
 

Protected Member Functions

Dao createDao ()
 
boolean shouldLog ()
 
- Protected Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
void logEntity (SystemLogType logType, Object entity, String action, String data)
 
String dataEntity (Object entity)
 
void initOperation ()
 
void addMessage (String message)
 

Additional Inherited Members

- Static Public Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
static Object getEntityId (Object entity)
 
static boolean isNewId (Object id)
 
- Protected Attributes inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
entity
 
ID id
 
List< String > messages = new ArrayList<>()
 

Detailed Description

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

Definition at line 33 of file ChallengeWrapper.java.

Constructor & Destructor Documentation

◆ ChallengeWrapper()

org.turro.students.wrappers.ChallengeWrapper.ChallengeWrapper ( Challenge  entity)

Definition at line 35 of file ChallengeWrapper.java.

35  {
36  super(entity);
37  }

Member Function Documentation

◆ createDao()

Dao org.turro.students.wrappers.ChallengeWrapper.createDao ( )
protected

Reimplemented from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >.

Definition at line 40 of file ChallengeWrapper.java.

40  {
41  return new StudentsPU();
42  }

◆ getSelfLabel()

String org.turro.students.wrappers.ChallengeWrapper.getSelfLabel ( )

Definition at line 48 of file ChallengeWrapper.java.

48  {
49  return I_.get("Challenge");
50  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTabLabel()

String org.turro.students.wrappers.ChallengeWrapper.getTabLabel ( )

Definition at line 44 of file ChallengeWrapper.java.

44  {
45  return getSelfLabel() + " #" + (entity.getId() == null ? "" : entity.getId());
46  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTooltiptext()

String org.turro.students.wrappers.ChallengeWrapper.getTooltiptext ( )

Definition at line 52 of file ChallengeWrapper.java.

52  {
53  try {
54  return entity.getQuestion();
55  } catch(Exception ex) {
56  return null;
57  }
58  }
Here is the caller graph for this function:

◆ isAuthor()

boolean org.turro.students.wrappers.ChallengeWrapper.isAuthor ( )

Definition at line 60 of file ChallengeWrapper.java.

60  {
61  IContact contact = Authentication.getIContact();
62  return contact != null && contact.isValid() && contact.getId().equals(entity.getIdChallenger());
63  }
Here is the call graph for this function:

◆ shouldLog()

boolean org.turro.students.wrappers.ChallengeWrapper.shouldLog ( )
protected

Reimplemented from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >.

Definition at line 66 of file ChallengeWrapper.java.

66  {
67  return false;
68  }

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