org.hswebframework.ezorm.core.dsl.Query.orderByDesc()方法的使用及代码示例

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

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

Query.orderByDesc介绍

暂无

代码示例

代码示例来源:origin: hs-web/hsweb-framework

@Override
  @Cacheable(key = "'define-key-latest:'+#processDefineKey")
  public ProcessDefineConfigEntity selectByLatestProcessDefineKey(String processDefineKey) {
    return createQuery()
        .where("processDefineKey", Objects.requireNonNull(processDefineKey, "参数[processDefineKey]不能为空"))
        .and("status", DataStatus.STATUS_ENABLED)
        .orderByDesc("updateTime")
        .single();
  }
}

代码示例来源:origin: hs-web/hsweb-framework

@Override
public DynamicFormDeployLogEntity selectLastDeployed(String formId) {
  Objects.requireNonNull(formId);
  DynamicFormDeployLogEntity deployed = createQuery()
      .where(DynamicFormDeployLogEntity.formId, formId)
      .orderByDesc(DynamicFormDeployLogEntity.deployTime)
      .single();
  if (null != deployed && DataStatus.STATUS_ENABLED.equals(deployed.getStatus())) {
    return deployed;
  }
  return null;
}

代码示例来源:origin: hs-web/hsweb-framework

@Override
public DynamicFormDeployLogEntity selectDeployed(String formId, long version) {
  Objects.requireNonNull(formId);
  DynamicFormDeployLogEntity deployed = createQuery()
      .where(DynamicFormDeployLogEntity.formId, formId)
      .and(DynamicFormDeployLogEntity.version, version)
      .orderByDesc(DynamicFormDeployLogEntity.deployTime)
      .single();
  if (null != deployed && DataStatus.STATUS_ENABLED.equals(deployed.getStatus())) {
    return deployed;
  }
  return null;
}

代码示例来源:origin: hs-web/hsweb-framework

@Override
public void cancelDeployed(String formId) {
  Objects.requireNonNull(formId);
  DynamicFormDeployLogEntity deployed = createQuery()
      .where(DynamicFormDeployLogEntity.formId, formId)
      .orderByDesc(DynamicFormDeployLogEntity.deployTime)
      .single();
  if (deployed != null) {
    createUpdate()
        .set(DynamicFormDeployLogEntity.status, DataStatus.STATUS_DISABLED)
        .where(DynamicFormDeployLogEntity.id, deployed.getId())
        .exec();
  }
}

代码示例来源:origin: org.hswebframework.web/hsweb-system-workflow-local

@Override
  @Cacheable(key = "'define-key-latest:'+#processDefineKey")
  public ProcessDefineConfigEntity selectByLatestProcessDefineKey(String processDefineKey) {
    return createQuery()
        .where("processDefineKey", Objects.requireNonNull(processDefineKey, "参数[processDefineKey]不能为空"))
        .and("status", DataStatus.STATUS_ENABLED)
        .orderByDesc("updateTime")
        .single();
  }
}

代码示例来源:origin: org.hswebframework.web/hsweb-system-dynamic-form-local

@Override
public DynamicFormDeployLogEntity selectLastDeployed(String formId) {
  Objects.requireNonNull(formId);
  DynamicFormDeployLogEntity deployed = createQuery()
      .where(DynamicFormDeployLogEntity.formId, formId)
      .orderByDesc(DynamicFormDeployLogEntity.deployTime)
      .single();
  if (null != deployed && DataStatus.STATUS_ENABLED.equals(deployed.getStatus())) {
    return deployed;
  }
  return null;
}

代码示例来源:origin: org.hswebframework.web/hsweb-system-dynamic-form-local

@Override
public DynamicFormDeployLogEntity selectDeployed(String formId, long version) {
  Objects.requireNonNull(formId);
  DynamicFormDeployLogEntity deployed = createQuery()
      .where(DynamicFormDeployLogEntity.formId, formId)
      .and(DynamicFormDeployLogEntity.version, version)
      .orderByDesc(DynamicFormDeployLogEntity.deployTime)
      .single();
  if (null != deployed && DataStatus.STATUS_ENABLED.equals(deployed.getStatus())) {
    return deployed;
  }
  return null;
}

代码示例来源:origin: org.hswebframework.web/hsweb-system-dynamic-form-local

@Override
public void cancelDeployed(String formId) {
  Objects.requireNonNull(formId);
  DynamicFormDeployLogEntity deployed = createQuery()
      .where(DynamicFormDeployLogEntity.formId, formId)
      .orderByDesc(DynamicFormDeployLogEntity.deployTime)
      .single();
  if (deployed != null) {
    createUpdate()
        .set(DynamicFormDeployLogEntity.status, DataStatus.STATUS_DISABLED)
        .where(DynamicFormDeployLogEntity.id, deployed.getId())
        .exec();
  }
}

相关文章