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

Public Member Functions

void removeMissingFrom (Object dao, String table, String idField)
 
List< String > missing (List< String > contactIds)
 

Detailed Description

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

Definition at line 33 of file ContactManager.java.

Member Function Documentation

◆ missing()

List<String> org.turro.contacts.manager.ContactManager.missing ( List< String >  contactIds)

Implements org.turro.contacts.IContactManager.

Definition at line 49 of file ContactManager.java.

49  {
50  SqlClause.select("id").from("Contact")
51  .where().in("id", contactIds)
52  .dao(getDao())
53  .resultList(String.class)
54  .forEach(id -> contactIds.remove(id));
55  return contactIds;
56  }
Here is the caller graph for this function:

◆ removeMissingFrom()

void org.turro.contacts.manager.ContactManager.removeMissingFrom ( Object  dao,
String  table,
String  idField 
)

Implements org.turro.contacts.IContactManager.

Definition at line 36 of file ContactManager.java.

36  {
37  List<String> ids = missing(
38  SqlClause.select("distinct " + idField).from(table)
39  .dao((Dao) dao).resultList(String.class));
40  if(!ids.isEmpty()) {
41  SqlClause.delete(table)
42  .where().in(idField, ids)
43  .dao((Dao) dao)
44  .execute();
45  }
46  }
List< String > missing(List< String > contactIds)
Here is the call graph for this function:

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