Skip to content
Permalink
Browse files

Fixed value for isConflict in views with disabled response hierarchy

  • Loading branch information...
klehmann committed Mar 1, 2019
1 parent 65825c3 commit cdfbc6f8e3087eed1eb8328341451f4f0ffbc7dd
Showing with 22 additions and 2 deletions.
  1. +22 −2 domino-jna/src/main/java/com/mindoo/domino/jna/NotesViewEntryData.java
@@ -153,7 +153,17 @@ public boolean isConflict() {
//C API documentation regarding conflict flags in views
//VIEW_TABLE_FLAG_CONFLICT - Replication conflicts will be flagged. If TRUE, the '$Conflict' item must be SECOND-TO-LAST in the list of summary items for this view.
if (m_columnValues!=null) {
return m_columnValues.length>=2 && m_columnValues[m_columnValues.length-2] != null;
if (!m_parentCollection.isConflict()) {
return false;
}
else if (m_parentCollection.isHierarchical()) {
return m_columnValues.length>=2 && m_columnValues[m_columnValues.length-2] != null;
}
else {
//special case for views which have "show response hierarchy" = false:
//here the response column value is missing
return m_columnValues.length>=2 && m_columnValues[m_columnValues.length-1] != null;
}
}
else if (m_summaryData!=null) {
return m_summaryData.get("$Conflict") != null;
@@ -171,7 +181,13 @@ public boolean isResponse() {
//C API documentation regarding response flags in views
//VIEW_TABLE_FLAG_FLATINDEX - Do not index hierarchically If FALSE, the '$REF' item must be LAST in the list of summary items for this view.
if (m_columnValues!=null) {
return m_columnValues.length>=1 && m_columnValues[m_columnValues.length-1] != null;
if (m_parentCollection.isHierarchical()) {
return m_columnValues.length>=1 && m_columnValues[m_columnValues.length-1] != null;
}
else {
//fallback to isConflict as this is the only info we have
return isConflict();
}
}
else if (m_summaryData!=null) {
return m_summaryData.get("$Ref") != null;
@@ -488,6 +504,10 @@ public void setColumnValues(Object[] itemValues) {
m_columnValues = itemValues;
}

public Object[] getColumnValues() {
return m_columnValues;
}

/**
* Returns an iterator of all available columns for which we can read column values
* (e.g. does not return static column names).<br>

0 comments on commit cdfbc6f

Please sign in to comment.
You can’t perform that action at this time.