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

Public Member Functions

 ConnectorAttribute (Connector attribute)
 
void addToContact (Contact contact)
 
String getAsString ()
 
Contact getContact ()
 
String getAttributeName ()
 
IAttribute generateAttributeAdapter (final Connector a)
 
- Public Member Functions inherited from org.turro.contacts.proposal.GenericAttribute< Connector >
 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< ConnectorgenerateRelated ()
 
- Protected Member Functions inherited from org.turro.contacts.proposal.GenericAttribute< Connector >
abstract List< A > generateRelated ()
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.contacts.proposal.GenericAttribute< Connector >
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 33 of file ConnectorAttribute.java.

Constructor & Destructor Documentation

◆ ConnectorAttribute()

org.turro.contacts.proposal.ConnectorAttribute.ConnectorAttribute ( Connector  attribute)

Definition at line 35 of file ConnectorAttribute.java.

35  {
36  super(attribute);
37  duplication = (IUser.CONNECTOR_EMAIL.equals(attribute.getDescription()) ||
38  IUser.CONNECTOR_TRADE.equals(attribute.getDescription()) ||
39  IUser.CONNECTOR_FISCAL.equals(attribute.getDescription())) ?
40  DuplicationType.NOT_ALLOWED :
41  DuplicationType.WARN_DUPLICATION;
42  }

Member Function Documentation

◆ addToContact()

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

Definition at line 55 of file ConnectorAttribute.java.

55  {
56  attribute.setContact(contact);
57  contact.getConnectors().add(attribute);
58  }
Here is the call graph for this function:

◆ generateAttributeAdapter()

IAttribute org.turro.contacts.proposal.ConnectorAttribute.generateAttributeAdapter ( final Connector  a)

Definition at line 76 of file ConnectorAttribute.java.

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

◆ generateRelated()

List<Connector> org.turro.contacts.proposal.ConnectorAttribute.generateRelated ( )
protected

Definition at line 45 of file ConnectorAttribute.java.

45  {
46  Dao dao = new ContactsPU();
47  WhereClause wc = new WhereClause();
48  wc.addClause("select connector from Connector as connector");
49  wc.addClause("where connector.value = :value");
50  wc.addNamedValue("value", attribute.getValue());
51  return dao.getResultList(wc);
52  }
Here is the call graph for this function:

◆ getAsString()

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

Definition at line 61 of file ConnectorAttribute.java.

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

◆ getAttributeName()

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

Definition at line 71 of file ConnectorAttribute.java.

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

◆ getContact()

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

Definition at line 66 of file ConnectorAttribute.java.

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

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