@Override public Instant getInstant() { return Instant.ofEpochMilli(m_date.getTime()); } /**
/** * {@inheritDoc} */ public Date getCreatedDate() { return new Date(m_createdTime.getTime()); } /**
@Override public Instant getReleaseInstant() { Instant instant = null; if (m_releaseDate != null) { instant = Instant.ofEpochMilli(m_releaseDate.getTime()); } return instant; }
@Override public Instant getRetractInstant() { Instant instant = null; if (m_retractDate != null) { instant = instant.ofEpochMilli(m_retractDate.getTime()); } return instant; }
public Date getRetractTime() { Date date = null; if (m_retractDate != null) { date = new Date(m_retractDate.getTime()); } return date; }
public Date getDateProperty(String name) throws EntityPropertyNotDefinedException, EntityPropertyTypeException { Time time = getTimeProperty(name); return new Date(time.getTime()); }
public Instant getInstantProperty(String name) throws EntityPropertyNotDefinedException, EntityPropertyTypeException { Time time = getTimeProperty(name); return Instant.ofEpochMilli(time.getTime()); } /**
@Override @Transactional(propagation = REQUIRES_NEW) public String createDelayedInvocation(Time time, String componentId, String opaqueContext) { Instant instant = Instant.ofEpochMilli(time.getTime()); return createDelayedInvocation(instant, componentId, opaqueContext); }
/** * Set the date/time the message was sent to the channel. * * @param date * The date/time the message was sent to the channel. */ public void setDate(Time date) { if (!date.equals(m_date)) { m_date.setTime(date.getTime()); } } // setDate
@Override @Transactional(propagation = REQUIRES_NEW) public String createDelayedInvocation(Time time, String componentId, String opaqueContext) { Instant instant = Instant.ofEpochMilli(time.getTime()); return createDelayedInvocation(instant, componentId, opaqueContext); }
/** * Set the date: sent of the message. * * @param sent * The the date: sent of the message. */ public void setDateSent(Time sent) { m_dateSent = TimeService.newTime(sent.getTime()); } // setDateSent
/** * Helper to extract the startDate of a TimeRange into a java.util.Calendar object. * @param range * @return */ private java.util.Calendar getStartDate(TimeRange range) { java.util.Calendar c = new GregorianCalendar(); c.setTimeInMillis(range.firstTime().getTime()); return c; }
public Date getInitialActivityDate(String siteId) { Date date = null; try{ date = new Date(M_ss.getSite(siteId).getCreatedTime().getTime()); }catch(Exception e){ return new Date(0); } return date; }
public static Date getDate(ContentResource resource, String propName) { try { Time time = resource.getProperties().getTimeProperty(propName); return new Date(time.getTime()); } catch (EntityPropertyNotDefinedException e) { return null; } catch (EntityPropertyTypeException e) { throw new RuntimeException(e); } }
public boolean isResourceHidden(ContentEntity podcastResource, Date tempDate) { return podcastResource.isHidden() || (podcastResource.getRetractDate() != null && podcastResource.getRetractDate().getTime() <= timeService.newTime().getTime()) || (tempDate != null && tempDate.getTime() >= timeService.newTime().getTime()); }
private void updateCitationCollectionUpdateDate(String citationCollectionId) { String updateStatement = "UPDATE " + m_collectionTableName + " SET PROPERTY_VALUE = ? WHERE COLLECTION_ID= ? AND PROPERTY_NAME = ? "; long mostRecentUpdate = TimeService.newTime().getTime(); Object[] updateFields = new Object[3]; updateFields[0] = Long.toString(mostRecentUpdate); updateFields[1] = citationCollectionId; updateFields[2] = PROP_MOST_RECENT_UPDATE; m_sqlService.dbWrite(updateStatement, updateFields); }
/** * @inheritDoc */ public Time getEnd() { return this.usageSessionServiceAdaptor.timeService().newTime(m_end.getTime()); }
protected void updateIndividualDropboxRecord(String individualDropboxId) { String sql = contentServiceSql.getUpdateIndividualDropboxChangeSql(); Object[] fields = new Object[3]; fields[0] = isolateContainingId(individualDropboxId); fields[1] = Long.toString(timeService.newTime().getTime()); fields[2] = individualDropboxId; boolean ok = m_sqlService.dbWrite(sql, fields); }