de.tudarmstadt.ukp.clarin.webanno.model.Project.setCreated()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(130)

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

Project.setCreated介绍

暂无

代码示例

代码示例来源:origin: webanno/webanno

@Override
@Transactional
public void createProject(Project aProject)
  throws IOException
{
  if (aProject.getId() != null) {
    throw new IllegalArgumentException("Project has already been created before.");
  }
  
  aProject.setCreated(new Date());
  entityManager.persist(aProject);
  
  try (MDC.MDCCloseable closable = MDC.putCloseable(Logging.KEY_PROJECT_ID,
      String.valueOf(aProject.getId()))) {
    log.info("Created project [{}]({})", aProject.getName(), aProject.getId());
  }
  
  String path = dir.getAbsolutePath() + "/" + PROJECT_FOLDER + "/" + aProject.getId();
  FileUtils.forceMkdir(new File(path));
  
  applicationEventPublisher.publishEvent(new AfterProjectCreatedEvent(this, aProject));
}

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-project

@Override
@Transactional
public void createProject(Project aProject)
  throws IOException
{
  if (aProject.getId() != null) {
    throw new IllegalArgumentException("Project has already been created before.");
  }
  
  aProject.setCreated(new Date());
  entityManager.persist(aProject);
  
  try (MDC.MDCCloseable closable = MDC.putCloseable(Logging.KEY_PROJECT_ID,
      String.valueOf(aProject.getId()))) {
    log.info("Created project [{}]({})", aProject.getName(), aProject.getId());
  }
  
  String path = dir.getAbsolutePath() + "/" + PROJECT_FOLDER + "/" + aProject.getId();
  FileUtils.forceMkdir(new File(path));
  
  applicationEventPublisher.publishEvent(new AfterProjectCreatedEvent(this, aProject));
}

代码示例来源:origin: webanno/webanno

aProject.setCreated(aExProject.getCreated());
aProject.setUpdated(aExProject.getUpdated());

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-dao

aProject.setCreated(aExProject.getCreated());
aProject.setUpdated(aExProject.getUpdated());

相关文章