org.sakaiproject.time.api.Time.getTime()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中org.sakaiproject.time.api.Time.getTime()方法的一些代码示例,展示了Time.getTime()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Time.getTime()方法的具体详情如下:
包路径:org.sakaiproject.time.api.Time
类名称:Time
方法名:getTime

Time.getTime介绍

[英]Access the milliseconds since.
[中]访问之后的毫秒数。

代码示例

代码示例来源:origin: sakaiproject/sakai

@Override
public Instant getInstant() {
  return Instant.ofEpochMilli(m_date.getTime());
}
/**

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * {@inheritDoc}
 */
public Date getCreatedDate()
{
  return new Date(m_createdTime.getTime());
}
/**

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

@Override
public Instant getReleaseInstant() {
  Instant instant = null;
  if (m_releaseDate != null) {
    instant =  Instant.ofEpochMilli(m_releaseDate.getTime());
  }
  return instant;
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

@Override
public Instant getRetractInstant() {
  Instant instant = null;
  if (m_retractDate != null) {
    instant = instant.ofEpochMilli(m_retractDate.getTime());
  }
  return instant;
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

public Date getRetractTime()
{
  Date date = null;
  if (m_retractDate != null) {
    date = new Date(m_retractDate.getTime());
  }
  return date;
}

代码示例来源:origin: sakaiproject/sakai

public Date getDateProperty(String name) throws EntityPropertyNotDefinedException, EntityPropertyTypeException
{
  Time time = getTimeProperty(name);
  return new Date(time.getTime());
}

代码示例来源:origin: sakaiproject/sakai

public Instant getInstantProperty(String name) throws EntityPropertyNotDefinedException, EntityPropertyTypeException
{
  Time time = getTimeProperty(name);
  return Instant.ofEpochMilli(time.getTime());
}
/**

代码示例来源:origin: sakaiproject/sakai

@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);
}

代码示例来源:origin: sakaiproject/sakai

/**
 * 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

代码示例来源:origin: org.sakaiproject.scheduler/scheduler-component-shared

@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);
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * compute the duration, in ms, of the time range
 */
public long duration()
{
  // KNL-1536, SAK-30793, SAK-23076 - Get the *actual* duration - Ignore fudging
  return (lastTime(0).getTime() - firstTime(0).getTime());
} // duration

代码示例来源:origin: org.sakaiproject.mailarchive/sakai-mailarchive-impl

/**
 * 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

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * Shift the time range back an intervel
 *
 * @param i
 *        time intervel in ms
 */
public void shiftBackward(long i)
{
  m_startTime.setTime(m_startTime.getTime() - i);
  m_endTime.setTime(m_endTime.getTime() - i);
}

代码示例来源:origin: org.sakaiproject.calendaring/external-calendaring-service-impl

/**
 * 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;
}

代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl

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;
}

代码示例来源:origin: org.sakaiproject.metaobj/sakai-metaobj-impl

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);
 }
}

代码示例来源:origin: org.sakaiproject/sakai-podcasts-impl

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());
}

代码示例来源:origin: org.sakaiproject/sakai-citations-impl

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);
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * @inheritDoc
 */
public Time getEnd()
{
  return this.usageSessionServiceAdaptor.timeService().newTime(m_end.getTime());
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

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);
}

相关文章