com.mindoo.domino.jna.virtualviews.VirtualViewDataChange Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-jna Show documentation
Show all versions of domino-jna Show documentation
Java project to access the HCL Domino C API using Java Native Access (JNA)
The newest version!
package com.mindoo.domino.jna.virtualviews;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* Class to encapsulate changes in a {@link VirtualView} data set by one data provider
*/
public class VirtualViewDataChange {
private String origin;
private Set removals;
private Map additions;
public VirtualViewDataChange(String origin) {
this.origin = origin;
this.removals = new HashSet<>();
this.additions = new HashMap<>();
}
public String getOrigin() {
return origin;
}
public void removeEntry(int noteId) {
removals.add(noteId);
}
public void addEntry(int noteId, String unid, Map values) {
EntryData entry = new EntryData(unid, values);
additions.put(noteId, entry);
}
public static class EntryData {
private String unid;
private Map values;
public EntryData(String unid, Map values) {
this.unid = unid;
this.values = values;
}
public String getUnid() {
return unid;
}
public Map getValues() {
return values;
}
}
public Set getRemovals() {
return removals;
}
public Map getAdditions() {
return additions;
}
}