org.zstack.core.db.Q.gte()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(90)

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

Q.gte介绍

暂无

代码示例

代码示例来源:origin: zstackio/zstack

private List<ElaborationVO> getMissedElatorations(Long repeats, String from) {
  Long times = repeats != null ? repeats : 1L;
  if (from == null) {
    return Q.New(ElaborationVO.class).eq(ElaborationVO_.matched, false).gte(ElaborationVO_.repeats, times).list();
  } else {
    if (TimeUtils.isValidTimestampFormat(from)) {
      long start = TimeUtils.parseFormatStringToTimeStamp(from);
      return Q.New(ElaborationVO.class).eq(ElaborationVO_.matched, false).gte(ElaborationVO_.repeats, times).
          gte(ElaborationVO_.lastOpDate, new Timestamp(start)).list();
    } else if (NumberUtils.isNumber(from)) {
      try {
        return Q.New(ElaborationVO.class).eq(ElaborationVO_.matched, false).gte(ElaborationVO_.repeats, times).
            gte(ElaborationVO_.lastOpDate, new Timestamp(Long.valueOf(from))).list();
      } catch (NumberFormatException e) {
        throw new OperationFailureException(argerr("%s is not a Long value Number", from));
      }
    } else {
      throw new OperationFailureException(argerr("arg 'startTime' should format like 'yyyy-MM-dd HH:mm:ss' or '1545380003000'"));
    }
  }
}

代码示例来源:origin: zstackio/zstack

@Override
  public void run(FlowTrigger trigger, Map data) {
    StringSimilarity.refreshErrorTemplates();
    eliminateErrors();
    List<ElaborationVO> vos = Q.New(ElaborationVO.class).gte(ElaborationVO_.repeats, 1).eq(ElaborationVO_.matched, false).orderBy(ElaborationVO_.lastOpDate, SimpleQuery.Od.DESC).list();
    if (!vos.isEmpty()) {
      List<String> messages = StringSimilarity.getElaborations().stream().map(ErrorCodeElaboration::getMessage_cn).collect(Collectors.toList());
      for (ElaborationVO vo: vos) {
        if (messages.contains(vo.getErrorInfo())) {
          vo.setMatched(true);
          dbf.updateAndRefresh(vo);
        }
      }
    }
    StringSimilarity.resetCachedErrors();
    trigger.next();
  }
}).done(new FlowDoneHandler(completion) {

代码示例来源:origin: zstackio/zstack

VolumeVO rootVolumeVO = dbf.findByUuid(volumeUuid, VolumeVO.class);
boolean avaliableHost = Q.New(LocalStorageHostRefVO.class)
    .gte(LocalStorageHostRefVO_.availableCapacity, vol.getSize())
    .eq(LocalStorageHostRefVO_.primaryStorageUuid, rootVolumeVO.getPrimaryStorageUuid())
    .isExists();

代码示例来源:origin: zstackio/zstack

.gte(VxlanNetworkVO_.vni, vo.getStartVni()).lte(VxlanNetworkVO_.vni, vo.getEndVni()).listValues();

相关文章