BrightSide Workbench Full Report + Source Code
org.turro.contacts.relation.FuzzyRelationTypes Class Reference

Static Public Member Functions

static boolean isWorker (BusinessRelation relation)
 
static void isWorker (WhereClause wc, String separator, String relationField)
 
static boolean isProfessional (BusinessRelation relation)
 
static void isProfessional (WhereClause wc, String separator, String relationField)
 
static boolean isEducator (BusinessRelation relation)
 
static void isEducator (WhereClause wc, String separator, String relationField)
 
static boolean isStudent (BusinessRelation relation)
 
static void isStudent (WhereClause wc, String separator, String relationField)
 
static boolean isStaff (BusinessRelation relation)
 
static boolean isResponsible (BusinessRelation relation)
 
static boolean isHHRR (BusinessRelation relation)
 
static void isHHRR (WhereClause wc, String separator, String relationField)
 
static void isSingleton (WhereClause wc, String separator, String contactField, String relationField)
 
static void isTyped (WhereClause wc, String separator, String relationField)
 
static void isJuridical (WhereClause wc, String separator, String relationField)
 
static void isNatural (WhereClause wc, String separator, String relationField)
 

Detailed Description

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

Definition at line 30 of file FuzzyRelationTypes.java.

Member Function Documentation

◆ isEducator() [1/2]

static boolean org.turro.contacts.relation.FuzzyRelationTypes.isEducator ( BusinessRelation  relation)
static

Definition at line 54 of file FuzzyRelationTypes.java.

