Documents.saveState(unids, this, itemName, true, headers);
} else if (value instanceof NoteCollection) {
// Maybe it'd be faster to use .getNoteIDs - I'm not sure how the performance compares
// NTF .getNoteIDs() *IS* faster. By about an order of magnitude.
NoteCollection notes = (NoteCollection) value;
String[] unids = new String[notes.getCount()];
String noteid = notes.getFirstNoteID();
int index = 0;
while (noteid != null && !noteid.isEmpty()) {
unids[index++] = notes.getUNID(noteid);
noteid = notes.getNextNoteID(noteid);
}
Map<String, String> headers = new HashMap<String, String>(1);
headers.put("X-Original-Java-Class", "org.openntf.domino.NoteCollection");
Documents.saveState(unids, this, itemName, true, headers);