use of org.openntf.domino.types.Encapsulated in project org.openntf.domino by OpenNTF.
the class Database method getModifiedDocuments.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.Database#getModifiedDocuments(lotus.domino.DateTime, int)
*/
@Override
public DocumentCollection getModifiedDocuments(final lotus.domino.DateTime since, final int noteClass) {
try {
DocumentCollection result;
lotus.domino.DateTime dt = toLotus(since);
result = fromLotus(getDelegate().getModifiedDocuments(dt, noteClass), DocumentCollection.SCHEMA, this);
if (since instanceof Encapsulated) {
dt.recycle();
}
return result;
} catch (NotesException e) {
DominoUtils.handleException(e, this);
return null;
}
}
use of org.openntf.domino.types.Encapsulated in project org.openntf.domino by OpenNTF.
the class Database method getModifiedDocuments.
@Override
public DocumentCollection getModifiedDocuments(java.util.Date since, final ModifiedDocClass noteClass) {
try {
DocumentCollection result;
if (since == null) {
since = new Date(0);
}
lotus.domino.DateTime tempDT = getAncestorSession().createDateTime(since);
lotus.domino.DateTime dt = toLotus(tempDT);
if (!getDelegate().isOpen()) {
getDelegate().open();
}
result = fromLotus(getDelegate().getModifiedDocuments(dt, noteClass.getValue()), DocumentCollection.SCHEMA, this);
if (tempDT instanceof Encapsulated) {
dt.recycle();
}
return result;
} catch (NotesException e) {
DominoUtils.handleException(e, this);
return null;
}
}
use of org.openntf.domino.types.Encapsulated in project org.openntf.domino by OpenNTF.
the class Database method search.
/*
* (non-Javadoc)
*
* @see org.openntf.domino.Database#search(java.lang.String, lotus.domino.DateTime, int)
*/
@Override
public DocumentCollection search(final String formula, final lotus.domino.DateTime startDate, final int maxDocs) {
try {
DocumentCollection result;
lotus.domino.DateTime dt = toLotus(startDate);
result = fromLotus(getDelegate().search(formula, dt, maxDocs), DocumentCollection.SCHEMA, this);
if (startDate instanceof Encapsulated) {
dt.recycle();
}
return result;
} catch (NotesException e) {
DominoUtils.handleException(e, this);
return null;
}
}
Aggregations