BrightSide Workbench Full Report + Source Code
org.turro.contacts.service.ContactServiceWrapper Class Reference
Inheritance diagram for org.turro.contacts.service.ContactServiceWrapper:
Collaboration diagram for org.turro.contacts.service.ContactServiceWrapper:

Public Member Functions

 ContactServiceWrapper (ContactService entity)
 
String getTabLabel ()
 
String getSelfLabel ()
 
String getTooltiptext ()
 
boolean isAuthor ()
 
ContactService save ()
 
- 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)
 
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 34 of file ContactServiceWrapper.java.

Constructor & Destructor Documentation

◆ ContactServiceWrapper()

org.turro.contacts.service.ContactServiceWrapper.ContactServiceWrapper ( ContactService  entity)

Definition at line 36 of file ContactServiceWrapper.java.

36  {
37  super(entity);
38  }

Member Function Documentation

◆ createDao()

Dao org.turro.contacts.service.ContactServiceWrapper.createDao ( )
protected

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

Definition at line 41 of file ContactServiceWrapper.java.

41  {
42  return new ContactsPU();
43  }

◆ getSelfLabel()

String org.turro.contacts.service.ContactServiceWrapper.getSelfLabel ( )

Definition at line 49 of file ContactServiceWrapper.java.

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

◆ getTabLabel()

String org.turro.contacts.service.ContactServiceWrapper.getTabLabel ( )

Definition at line 45 of file ContactServiceWrapper.java.

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

◆ getTooltiptext()

String org.turro.contacts.service.ContactServiceWrapper.getTooltiptext ( )

Definition at line 53 of file ContactServiceWrapper.java.

53  {
54  try {
55  return entity.getTitle();
56  } catch(Exception ex) {
57  return null;
58  }
59  }

◆ isAuthor()

boolean org.turro.contacts.service.ContactServiceWrapper.isAuthor ( )

Definition at line 61 of file ContactServiceWrapper.java.

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

◆ save()

ContactService org.turro.contacts.service.ContactServiceWrapper.save ( )

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

Definition at line 67 of file ContactServiceWrapper.java.

67  {
68  if(entity.getCreation() == null) {
69  entity.setCreation(new Date());
70  }
71  return super.save();
72  }
Here is the caller graph for this function:

◆ shouldLog()

boolean org.turro.contacts.service.ContactServiceWrapper.shouldLog ( )
protected

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

Definition at line 75 of file ContactServiceWrapper.java.

75  {
76  return false;
77  }

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