/* * (non-Javadoc) * * @see org.openntf.domino.DateTime#setLocalTime(java.lang.String) */ @Override public void setLocalTime(final String time) { try { idt = null; lotus.domino.DateTime worker = getDelegate(); worker.setLocalTime(time); workDone(worker, true); } catch (NotesException ne) { ODAUtils.handleException(ne); } }
/* * (non-Javadoc) * * @see org.openntf.domino.DateTime#setLocalDate(int, int, int, boolean) */ @Override public void setLocalDate( final int year, final int month, final int day, final boolean preserveLocalTime) { try { lotus.domino.DateTime worker = getDelegate(); worker.setLocalDate(year, month, day, preserveLocalTime); workDone(worker, true); } catch (NotesException ne) { ODAUtils.handleException(ne); } }
/* * (non-Javadoc) * * @see org.openntf.domino.DateTime#getLocalTime() */ @Override public String getLocalTime() { String ret = null; try { lotus.domino.DateTime worker = getDelegate(); ret = worker.getLocalTime(); workDone(worker, false); } catch (NotesException ne) { ODAUtils.handleException(ne); } return ret; }
/* * (non-Javadoc) * * @see org.openntf.domino.DateTime#convertToZone(int, boolean) */ @Override public void convertToZone(final int zone, final boolean isDST) { try { lotus.domino.DateTime worker = getDelegate(); worker.convertToZone(zone, isDST); workDone(worker, true); } catch (NotesException ne) { ODAUtils.handleException(ne); } // TODO NTF - find out what this actually does. The documentation is... vague // throw new UnimplementedException("convertToZone is not yet implemented."); }
/* * (non-Javadoc) * * @see org.openntf.domino.DateTime#getTimeZone() */ @Override public int getTimeZone() { // TODO: are these the upper two bits of innard1 int ret = 0; try { lotus.domino.DateTime worker = getDelegate(); ret = worker.getTimeZone(); workDone(worker, false); } catch (NotesException ne) { ODAUtils.handleException(ne); } return ret; }
/* * (non-Javadoc) * * @see org.openntf.domino.DateTime#getZoneTime() */ @Override public String getZoneTime() { // TODO NTF - find out what this really does String ret = null; try { lotus.domino.DateTime worker = getDelegate(); ret = worker.getZoneTime(); workDone(worker, false); } catch (NotesException ne) { ODAUtils.handleException(ne); } return ret; // throw new UnimplementedException("getZoneTime is not yet implemented."); }
/* * (non-Javadoc) * * @see org.openntf.domino.DateTime#adjustYear(int, boolean) */ @Override public void adjustYear(final int n, final boolean preserveLocalTime) { if (preserveLocalTime) { idt.adjustYear(n); } else { try { lotus.domino.DateTime worker = getDelegate(); worker.adjustYear(n, preserveLocalTime); workDone(worker, true); } catch (NotesException ne) { ODAUtils.handleException(ne); } } }
private void timeDifferenceCommon(final lotus.domino.DateTime dt, final Object[] res) { lotus.domino.DateTime dtLocal = dt; lotus.domino.DateTime lotusDTTmp = null; try { if (dtLocal instanceof org.openntf.domino.impl.DateTime) { lotusDTTmp = ((org.openntf.domino.impl.DateTime) dtLocal).getDelegate(); dtLocal = lotusDTTmp; } lotus.domino.DateTime worker = getDelegate(); if (res[0] instanceof Integer) { res[0] = worker.timeDifference(dtLocal); } else if (res[0] instanceof Double) { res[0] = worker.timeDifferenceDouble(dtLocal); } workDone(worker, false); } catch (NotesException ne) { ODAUtils.handleException(ne); } finally { if (lotusDTTmp != null) s_recycle(lotusDTTmp); } }
private void workDone(final lotus.domino.DateTime worker, final boolean reInit) throws NotesException { if (reInit) this.initialize(worker); worker.recycle(); }