54  {
55  return !relation.isEmpty() && (
56  (ContactType.CONTACT_LEARNINGCENTER.equals(relation.getBusiness().getType()) &&
57  !RelationType.REL_STAFF.getRelationKey().equals(relation.getRelationType())));
58  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEducator() [2/2]

static void org.turro.contacts.relation.FuzzyRelationTypes.isEducator ( WhereClause  wc,
String  separator,
String  relationField 
)
static

Definition at line 60 of file FuzzyRelationTypes.java.

60  {
61  wc.addClause(separator + " (");
62  wc.addClause(relationField + ".business.type = :stype");
63  wc.addNamedValue("stype", ContactType.CONTACT_LEARNINGCENTER);
64  wc.addClause("and " + relationField +".relationType <> :brtype");
65  wc.addNamedValue("brtype", RelationType.REL_STAFF.getRelationKey());
66  wc.addClause(")");
67  }
Here is the call graph for this function:

◆ isHHRR() [1/2]

static boolean org.turro.contacts.relation.FuzzyRelationTypes.isHHRR ( BusinessRelation  relation)
static

Definition at line 98 of file FuzzyRelationTypes.java.

98  {
99  return !relation.isEmpty() &&
100  (ContactType.CONTACT_COMPANY.equals(relation.getBusiness().getType()) ||
101  ContactType.CONTACT_LEARNINGCENTER.equals(relation.getBusiness().getType())) &&
102  RelationType.REL_HHRR.getRelationKey().equals(relation.getRelationType());
103  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isHHRR() [2/2]

static void org.turro.contacts.relation.FuzzyRelationTypes.isHHRR ( WhereClause  wc,
String  separator,
String  relationField 
)
static

Definition at line 105 of file FuzzyRelationTypes.java.

105  {
106  wc.addClause(separator + " ((");
107  wc.addClause(relationField + ".business.type = :stype");
108  wc.addNamedValue("stype", ContactType.CONTACT_LEARNINGCENTER);
109  wc.addClause("or " + relationField + ".business.type = :ctype");
110  wc.addNamedValue("stype", ContactType.CONTACT_COMPANY);
111  wc.addClause(")");
112  wc.addClause("and " + relationField +".relationType = :brtype");
113  wc.addNamedValue("brtype", RelationType.REL_HHRR.getRelationKey());
114  wc.addClause(")");
115  }
Here is the call graph for this function:

◆ isJuridical()

static void org.turro.contacts.relation.FuzzyRelationTypes.isJuridical ( WhereClause  wc,
String  separator,
String  relationField 
)
static

Definition at line 138 of file FuzzyRelationTypes.java.

138  {
139  wc.addClause(separator + " (");
140  wc.addClause(relationField + ".type = :wtype");
141  wc.addNamedValue("wtype", ContactType.CONTACT_COMPANY);
142  wc.addClause("or");
143  wc.addClause(relationField + ".type = :stype");
144  wc.addNamedValue("stype", ContactType.CONTACT_LEARNINGCENTER);
145  wc.addClause(")");
146  }
Here is the call graph for this function:

◆ isNatural()

static void org.turro.contacts.relation.FuzzyRelationTypes.isNatural ( WhereClause  wc,
String  separator,
String  relationField 
)
static

Definition at line 148 of file FuzzyRelationTypes.java.

148  {
149  wc.addClause(separator + " (");
150  wc.addClause(relationField + ".business.type = :wtype");
151  wc.addNamedValue("wtype", ContactType.CONTACT_COMPANY);
152  wc.addClause("or");
153  wc.addClause(relationField + ".business.type = :stype");
154  wc.addNamedValue("stype", ContactType.CONTACT_LEARNINGCENTER);
155  wc.addClause(")");
156  }
Here is the call graph for this function:

◆ isProfessional() [1/2]

static boolean org.turro.contacts.relation.FuzzyRelationTypes.isProfessional ( BusinessRelation  relation)
static

Definition at line 43 of file FuzzyRelationTypes.java.

43  {
44  return !relation.isEmpty() && ContactType.CONTACT_COMPANY.equals(relation.getBusiness().getType());
45  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isProfessional() [2/2]

static void org.turro.contacts.relation.FuzzyRelationTypes.isProfessional ( WhereClause  wc,
String  separator,
String  relationField 
)
static

Definition at line 47 of file FuzzyRelationTypes.java.

47  {
48  wc.addClause(separator + " (");
49  wc.addClause(relationField + ".business.type = :wtype");
50  wc.addNamedValue("wtype", ContactType.CONTACT_COMPANY);
51  wc.addClause(")");
52  }
Here is the call graph for this function:

◆ isResponsible()

static boolean org.turro.contacts.relation.FuzzyRelationTypes.isResponsible ( BusinessRelation  relation)
static

Definition at line 91 of file FuzzyRelationTypes.java.

91  {
92  return !relation.isEmpty() &&
93  (ContactType.CONTACT_COMPANY.equals(relation.getBusiness().getType()) ||
94  ContactType.CONTACT_LEARNINGCENTER.equals(relation.getBusiness().getType())) &&
95  !RelationType.REL_STAFF.getRelationKey().equals(relation.getRelationType());
96  }
Here is the call graph for this function:

◆ isSingleton()

static void org.turro.contacts.relation.FuzzyRelationTypes.isSingleton ( WhereClause  wc,
String  separator,
String  contactField,
String  relationField 
)
static

Definition at line 117 of file FuzzyRelationTypes.java.

117  {
118  wc.addClause(separator + " (" + relationField + " is null");
119  wc.addClause("and (" + contactField + ".type = :sgtype or " + contactField + ".type = :sitype))");
120  wc.addNamedValue("sgtype", ContactType.CONTACT_USER);
121  wc.addNamedValue("sitype", ContactType.CONTACT_INTERNAL);
122  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStaff()

static boolean org.turro.contacts.relation.FuzzyRelationTypes.isStaff ( BusinessRelation  relation)
static

Definition at line 84 of file FuzzyRelationTypes.java.

84  {
85  return !relation.isEmpty() &&
86  (ContactType.CONTACT_COMPANY.equals(relation.getBusiness().getType()) ||
87  ContactType.CONTACT_LEARNINGCENTER.equals(relation.getBusiness().getType())) &&
88  RelationType.REL_STAFF.getRelationKey().equals(relation.getRelationType());
89  }
Here is the call graph for this function:

◆ isStudent() [1/2]

static boolean org.turro.contacts.relation.FuzzyRelationTypes.isStudent ( BusinessRelation  relation)
static

Definition at line 69 of file FuzzyRelationTypes.java.

69  {
70  return !relation.isEmpty() &&
71  ContactType.CONTACT_LEARNINGCENTER.equals(relation.getBusiness().getType()) &&
72  RelationType.REL_STAFF.getRelationKey().equals(relation.getRelationType());
73  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStudent() [2/2]

static void org.turro.contacts.relation.FuzzyRelationTypes.isStudent ( WhereClause  wc,
String  separator,
String  relationField 
)
static

Definition at line 75 of file FuzzyRelationTypes.java.

75  {
76  wc.addClause(separator + " (");
77  wc.addClause(relationField + ".business.type = :stype");
78  wc.addNamedValue("stype", ContactType.CONTACT_LEARNINGCENTER);
79  wc.addClause("and " + relationField +".relationType = :brtype");
80  wc.addNamedValue("brtype", RelationType.REL_STAFF.getRelationKey());
81  wc.addClause(")");
82  }
Here is the call graph for this function:

◆ isTyped()

static void org.turro.contacts.relation.FuzzyRelationTypes.isTyped ( WhereClause  wc,
String  separator,
String  relationField 
)
static

Definition at line 124 of file FuzzyRelationTypes.java.

124  {
125  wc.addClause(separator + " (");
126  wc.addClause(relationField + ".contact.type = :wtype");
127  wc.addNamedValue("wtype", ContactType.CONTACT_COMPANY);
128  wc.addClause("or");
129  wc.addClause(relationField + ".contact.type = :stype");
130  wc.addNamedValue("stype", ContactType.CONTACT_LEARNINGCENTER);
131  wc.addClause("or");
132  wc.addClause(relationField + ".business.type = :wtype");
133  wc.addClause("or");
134  wc.addClause(relationField + ".business.type = :stype");
135  wc.addClause(")");
136  }
Here is the call graph for this function:

◆ isWorker() [1/2]

static boolean org.turro.contacts.relation.FuzzyRelationTypes.isWorker ( BusinessRelation  relation)
static

Definition at line 32 of file FuzzyRelationTypes.java.

32  {
33  return isProfessional(relation) || isEducator(relation);
34  }
static boolean isEducator(BusinessRelation relation)
static boolean isProfessional(BusinessRelation relation)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isWorker() [2/2]

static void org.turro.contacts.relation.FuzzyRelationTypes.isWorker ( WhereClause  wc,
String  separator,
String  relationField 
)
static

Definition at line 36 of file FuzzyRelationTypes.java.

36  {
37  wc.addClause(separator + " (");
38  isProfessional(wc, "", relationField);
39  isEducator(wc, "or", relationField);
40  wc.addClause(")");
41  }
Here is the call graph for this function:

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