@Override public int compareTo(MinigContact o) { if (obm.getUid() == o.obm.getUid()) { return 0; } else { return getLastname().compareToIgnoreCase(o.getLastname()); } }
public String getDisplayName() { StringBuilder ret = new StringBuilder(); // last filled & maybe first if (!empty(getLastname())) { ret.append(getLastname()); if (!empty(getFirstname())) { ret.append(' '); ret.append(getFirstname()); } } else if (!empty(getFirstname())) { // last empty, first filled ret.append(getFirstname()); } else { // both are empty logger.warn( "contact with both first & last empty: obm.id: " + obm.getUid() + " mails: " + getEmails().size()); ret.append("[John Doe] (obm.id: " + obm.getUid() + ")"); } return ret.toString(); }
public void delete(Contact c) { logger.info("[contact " + c.getUid() + "] scheduled for solr removal"); Remover rm = new Remover(sContact, c.getUid().toString()); executor.execute(rm); }
public void createOrUpdate(Contact c) { logger.info("[contact " + c.getUid() + "] scheduled for solr indexing"); ContactIndexer ci = contactIndexerFactory.createIndexer(sContact, c); executor.execute(ci); }