use of lotus.domino.NotesException in project org.openntf.domino by OpenNTF.
the class View method createViewNavFrom.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.View#createViewNavFrom(java.lang.Object)
*/
@Override
public ViewNavigator createViewNavFrom(final Object entry) {
List<lotus.domino.Base> recycleThis = new ArrayList<lotus.domino.Base>();
try {
getDelegate().setAutoUpdate(false);
getDelegate().setEnableNoteIDsForCategories(true);
ViewNavigator result = fromLotus(getDelegate().createViewNavFrom(toLotus(entry)), ViewNavigator.SCHEMA, this);
((org.openntf.domino.impl.ViewNavigator) result).setType(ViewNavigator.Types.FROM);
return result;
} catch (NotesException e) {
DominoUtils.handleException(e);
} finally {
s_recycle(recycleThis);
}
return null;
}
use of lotus.domino.NotesException in project org.openntf.domino by OpenNTF.
the class View method createColumn.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.View#createColumn(int)
*/
@Override
public ViewColumn createColumn(final int position) {
try {
ViewColumn result = fromLotus(getDelegate().createColumn(position), ViewColumn.SCHEMA, this);
flushCaches();
return result;
} catch (NotesException e) {
DominoUtils.handleException(e);
}
return null;
}
use of lotus.domino.NotesException in project org.openntf.domino by OpenNTF.
the class View method createViewNav.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.View#createViewNav()
*/
@Override
public ViewNavigator createViewNav() {
try {
getDelegate().setAutoUpdate(false);
getDelegate().setEnableNoteIDsForCategories(true);
ViewNavigator result = fromLotus(getDelegate().createViewNav(), ViewNavigator.SCHEMA, this);
((org.openntf.domino.impl.ViewNavigator) result).setType(ViewNavigator.Types.NONE);
return result;
} catch (NotesException e) {
DominoUtils.handleException(e);
}
return null;
}
use of lotus.domino.NotesException in project org.openntf.domino by OpenNTF.
the class View method createViewNavFrom.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.View#createViewNavFrom(java.lang.Object, int)
*/
@Override
public ViewNavigator createViewNavFrom(final Object entry, final int cacheSize) {
try {
Object lotusObj = toLotus(entry);
getDelegate().setAutoUpdate(false);
getDelegate().setEnableNoteIDsForCategories(true);
ViewNavigator result = fromLotus(getDelegate().createViewNavFrom(lotusObj, cacheSize), ViewNavigator.SCHEMA, this);
result.setCacheSize(cacheSize);
((org.openntf.domino.impl.ViewNavigator) result).setType(ViewNavigator.Types.FROM);
return result;
} catch (NotesException e) {
DominoUtils.handleException(e);
}
return null;
}
use of lotus.domino.NotesException in project org.openntf.domino by OpenNTF.
the class ViewEntry method getColumnValues.
/**
* Returns the columnValues of this entry.
*
* @param returnConstants
* this parameter controls if constant values should also be returned
*/
protected java.util.Vector<Object> getColumnValues(final boolean returnConstants) {
try {
if (columnValues_ == null) {
// cache the columnValues and rely that the caller will NOT modify the objects inside
@SuppressWarnings("unchecked") Vector<Object> raw = getDelegate().getColumnValues();
columnValues_ = wrapColumnValues(raw, this.getAncestorSession());
}
if (returnConstants) {
List<DominoColumnInfo> colInfos = ((org.openntf.domino.impl.View) getParentView()).getColumnInfos();
if (colInfos.size() > columnValues_.size()) {
// there were constant columns
Vector<Object> ret = new Vector<Object>(colInfos.size());
for (DominoColumnInfo colInfo : colInfos) {
int idx = colInfo.getColumnValuesIndex();
if (idx < 65535) {
if (idx < columnValues_.size()) {
ret.add(columnValues_.get(idx));
} else {
// Categories!
ret.add(null);
}
} else {
ret.add(colInfo.getConstantValue());
}
}
return ret;
}
}
return columnValues_;
} catch (NotesException e) {
if (e.id == 4432) {
return new Vector<Object>();
}
DominoUtils.handleException(e);
return null;
}
}
Aggregations