本文整理了Java中org.zstack.core.db.Q.gte
方法的一些代码示例,展示了Q.gte
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Q.gte
方法的具体详情如下:
包路径:org.zstack.core.db.Q
类名称: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();
内容来源于网络,如有侵权,请联系作者删除!