◆ SocialGroupVM()
org.turro.contacts.social.SocialGroupVM.SocialGroupVM |
( |
| ) |
|
◆ checkBusiness()
void org.turro.contacts.social.SocialGroupVM.checkBusiness |
( |
@BindingParam("relation") SocialRelation |
relation | ) |
|
Definition at line 49 of file SocialGroupVM.java.
50 IContact contact = relation.getBusiness().getIContact();
51 contact.syndicate(socialGroup.
getKey(), !contact.getSyndications().contains(socialGroup.
getKey()));
◆ checkContact()
void org.turro.contacts.social.SocialGroupVM.checkContact |
( |
@BindingParam("relation") SocialRelation |
relation | ) |
|
Definition at line 56 of file SocialGroupVM.java.
57 IContact contact = relation.getContact().getIContact();
58 contact.syndicate(socialGroup.
getKey(), !contact.getSyndications().contains(socialGroup.
getKey()));
◆ getModel()
List<SocialRelation> org.turro.contacts.social.SocialGroupVM.getModel |
( |
| ) |
|
Definition at line 97 of file SocialGroupVM.java.
98 ArrayList<SocialRelation> list =
new ArrayList<>();
99 if(socialGroup !=
null) {
100 WhereClause wc =
new WhereClause();
101 wc.addClause(
"select br from BusinessRelation br");
102 wc.addClause(
"where br.validated = TRUE");
104 wc.addInRange(
"and",
"br.startDate",
"br.endDate",
"date",
new Date());
107 wc.addClause(
"and ( exists (");
108 wc.addClause(
"select s from Syndication s");
109 wc.addClause(
"where s.name = :name");
110 wc.addClause(
"and s.contact = br.business");
111 wc.addClause(
") and not exists (");
112 wc.addClause(
"select s from Syndication s");
113 wc.addClause(
"where s.name = :name");
114 wc.addClause(
"and s.contact = br.contact");
115 wc.addClause(
")) or ( not exists (");
116 wc.addClause(
"select s from Syndication s");
117 wc.addClause(
"where s.name = :name");
118 wc.addClause(
"and s.contact = br.business");
119 wc.addClause(
") and exists (");
120 wc.addClause(
"select s from Syndication s");
121 wc.addClause(
"where s.name = :name");
122 wc.addClause(
"and s.contact = br.contact");
125 wc.addClause(
"and not exists (");
126 wc.addClause(
"select b2 from BusinessRelation b2");
127 wc.addClause(
"where b2.validated = TRUE");
128 wc.addInRange(
"and",
"b2.startDate",
"b2.endDate",
"date",
new Date());
129 wc.addClause(
"and b2.contact = br.contact");
130 wc.addClause(
"and b2.business <> br.business");
131 wc.addClause(
"and exists (");
132 wc.addClause(
"select s from Syndication s");
133 wc.addClause(
"where s.name = :name");
134 wc.addClause(
"and s.contact = b2.business");
137 wc.addNamedValue(
"name", socialGroup.
getKey());
139 wc.addClause(
"order by br.business.name, br.contact.name");
141 for(BusinessRelation br :
new ContactsPU().getResultList(BusinessRelation.class, wc)) {
142 list.add(
new SocialRelation(br.getBusiness(), br.getContact(), socialGroup.
getKey()));
◆ getSocialGroup()
◆ getSocialGroupModel()
Set<SocialGroupValue> org.turro.contacts.social.SocialGroupVM.getSocialGroupModel |
( |
| ) |
|
Definition at line 85 of file SocialGroupVM.java.
86 TreeSet<SocialGroupValue>
set =
new TreeSet<>();
87 SocialGroups.allowedSocialGroups().forEach(social -> {
88 set.add(
new SocialGroupValue(social.getName(), social.getId(), social.getType()));
◆ isActive()
boolean org.turro.contacts.social.SocialGroupVM.isActive |
( |
| ) |
|
◆ isStudents()
boolean org.turro.contacts.social.SocialGroupVM.isStudents |
( |
| ) |
|
◆ setActive()
void org.turro.contacts.social.SocialGroupVM.setActive |
( |
boolean |
active | ) |
|
◆ setSocialGroup()
void org.turro.contacts.social.SocialGroupVM.setSocialGroup |
( |
SocialGroupValue |
socialGroup | ) |
|
◆ setStudents()
void org.turro.contacts.social.SocialGroupVM.setStudents |
( |
boolean |
students | ) |
|
◆ update()
void org.turro.contacts.social.SocialGroupVM.update |
( |
| ) |
|
The documentation for this class was generated from the following file: