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

Public Member Functions

Set< IContactRelationgetCoworkerRelations ()
 
- Public Member Functions inherited from org.turro.plugin.contacts.AbstractRelations
IRelations date (Date date)
 
IRelations outer ()
 
IRelations company ()
 
IRelations staff ()
 
IContact getCompany ()
 
Optional< IContactgetOptCompany ()
 
IContactRelation getCompanyRelation ()
 
Optional< IContactRelationgetOptCompanyRelation ()
 
List< IContactgetCompanies ()
 
Set< IContactRelationgetCompanyRelations ()
 
List< IContactgetCoworkers ()
 
List< IContactgetWorkers ()
 
Set< IContactRelationgetWorkerRelations ()
 
List< IContactgetDocents ()
 
List< IContactRelationgetDocentRelations ()
 
List< IContactgetStudents ()
 
List< IContactRelationgetStudentRelations ()
 
boolean inStaff (IContact worker)
 
Set< IContactRelationgetCurrent ()
 
Set< IContactRelationgetOutdated ()
 

Static Public Member Functions

static boolean inStaff (IContact company, IContact worker)
 
static Relations companies (IContact contact)
 
static Relations staff (IContact contact)
 

Protected Member Functions

Relations load ()
 
- Protected Member Functions inherited from org.turro.plugin.contacts.AbstractRelations
 AbstractRelations (IContact contact, boolean asWorker)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.plugin.contacts.AbstractRelations
final IContact contact
 
Date date
 
boolean outer
 

Detailed Description

Member Function Documentation

◆ companies()

static Relations org.turro.contacts.relation.Relations.companies ( IContact  contact)
static

Definition at line 81 of file BrightSide/contacts/src/main/java/org/turro/contacts/relation/Relations.java.

81  {
82  return new Relations(contact, true);
83  }
Here is the caller graph for this function:

◆ getCoworkerRelations()

Set<IContactRelation> org.turro.contacts.relation.Relations.getCoworkerRelations ( )

Reimplemented from org.turro.plugin.contacts.AbstractRelations.

Definition at line 49 of file BrightSide/contacts/src/main/java/org/turro/contacts/relation/Relations.java.

49  {
50  if(asWorker) {
51  return new TreeSet(getCurrent().stream()
52  .flatMap(r -> Relations.staff(r.getRelatedIContact()).getWorkerRelations().stream())
53  .toList());
54  }
55  return Collections.EMPTY_SET;
56  }
Here is the call graph for this function:

◆ inStaff()

static boolean org.turro.contacts.relation.Relations.inStaff ( IContact  company,
IContact  worker 
)
static

Definition at line 42 of file BrightSide/contacts/src/main/java/org/turro/contacts/relation/Relations.java.

42  {
43  return Relations.staff(company).inStaff(worker);
44  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load()

Relations org.turro.contacts.relation.Relations.load ( )
protected

Reimplemented from org.turro.plugin.contacts.AbstractRelations.

Definition at line 61 of file BrightSide/contacts/src/main/java/org/turro/contacts/relation/Relations.java.

61  {
62  if(isEmpty()) {
63  if(baseContact != null) {
64  for(BusinessRelation br : asWorker ? baseContact.getBusinessRelations() : baseContact.getWorkerRelations()) {
65  add(new ContactRelationAdapter(asWorker, br));
66  }
67  }
68  if(outer) {
69  for(IContactRelation cr : ContactRelations.getRelations(contact.getId(), ContactRelations.MODE_OUTER)) {
70  if(cr.getStrong() && asWorker == cr.asWorker()) {
71  add(cr);
72  }
73  }
74  }
75  }
76  return this;
77  }
Set< BusinessRelation > getBusinessRelations()
Definition: Contact.java:379
Set< BusinessRelation > getWorkerRelations()
Definition: Contact.java:391
Here is the call graph for this function:

◆ staff()

static Relations org.turro.contacts.relation.Relations.staff ( IContact  contact)
static

Definition at line 85 of file BrightSide/contacts/src/main/java/org/turro/contacts/relation/Relations.java.

85  {
86  return new Relations(contact, false);
87  }
Here is the caller graph for this function:

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