boolean needToUpdate = true;
NotesDateTime lastCacheUpdate = null;
NotesDateTime now = null;
NotesView systemView = null;
NotesDocument systemDoc = null;
Vector<?> vecLastCacheUpdate = null;
try {
lastCacheUpdate = notesSession.createDateTime("1/1/2010");
now = notesSession.createDateTime("1/1/1900");
now.setNow();
systemView = connectorDatabase.getView(NCCONST.VIEWSYSTEMSETUP);
systemDoc = systemView.getFirstDocument();
if (systemDoc == null) {
LOGGER.logp(Level.SEVERE, CLASS_NAME, METHOD,
"System configuration document not found.");
return false;
}
// Get the update interval from the system configuration
int cacheUpdateInterval = connectorSession.getCacheUpdateInterval();
vecLastCacheUpdate = systemDoc
.getItemValue(NCCONST.SITM_LASTCACHEUPDATE);
if (vecLastCacheUpdate.size() > 0) {
LOGGER.logp(Level.FINE, CLASS_NAME, METHOD,
"vecLastCacheUpdate is " + vecLastCacheUpdate);
lastCacheUpdate = (NotesDateTime) vecLastCacheUpdate.firstElement();