/** * what is the first time range included? * * @param fudge * How many ms to advance if the first is not included. * @return the first time actually in the range */ public Time firstTime(long fudge) { // if the start is included, return this if (m_startIncluded) { return m_startTime; } // if not, return a time one ms after start Time fudgeStartTime = (Time) m_startTime.clone(); fudgeStartTime.setTime(m_startTime.getTime() + fudge); return fudgeStartTime; } // firstTime
/** * what is the last time range included? * * @param fudge * How many ms to decrease if the first is not included. * @return the last time actually in the range */ public Time lastTime(long fudge) { // if the end is included, return this if (m_endIncluded) { return m_endTime; } // if not, return a time one ms before end Time fudgeEndTime = (Time) m_endTime.clone(); fudgeEndTime.setTime(m_endTime.getTime() - fudge); return fudgeEndTime; } // lastTime
m_lastModifiedUserId = ((BaseAuthzGroup) azGroup).m_lastModifiedUserId; if (((BaseAuthzGroup) azGroup).m_createdTime != null) m_createdTime = (Time) ((BaseAuthzGroup) azGroup).m_createdTime.clone(); if (((BaseAuthzGroup) azGroup).m_lastModifiedTime != null) m_lastModifiedTime = (Time) ((BaseAuthzGroup) azGroup).m_lastModifiedTime.clone();
/** * Create the live properties for the azGroup. */ protected void addLiveProperties(BaseAuthzGroup azGroup) { String current = sessionManager().getCurrentSessionUserId(); azGroup.m_createdUserId = current; azGroup.m_lastModifiedUserId = current; Time now = timeService().newTime(); azGroup.m_createdTime = now; azGroup.m_lastModifiedTime = (Time) now.clone(); }
/** * Create the live properties for the site. */ protected void addLiveProperties(BaseSite site) { String current = sessionManager().getCurrentSessionUserId(); site.m_createdUserId = current; site.m_lastModifiedUserId = current; Time now = timeService().newTime(); site.m_createdTime = now; site.m_lastModifiedTime = (Time) now.clone(); }
/** * Take all values from this object. * * @param alias * The alias object to take values from. */ protected void setAll(BaseAliasEdit alias) { m_id = alias.m_id; m_target = alias.m_target; m_createdUserId = ((BaseAliasEdit) alias).m_createdUserId; m_lastModifiedUserId = ((BaseAliasEdit) alias).m_lastModifiedUserId; if (((BaseAliasEdit) alias).m_createdTime != null) m_createdTime = (Time) ((BaseAliasEdit) alias).m_createdTime.clone(); if (((BaseAliasEdit) alias).m_lastModifiedTime != null) m_lastModifiedTime = (Time) ((BaseAliasEdit) alias).m_lastModifiedTime.clone(); m_properties = new BaseResourcePropertiesEdit(); m_properties.addAll(alias.getProperties()); ((BaseResourcePropertiesEdit) m_properties).setLazy(((BaseResourceProperties) alias.getProperties()).isLazy()); } // setAll