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

Public Member Functions

 ContactGroup (Object object)
 
boolean isRole ()
 
void setRole (boolean role)
 
String getRealValue ()
 
ContactGroup setRealValue (String value)
 
Object getObject ()
 
void setObject (Object value)
 
String getObjectString ()
 
Object getValue ()
 

Detailed Description

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

Definition at line 29 of file ContactGroup.java.

Constructor & Destructor Documentation

◆ ContactGroup()

org.turro.contacts.util.ContactGroup.ContactGroup ( Object  object)

Definition at line 38 of file ContactGroup.java.

38  {
39  setObject(object);
40  }
Here is the call graph for this function:

Member Function Documentation

◆ getObject()

Object org.turro.contacts.util.ContactGroup.getObject ( )

Definition at line 65 of file ContactGroup.java.

65  {
66  if(isRole()) {
67  return (String) value;
68  }
69  else {
70  if(value == null) return null;
71  return new ContactsPU().find(Contact.class, value);
72  }
73  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getObjectString()

String org.turro.contacts.util.ContactGroup.getObjectString ( )

Definition at line 86 of file ContactGroup.java.

86  {
87  if(isRole()) {
88  return (String) value;
89  }
90  else {
91  Contact o = (Contact) getObject();
92  if(o == null) return null;
93  return o.getName();
94  }
95  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRealValue()

String org.turro.contacts.util.ContactGroup.getRealValue ( )

Definition at line 50 of file ContactGroup.java.

50  {
51  if(Strings.isEmpty(value)) return null;
52  return (isRole() ? "*R*" : "") + value;
53  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getValue()

Object org.turro.contacts.util.ContactGroup.getValue ( )

Definition at line 97 of file ContactGroup.java.

97  {
98  return getObjectString();
99  }
Here is the call graph for this function:

◆ isRole()

boolean org.turro.contacts.util.ContactGroup.isRole ( )

Definition at line 42 of file ContactGroup.java.

42  {
43  return role;
44  }
Here is the caller graph for this function:

◆ setObject()

void org.turro.contacts.util.ContactGroup.setObject ( Object  value)

Definition at line 75 of file ContactGroup.java.

75  {
76  if(value instanceof Contact) {
77  this.value = ((Contact) value).getId();
78  setRole(false);
79  }
80  else {
81  this.value = (String) value;
82  setRole(true);
83  }
84  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRealValue()

ContactGroup org.turro.contacts.util.ContactGroup.setRealValue ( String  value)

Definition at line 55 of file ContactGroup.java.

55  {
56  role = false;
57  if(value != null && value.startsWith("*R*")) {
58  role = true;
59  value = value.substring(3);
60  }
61  this.value = value;
62  return this;
63  }
Here is the caller graph for this function:

◆ setRole()

void org.turro.contacts.util.ContactGroup.setRole ( boolean  role)

Definition at line 46 of file ContactGroup.java.

46  {
47  this.role = role;
48  }
Here is the caller graph for this function:

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