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

Public Member Functions

 PublicationWrapper (Publication entity)
 
String getTabLabel ()
 
String getSelfLabel ()
 
String getTooltiptext ()
 
boolean isAuthor ()
 
Publication 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 35 of file PublicationWrapper.java.

Constructor & Destructor Documentation

◆ PublicationWrapper()

org.turro.publication.util.PublicationWrapper.PublicationWrapper ( Publication  entity)

Definition at line 37 of file PublicationWrapper.java.

37  {
38  super(entity);
39  }

Member Function Documentation

◆ createDao()

Dao org.turro.publication.util.PublicationWrapper.createDao ( )
protected

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

Definition at line 42 of file PublicationWrapper.java.

42  {
43  return new PublicationPU();
44  }

◆ getSelfLabel()

String org.turro.publication.util.PublicationWrapper.getSelfLabel ( )

Definition at line 50 of file PublicationWrapper.java.

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

◆ getTabLabel()

String org.turro.publication.util.PublicationWrapper.getTabLabel ( )

Definition at line 46 of file PublicationWrapper.java.

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

◆ getTooltiptext()

String org.turro.publication.util.PublicationWrapper.getTooltiptext ( )

Definition at line 54 of file PublicationWrapper.java.

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

◆ isAuthor()

boolean org.turro.publication.util.PublicationWrapper.isAuthor ( )

Definition at line 62 of file PublicationWrapper.java.

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

◆ save()

Publication org.turro.publication.util.PublicationWrapper.save ( )

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

Definition at line 68 of file PublicationWrapper.java.

68  {
69  super.save();
70  if(entity.getId() != null && entity.isAccepted() && !EntityWebUrls.existsEntity("/publication/" + entity.getId())) {
71  EntityWebUrls.addWebUrl(
72  "/publication/" + entity.getId(),
73  "/" + entity.getId() + "/" + Strings.unpunctuate(entity.getTitle()).toLowerCase());
74  }
75  return entity;
76  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ shouldLog()

boolean org.turro.publication.util.PublicationWrapper.shouldLog ( )
protected

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

Definition at line 79 of file PublicationWrapper.java.

79  {
80  return false;
81  }

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