BrightSide Workbench Full Report + Source Code
org.turro.contacts.util.LoadLogged Class Reference

Public Member Functions

 LoadLogged (Application app)
 
String getId ()
 
Contact getContact ()
 

Detailed Description

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

Definition at line 33 of file LoadLogged.java.

Constructor & Destructor Documentation

◆ LoadLogged()

org.turro.contacts.util.LoadLogged.LoadLogged ( Application  app)

Definition at line 37 of file LoadLogged.java.

37  {
38  Dao dao = new ContactsPU();
39  try {
40  Query q = dao.createNamedQuery("contactByLogin");
41  q.setParameter("login", app.getConstructor().getUser().getId());
42  contact = (Contact) q.getSingleResult();
43  if(contact != null) {
44  app.getHttpServletRequest().setAttribute("name", contact.getName());
45  app.getHttpServletRequest().setAttribute("email", getConnector(contact, IUser.CONNECTOR_EMAIL));
46  app.getHttpServletRequest().setAttribute("emailLogin", getConnector(contact, IUser.CONNECTOR_EMAIL_LOGIN));
47  }
48  } finally {
49  dao.close();
50  }
51  }
void setAttribute(String key, Object value)
Definition: Contact.java:542
Here is the call graph for this function:

Member Function Documentation

◆ getContact()

Contact org.turro.contacts.util.LoadLogged.getContact ( )

Definition at line 57 of file LoadLogged.java.

57  {
58  return contact;
59  }

◆ getId()

String org.turro.contacts.util.LoadLogged.getId ( )

Definition at line 53 of file LoadLogged.java.

53  {
54  return contact != null ? contact.getId() : null;
55  }
Here is the call graph for this function:

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