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

Public Member Functions

 NameAttribute (Contact attribute)
 
void addToContact (Contact contact)
 
String getAsString ()
 
Contact getContact ()
 
String getAttributeName ()
 
IAttribute generateAttributeAdapter (final Contact a)
 
- Public Member Functions inherited from org.turro.contacts.proposal.GenericAttribute< Contact >
 GenericAttribute (A attribute)
 
boolean isActive ()
 
void setActive (boolean active)
 
getValue ()
 
List< IAttributegetRelated ()
 
void checkActive (Contact destination)
 
abstract void addToContact (Contact contact)
 
abstract String getAsString ()
 
abstract Contact getContact ()
 
abstract String getAttributeName ()
 
abstract IAttribute generateAttributeAdapter (A a)
 

Protected Member Functions

List< ContactgenerateRelated ()
 
- Protected Member Functions inherited from org.turro.contacts.proposal.GenericAttribute< Contact >
abstract List< A > generateRelated ()
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.contacts.proposal.GenericAttribute< Contact >
attribute
 
transient List< IAttributerelated
 
DuplicationType duplication
 
boolean active
 

Detailed Description

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

Definition at line 32 of file NameAttribute.java.

Constructor & Destructor Documentation

◆ NameAttribute()

org.turro.contacts.proposal.NameAttribute.NameAttribute ( Contact  attribute)

Member Function Documentation

◆ addToContact()

void org.turro.contacts.proposal.NameAttribute.addToContact ( Contact  contact)

Definition at line 55 of file NameAttribute.java.

55  {
56  contact.setName(attribute.getName());
57  contact.getComplexName().setFull(attribute.getName());
58  }
Here is the call graph for this function:

◆ generateAttributeAdapter()

IAttribute org.turro.contacts.proposal.NameAttribute.generateAttributeAdapter ( final Contact  a)

Definition at line 76 of file NameAttribute.java.

76  {
77  return new IAttribute() {
78 
79  @Override
80  public String getAsString() {
81  return a.getName();
82  }
83 
84  @Override
85  public Contact getContact() {
86  return a;
87  }
88 
89  @Override
90  public Object getValue() {
91  return a;
92  }
93  };
94  }
Here is the call graph for this function:

◆ generateRelated()

List<Contact> org.turro.contacts.proposal.NameAttribute.generateRelated ( )
protected

Definition at line 40 of file NameAttribute.java.

40  {
41  ContactsPU cpu = new ContactsPU();
42  List<Contact> list = new ArrayList<Contact>();
43  NamesMap nm = new NamesMap();
44  Map<String, NameEntry> names = nm.getCoincidences(attribute.getName());
45  for(NameEntry ne : names.values()) {
46  Contact c = cpu.find(Contact.class, ne.getId());
47  if(c != null) {
48  list.add(c);
49  }
50  }
51  return list;
52  }
Here is the call graph for this function:

◆ getAsString()

String org.turro.contacts.proposal.NameAttribute.getAsString ( )

Definition at line 61 of file NameAttribute.java.

61  {
62  return attribute.getName();
63  }
Here is the caller graph for this function:

◆ getAttributeName()

String org.turro.contacts.proposal.NameAttribute.getAttributeName ( )

Definition at line 71 of file NameAttribute.java.

71  {
72  return I_.get("Name");
73  }
Here is the call graph for this function:

◆ getContact()

Contact org.turro.contacts.proposal.NameAttribute.getContact ( )

Definition at line 66 of file NameAttribute.java.

66  {
67  return attribute;
68  }
Here is the caller graph for this function:

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