BrightSide Workbench Full Report + Source Code
Contact.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.contacts;
19 
20 import java.io.Serializable;
21 import java.util.*;
22 import java.util.stream.Collectors;
23 import javax.persistence.*;
24 import org.turro.string.Strings;
25 import org.turro.action.Contacts;
26 import org.turro.contacts.db.ContactsPU;
27 import org.turro.contacts.mydata.MyDataList;
28 import org.turro.contacts.profile.Profile;
29 import org.turro.contacts.relation.Business;
30 import org.turro.contacts.relation.Workers;
31 import org.turro.contacts.util.ContactList;
32 import org.turro.contacts.util.DefaultContact;
33 import org.turro.elephant.context.ElephantContext;
34 import org.turro.elephant.context.IConstructor;
35 import org.turro.elephant.security.IUser;
36 import org.turro.i18n.I_;
37 import org.turro.jpa.Dao;
38 import org.turro.jpa.embeddables.ComplexName;
39 import org.turro.jpa.entity.EntityCollections;
40 import org.turro.jpa.entity.IDaoEntity;
41 import org.turro.plugin.contacts.IContact;
42 import org.turro.reflection.MappingSet;
43 import org.turro.security.Permissions;
44 import org.turro.security.SecurityGroups;
45 import org.turro.tags.Tags;
46 
47 @Entity
48 @org.hibernate.annotations.GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
49 @NamedQueries({
50  @NamedQuery(name="contactByLogin", query="select c from Contact c where c.login = :login")
51 })
52 public class Contact implements java.io.Serializable, IDaoEntity {
53 
54  @Id
55  @GeneratedValue(generator = "hibernate-uuid")
56  @Column(name="IDENTIFIER")
57  private String id;
58 
59  private String owner;
60 
61  private boolean onlyOwner;
62  private boolean webapp;
63  private boolean userMenu;
64  private boolean deactivated;
65  private boolean inactive;
66 
67  private ContactType type = ContactType.CONTACT_USER;
68 
69  @Embedded
70  private ComplexName complexName;
71 
72  private String name;
73  private String login;
74  private String pass1;
75  private String pass2;
76  private TimeZone timeZone;
77  private Locale locale;
78  private Currency currency;
79  private String grouping;
80  private String idActivity;
81  private double billing;
82  private double staff;
83 
84  private double latitude, longitude;
85 
86  //@Column(unique=true,nullable=true)
87  private String globalIdentifier;
88 
89  private String langTranslator;
90  private boolean cloudAdmin;
91 
92  @Column(unique=true,nullable=true)
93  private String emailAccount;
94 
95  @OneToOne(cascade = CascadeType.ALL, orphanRemoval=true)
96  private JobBoard jobBoard;
97 
98  @OneToMany(mappedBy = "contact", fetch = FetchType.LAZY, cascade=CascadeType.ALL, orphanRemoval=true)
99  @OrderBy(value="description")
100  private Set<Address> addresses = new HashSet<Address>();
101 
102  @OneToMany(mappedBy = "contact", fetch = FetchType.LAZY, cascade=CascadeType.ALL, orphanRemoval=true)
103  @OrderBy(value="description")
104  private Set<Connector> connectors = new HashSet<Connector>();
105 
106  @OneToMany(mappedBy = "contact", fetch = FetchType.LAZY, cascade=CascadeType.ALL, orphanRemoval=true)
107  @OrderBy(value="description")
108  private Set<BusinessRelation> businessRelations = new HashSet<BusinessRelation>();
109 
110  @OneToMany(mappedBy = "business", fetch = FetchType.LAZY, cascade=CascadeType.ALL, orphanRemoval=true)
111  @OrderBy(value="description")
112  private Set<BusinessRelation> workerRelations = new HashSet<BusinessRelation>();
113 
114  @OneToMany(mappedBy = "contact", fetch = FetchType.LAZY, cascade=CascadeType.ALL, orphanRemoval=true)
115  @OrderBy(value="name")
116  private Set<Syndication> syndications = new HashSet<Syndication>();
117 
118  @OneToMany(mappedBy = "contact", fetch = FetchType.LAZY, cascade=CascadeType.ALL, orphanRemoval=true)
119  @OrderBy(value="modification")
120  private Set<Comment> comments = new HashSet<Comment>();
121 
122  @OneToMany(mappedBy = "contact", fetch = FetchType.LAZY, cascade=CascadeType.ALL, orphanRemoval=true)
123  private Set<FieldValue> fieldValues = new HashSet<FieldValue>();
124 
125  @OneToMany(mappedBy = "contact", fetch = FetchType.LAZY, cascade=CascadeType.ALL, orphanRemoval=true)
126  private Set<ContactService> services = new HashSet<ContactService>();
127 
128  public String getId() {
129  return id;
130  }
131 
132  protected void setId(String id) {
133  this.id = id;
134  }
135 
136  public String getEmailAccount() {
137  return emailAccount;
138  }
139 
140  public void setEmailAccount(String emailAccount) {
141  this.emailAccount = emailAccount;
142  }
143 
144  public ContactType getType() {
145  return type;
146  }
147 
148  public void setType(ContactType type) {
149  this.type = type;
150  }
151 
153  if(complexName == null) complexName = new ComplexName();
154  return complexName;
155  }
156 
157  public void setComplexName(ComplexName complexName) {
158  this.complexName = complexName;
159  }
160 
161  @Deprecated
162  public String getOwner() {
163  return owner;
164  }
165 
166  @Deprecated
167  public void setOwner(String owner) {
168  this.owner = owner;
169  }
170 
171  @Deprecated
172  public boolean isOnlyOwner() {
173  return onlyOwner;
174  }
175 
176  @Deprecated
177  public void setOnlyOwner(boolean onlyOwner) {
178  this.onlyOwner = onlyOwner;
179  }
180 
181  public boolean isWebapp() {
182  return webapp;
183  }
184 
185  public void setWebapp(boolean webapp) {
186  this.webapp = webapp;
187  }
188 
189  public boolean isUserMenu() {
190  return userMenu;
191  }
192 
193  public void setUserMenu(boolean userMenu) {
194  this.userMenu = userMenu;
195  }
196 
197  public boolean isDeactivated() {
198  return deactivated;
199  }
200 
201  public void setDeactivated(boolean deactivated) {
202  this.deactivated = deactivated;
203  }
204 
205  public boolean isInactive() {
206  return inactive;
207  }
208 
209  public void setInactive(boolean inactive) {
210  this.inactive = inactive;
211  }
212 
213  public String getName() {
214  return name;
215  }
216 
217  public void setName(String name) {
218  this.name = name;
219  }
220 
221  public Currency getCurrency() {
222  if(currency == null) {
223  currency = ElephantContext.getContactCurrency();
224  }
225  return currency;
226  }
227 
228  public void setCurrency(Currency currency) {
229  this.currency = currency;
230  }
231 
232  public Locale getLocale() {
233  if(locale == null) {
235  }
236  return locale;
237  }
238 
239  public void setLocale(Locale locale) {
240  this.locale = locale;
241  }
242 
243  public String getLogin() {
244  return login;
245  }
246 
247  public void setLogin(String login) {
248  this.login = login;
249  }
250 
251  public String getPass1() {
252  return pass1;
253  }
254 
255  public void setPass1(String pass1) {
256  this.pass1 = pass1;
257  }
258 
259  public String getPass2() {
260  return pass2;
261  }
262 
263  public void setPass2(String pass2) {
264  this.pass2 = pass2;
265  }
266 
267  public String getGlobalIdentifier() {
268  return globalIdentifier;
269  }
270 
271  public void setGlobalIdentifier(String globalIdentifier) {
272  this.globalIdentifier = globalIdentifier;
273  }
274 
275  public TimeZone getTimeZone() {
276  return timeZone;
277  }
278 
279  public void setTimeZone(TimeZone timeZone) {
280  this.timeZone = timeZone;
281  }
282 
283  public String getGrouping() {
284  return grouping;
285  }
286 
287  public void setGrouping(String grouping) {
288  this.grouping = grouping;
289  }
290 
291  public String getIdActivity() {
292  return idActivity;
293  }
294 
295  public void setIdActivity(String idActivity) {
296  this.idActivity = idActivity;
297  }
298 
299  public double getBilling() {
300  return billing;
301  }
302 
303  public void setBilling(double billing) {
304  this.billing = billing;
305  }
306 
307  public double getStaff() {
308  return staff;
309  }
310 
311  public void setStaff(double staff) {
312  this.staff = staff;
313  }
314 
315  public double getLatitude() {
316  return latitude;
317  }
318 
319  public void setLatitude(double latitude) {
320  this.latitude = latitude;
321  }
322 
323  public double getLongitude() {
324  return longitude;
325  }
326 
327  public void setLongitude(double longitude) {
328  this.longitude = longitude;
329  }
330 
331  public String getLangTranslator() {
332  return langTranslator;
333  }
334 
335  public void setLangTranslator(String langTranslator) {
336  this.langTranslator = langTranslator;
337  }
338 
339  public boolean isCloudAdmin() {
340  return cloudAdmin;
341  }
342 
343  public void setCloudAdmin(boolean cloudAdmin) {
344  this.cloudAdmin = cloudAdmin;
345  }
346 
348  return jobBoard;
349  }
350 
351  public void setJobBoard(JobBoard jobBoard) {
352  this.jobBoard = jobBoard;
353  }
354 
355  public Set<Address> getAddresses() {
356  Dao dao = new ContactsPU();
357  if(!Strings.isBlank(id) && dao.isNotLoaded(addresses)) {
358  addresses = dao.lazyLoader(Contact.class, this, "addresses").addresses;
359  }
360  return addresses;
361  }
362 
363  public void setAddresses(Set<Address> addresses) {
364  this.addresses = addresses;
365  }
366 
367  public Set<Connector> getConnectors() {
368  Dao dao = new ContactsPU();
369  if(!Strings.isBlank(id) && dao.isNotLoaded(connectors)) {
370  connectors = dao.lazyLoader(Contact.class, this, "connectors").connectors;
371  }
372  return connectors;
373  }
374 
375  public void setConnectors(Set<Connector> connectors) {
376  this.connectors = connectors;
377  }
378 
379  public Set<BusinessRelation> getBusinessRelations() {
380  Dao dao = new ContactsPU();
381  if(!Strings.isBlank(id) && dao.isNotLoaded(businessRelations)) {
382  businessRelations = dao.lazyLoader(Contact.class, this, "businessRelations").businessRelations;
383  }
384  return businessRelations;
385  }
386 
387  public void setBusinessRelations(Set<BusinessRelation> businessRelations) {
388  this.businessRelations = businessRelations;
389  }
390 
391  public Set<BusinessRelation> getWorkerRelations() {
392  Dao dao = new ContactsPU();
393  if(!Strings.isBlank(id) && dao.isNotLoaded(workerRelations)) {
394  workerRelations = dao.lazyLoader(Contact.class, this, "workerRelations").workerRelations;
395  }
396  return workerRelations;
397  }
398 
399  public void setWorkerRelations(Set<BusinessRelation> workerRelations) {
400  this.workerRelations = workerRelations;
401  }
402 
403  public Set<Syndication> getSyndications() {
404  Dao dao = new ContactsPU();
405  if(!Strings.isBlank(id) && dao.isNotLoaded(syndications)) {
406  syndications = dao.lazyLoader(Contact.class, this, "syndications").syndications;
407  }
408  return syndications;
409  }
410 
411  public void setSyndications(Set<Syndication> syndications) {
412  this.syndications = syndications;
413  }
414 
415  public Set<Comment> getComments() {
416  Dao dao = new ContactsPU();
417  if(!Strings.isBlank(id) && dao.isNotLoaded(comments)) {
418  comments = dao.lazyLoader(Contact.class, this, "comments").comments;
419  }
420  return comments;
421  }
422 
423  public void setComments(Set<Comment> comments) {
424  this.comments = comments;
425  }
426 
427  public Set<FieldValue> getFieldValues() {
428  Dao dao = new ContactsPU();
429  if(!Strings.isBlank(id) && dao.isNotLoaded(fieldValues)) {
430  fieldValues = dao.lazyLoader(Contact.class, this, "fieldValues").fieldValues;
431  }
432  return fieldValues;
433  }
434 
435  public void setFieldValues(Set<FieldValue> fieldValues) {
436  this.fieldValues = fieldValues;
437  }
438 
439  public Set<ContactService> getServices() {
440  Dao dao = new ContactsPU();
441  if(!Strings.isBlank(id) && dao.isNotLoaded(services)) {
442  services = dao.lazyLoader(Contact.class, this, "services").services;
443  }
444  return services;
445  }
446 
447  public void setServices(Set<ContactService> services) {
448  this.services = services;
449  }
450 
451  /* IDaoEntity */
452 
453  @Override
454  public Object entityId() {
455  return id;
456  }
457 
458  @Override
459  public boolean isEmpty() {
460  return Strings.isBlank(name);
461  }
462 
463  /* ComplexName */
464 
465  public String getFriendly() {
466  return getComplexName().getFriendly();
467  }
468 
469  public String getFormal() {
470  return getComplexName().getSerious();
471  }
472 
473  /* Helpers */
474 
475  public void setPlainPass(String text) {
476  setPass1(ElephantContext.encrypt(text));
477  }
478 
480  return new DefaultContact(this);
481  }
482 
483  public boolean hasLocation() {
484  return latitude != 0.0 && longitude != 0.0;
485  }
486 
487  /* Read only Maps */
488 
489  public boolean isWebUser() {
490  Connector email = getConnectorMap().get(IUser.CONNECTOR_EMAIL);
491  return email != null && Contacts.isValidEmail(email.getValue());
492  }
493 
494  public String getTradeName() {
495  Connector trade = getConnectorMap().get(IUser.CONNECTOR_TRADE);
496  return Strings.isBlank(trade != null ? trade.getValue() : null, getName());
497  }
498 
499  public Map<String, Connector> getConnectorMap() {
500  return new ConnectorMap(this);
501  }
502 
503  public Map<String, Address> getAddressMap() {
504  return new AddressMap(this);
505  }
506 
507  public Map<String, FieldValue> getFieldMap() {
508  return new FieldMap(this);
509  }
510 
511  public Map<String, Comment> getCommentMap() {
512  return new CommentMap(this);
513  }
514 
515  public Map<String, Syndication> getSyndicationMap() {
516  return new SyndicationMap(this);
517  }
518 
519  public String getComment(IConstructor constructor, String key) {
520  String comment = null, lang = key + I_.api().used();
521  for(Comment c : getComments()) {
522  if(!Strings.isBlank(c.getComment()) && c.getComment().startsWith(lang)) {
523  comment = c.getComment().substring(lang.length());
524  break;
525  }
526  }
527  if(org.turro.string.Strings.isBlank(comment)) {
528  lang = key + "#";
529  for(Comment c : getComments()) {
530  if(!Strings.isBlank(c.getComment()) && c.getComment().startsWith(lang)) {
531  comment = c.getComment().substring(lang.length());
532  break;
533  }
534  }
535  }
536  return comment;
537  }
538 
539  /* Helpers */
540 
541  private transient HashMap<String, Object> attributes = new HashMap<>();
542  private transient MyDataList _myData;
543 
544  public String getFullName() {
545  Contact business = getBusiness();
546  return getName() + (business != null ? " (" + business.getName() + ")" : "");
547  }
548 
549  public void setAttribute(String key, Object value) {
550  attributes.put(key, value);
551  }
552 
553  public Object getAttribute(String key) {
554  return attributes.get(key);
555  }
556 
558  if(_myData == null) {
559  _myData = new MyDataList(new DefaultContact(this));
560  }
561  return _myData;
562  }
563 
564  public void checkEmptyness() {
565  EntityCollections.entities(getAddresses()).removeEmpties();
566  EntityCollections.entities(getConnectors()).removeEmpties();
567  EntityCollections.entities(getSyndications()).removeEmpties();
568  EntityCollections.entities(getBusinessRelations()).removeEmpties();
569  EntityCollections.entities(getComments()).removeEmpties();
570  EntityCollections.entities(getServices()).removeEmpties();
571  }
572 
573  public String getTagsString() {
574  return Tags.getTags(this).stream().map(tag -> tag.getTagName())
575  .collect(Collectors.joining(", ", "[", "]"));
576  }
577 
578  public String getRolesString() {
579  return Permissions.getRoleNames(getSyndications().stream()
580  .map(synd -> synd.getName()).collect(Collectors.toSet())).stream()
581  .collect(Collectors.joining(", ", "[", "]"));
582  }
583 
584  public String getSocialGroupsString() {
585  return getSyndications().stream()
586  .map(synd -> I_.get(SecurityGroups.get(synd.getName()).getName()))
587  .collect(Collectors.joining(", ", "[", "]"));
588  }
589 
590  public String getLocaleString(Locale currLocale) {
591  String result = null;
592 
593  result = locale != null ? locale.getDisplayName(currLocale) : "";
594  result = !Strings.isBlank(result) ? result + " " : "";
595  result += currency != null ? currency.toString() : "";
596 
597  return result;
598  }
599 
600  @Deprecated
601  public boolean isValidLogin() {
602  return login != null && login.length() > 0;
603  }
604 
605  public boolean getCanShow(String userId) {
606  return true;
607  }
608 
609  /* Contact relation helpers */
610 
611  private transient Business _business;
612  private transient Workers _workers;
613 
615  if(_business == null) {
616  _business = new Business(this);
617  }
618  return _business;
619  }
620 
622  if(_workers == null) {
623  _workers = new Workers(this);
624  }
625  return _workers;
626  }
627 
628  public Contact getBusiness() {
629  return getBusinessSet().getBusiness();
630  }
631 
632  public List<Contact> getBusinessList() {
633  return getBusinessSet().getBusinessList();
634  }
635 
636  public List<Contact> getCoworkers() {
637  return getBusinessSet().getCoworkers();
638  }
639 
640  public List<Contact> getCoworkers(Contact business) {
641  return business != null ? business.getWorkers() : new ContactList();
642  }
643 
644  public List<Contact> getWorkers() {
645  return getWorkerSet().getWorkers();
646  }
647 
648  public boolean isInBusiness(Contact worker) {
649  return worker != null && (equals(worker) || getWorkers().contains(worker));
650  }
651 
652  public boolean isInBusiness(IContact worker) {
653  return worker != null && worker.isValid() && isInBusiness((Contact) worker.getContact());
654  }
655 
656  /* Associated objects */
657 
658  public Object getObject(String key) {
659  Dao dao = new ContactsPU();
660  AssociatedObject ao = getAssociatedObject(dao, key);
661  return ao != null ? ao.getObject() : null;
662  }
663 
664  public void setObject(String key, Serializable value) {
665  Dao dao = new ContactsPU();
666  AssociatedObject ao = getAssociatedObject(dao, key);
667  if(ao == null) {
668  ao = new AssociatedObject();
669  ao.setContact(this);
670  ao.setKey(key);
671  }
672  ao.setObject(value);
673  dao.saveObject(ao);
674  }
675 
676  private AssociatedObject getAssociatedObject(Dao dao, String key) {
677  return (AssociatedObject) dao.getSingleResult(
678  "select ao from AssociatedObject as ao " +
679  "where contact = ? and key = ?",
680  new Object[] {
681  this, key
682  });
683  }
684 
685  /* Cached profile */
686 
687  private transient Profile profile;
688 
689  public Profile getProfile() {
690  if(profile == null) {
691  profile = new Profile(this);
692  }
693  return profile;
694  }
695 
697  if(profile == null) {
698  profile = new Profile(this, true);
699  }
700  return profile;
701  }
702 
703  /* XML Serializer */
704 
705  public MappingSet getSerializerMappings() {
706  MappingSet set = new MappingSet();
707  set.addMapping(Contact.class, 1,
708  new String[] { "id", "type", "name", "login", "pass1", "pass2",
709  "globalIdentifier", "emailAccount", "webapp", "userMenu", "deactivated" },
710  new String[] { "addresses", "connectors", "businessRelations", "jobBoard",
711  "locale", "timeZone", "currency", "syndications", "comments",
712  "fieldValues", "services", "grouping", "idActivity", "billing", "staff" });
713  set.addMapping(Address.class, 2,
714  new String[] { "id", "description" },
715  new String[] { "street", "zipCode", "province", "state", "latitude", "longitude" });
716  set.addMapping(Connector.class, 2,
717  new String[] { "id", "description" },
718  new String[] { "value" });
719  set.addMapping(BusinessRelation.class, 2,
720  new String[] { "id", "description", "preferential", "strong", "validated",
721  "startDate", "endDate" },
722  new String[] { "business", "relationType" });
723  set.addMapping(Syndication.class, 2,
724  new String[] { "id", "name" },
725  null);
726  set.addMapping(Comment.class, 2,
727  new String[] { "id", "modification" },
728  new String[] { "comment" });
729  set.addMapping(FieldValue.class, 2,
730  new String[] { "value", },
731  new String[] { "fieldDef" });
732  set.addMapping(FieldDef.class, 3,
733  new String[] { "id", "tabKey", "labeyKey", "tagDiscriminator" },
734  null);
735  set.addMapping(ContactService.class, 2,
736  new String[] { "title", },
737  new String[] { "text", "contact", "responsible" });
738  set.addMapping(Contact.class, 3,
739  new String[] { "id", "name" },
740  null);
741  set.addMapping(Currency.class, 2,
742  new String[] { "currencyCode" },
743  null);
744  set.addMapping(TimeZone.class, 2,
745  new String[] { "displayName" },
746  null);
747  set.addMapping(JobBoard.class, 2,
748  new String[] { "zipCode", "commuting", "available", "updateDate" },
749  null);
750  return set;
751  }
752 
753  @Override
754  public int hashCode() {
755  int hash = 7;
756  hash = 31 * hash + Objects.hashCode(this.id);
757  return hash;
758  }
759 
760  @Override
761  public boolean equals(Object obj) {
762  if (this == obj) {
763  return true;
764  }
765  if (obj == null) {
766  return false;
767  }
768  if (getClass() != obj.getClass()) {
769  return false;
770  }
771  final Contact other = (Contact) obj;
772  if (!Objects.equals(this.id, other.id)) {
773  return false;
774  }
775  return true;
776  }
777 
778 }
static boolean isValidEmail(String email)
Definition: Contacts.java:99
void setObject(Serializable object)
void setLatitude(double latitude)
Definition: Contact.java:319
String getLocaleString(Locale currLocale)
Definition: Contact.java:590
void setPass2(String pass2)
Definition: Contact.java:263
void setAddresses(Set< Address > addresses)
Definition: Contact.java:363
void setBilling(double billing)
Definition: Contact.java:303
void setBusinessRelations(Set< BusinessRelation > businessRelations)
Definition: Contact.java:387
void setOwner(String owner)
Definition: Contact.java:167
void setCurrency(Currency currency)
Definition: Contact.java:228
void setLocale(Locale locale)
Definition: Contact.java:239
Set< FieldValue > getFieldValues()
Definition: Contact.java:427
void setIdActivity(String idActivity)
Definition: Contact.java:295
void setType(ContactType type)
Definition: Contact.java:148
Set< BusinessRelation > getBusinessRelations()
Definition: Contact.java:379
void setFieldValues(Set< FieldValue > fieldValues)
Definition: Contact.java:435
void setAttribute(String key, Object value)
Definition: Contact.java:549
void setConnectors(Set< Connector > connectors)
Definition: Contact.java:375
void setSyndications(Set< Syndication > syndications)
Definition: Contact.java:411
Map< String, FieldValue > getFieldMap()
Definition: Contact.java:507
void setLogin(String login)
Definition: Contact.java:247
void setInactive(boolean inactive)
Definition: Contact.java:209
boolean equals(Object obj)
Definition: Contact.java:761
void setTimeZone(TimeZone timeZone)
Definition: Contact.java:279
List< Contact > getWorkers()
Definition: Contact.java:644
void setName(String name)
Definition: Contact.java:217
void setComments(Set< Comment > comments)
Definition: Contact.java:423
Set< Syndication > getSyndications()
Definition: Contact.java:403
void setServices(Set< ContactService > services)
Definition: Contact.java:447
void setComplexName(ComplexName complexName)
Definition: Contact.java:157
boolean getCanShow(String userId)
Definition: Contact.java:605
void setCloudAdmin(boolean cloudAdmin)
Definition: Contact.java:343
void setUserMenu(boolean userMenu)
Definition: Contact.java:193
Set< ContactService > getServices()
Definition: Contact.java:439
void setId(String id)
Definition: Contact.java:132
Set< Comment > getComments()
Definition: Contact.java:415
void setLongitude(double longitude)
Definition: Contact.java:327
void setGrouping(String grouping)
Definition: Contact.java:287
Object getObject(String key)
Definition: Contact.java:658
void setWebapp(boolean webapp)
Definition: Contact.java:185
void setPass1(String pass1)
Definition: Contact.java:255
Set< BusinessRelation > getWorkerRelations()
Definition: Contact.java:391
boolean isInBusiness(Contact worker)
Definition: Contact.java:648
ComplexName getComplexName()
Definition: Contact.java:152
void setStaff(double staff)
Definition: Contact.java:311
void setGlobalIdentifier(String globalIdentifier)
Definition: Contact.java:271
List< Contact > getCoworkers()
Definition: Contact.java:636
void setEmailAccount(String emailAccount)
Definition: Contact.java:140
List< Contact > getBusinessList()
Definition: Contact.java:632
Set< Address > getAddresses()
Definition: Contact.java:355
Map< String, Comment > getCommentMap()
Definition: Contact.java:511
List< Contact > getCoworkers(Contact business)
Definition: Contact.java:640
MappingSet getSerializerMappings()
Definition: Contact.java:705
Object getAttribute(String key)
Definition: Contact.java:553
void setWorkerRelations(Set< BusinessRelation > workerRelations)
Definition: Contact.java:399
void setObject(String key, Serializable value)
Definition: Contact.java:664
boolean isInBusiness(IContact worker)
Definition: Contact.java:652
void setOnlyOwner(boolean onlyOwner)
Definition: Contact.java:177
void setDeactivated(boolean deactivated)
Definition: Contact.java:201
Map< String, Connector > getConnectorMap()
Definition: Contact.java:499
void setPlainPass(String text)
Definition: Contact.java:475
Map< String, Syndication > getSyndicationMap()
Definition: Contact.java:515
Map< String, Address > getAddressMap()
Definition: Contact.java:503
void setLangTranslator(String langTranslator)
Definition: Contact.java:335
void setJobBoard(JobBoard jobBoard)
Definition: Contact.java:351
String getComment(IConstructor constructor, String key)
Definition: Contact.java:519
Set< Connector > getConnectors()
Definition: Contact.java:367
static String get(String msg)
Definition: I_.java:41
static I18nApiWrapper api()
Definition: I_.java:65
Object getSingleResult(WhereClause wc)
Definition: Dao.java:380
boolean isNotLoaded(Object o, String attribute)
Definition: Dao.java:216
static EntityCollections entities(Collection values)
static Set< String > getRoleNames()
static SecurityGroup get(String id)
static TagSet getTags(Object entity)
Definition: Tags.java:351
static final String CONNECTOR_EMAIL
Definition: IUser.java:27
static final String CONNECTOR_TRADE
Definition: IUser.java:28