- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 37 of file NamesVM.java.
◆ getModel()
List<NameEntry> org.turro.contacts.name.NamesVM.getModel |
( |
| ) |
|
Definition at line 66 of file NamesVM.java.
67 return SqlClause.select(
"c").from(
"Contact c")
68 .where().group().isNull(
"complexName.formal").or().isNull(
"complexName.informal").endGroup()
69 .and().in(
"type", List.of(ContactType.CONTACT_USER, ContactType.CONTACT_INTERNAL))
70 .orderBy(
"complexName.full")
71 .dao(dao.get()).resultList(Contact.class).stream()
72 .map(c -> NameEntry.from(c.getId(), c.getComplexName().getFull(),
false))
73 .filter(e -> !e.isEmpty())
◆ getSelected()
Set<NameEntry> org.turro.contacts.name.NamesVM.getSelected |
( |
| ) |
|
◆ processSelected()
void org.turro.contacts.name.NamesVM.processSelected |
( |
| ) |
|
Definition at line 50 of file NamesVM.java.
51 if(selected !=
null && !selected.isEmpty()) {
52 Messages.confirmProcess().add(selected.size() +
" items").show(() -> {
53 selected.forEach(item -> {
54 SqlClause.update(
"Contact")
55 .
set(
"complexName.full", item.getFull())
56 .andSet(
"complexName.informal", item.getInformal())
57 .andSet(
"complexName.formal", item.getFormal())
58 .where().equal(
"id", item.getContactId())
59 .dao(dao.get()).execute();
61 BindUtils.postNotifyChange(
null,
null, NamesVM.this,
"model");
◆ setSelected()
void org.turro.contacts.name.NamesVM.setSelected |
( |
Set< NameEntry > |
selected | ) |
|
Definition at line 45 of file NamesVM.java.
46 this.selected = selected;
The documentation for this class was generated from the following file: