コード例 #1
0
  public JwList<AcDomesticNominatedRouteSummaryVo> groupSummaryByCreatedUtcTsOnOrAfter(
      JwTimestamp startUtcTs) {
    JwList<AcDomesticNominatedRouteSummaryVo> v = new JwList<AcDomesticNominatedRouteSummaryVo>();

    JwSqlSelect st = createSelect();
    st.selectDate(ALIAS, NORMALIZED_BEGIN_UTC_DT);
    st.selectDate(ALIAS, NORMALIZED_END_UTC_DT);
    st.selectMinimumTimestamp(ALIAS, CREATED_UTC_TS);
    st.selectCount();
    st.from(TABLE, ALIAS);
    st.where().isGreaterThanOrEqualTo(ALIAS, CREATED_UTC_TS, startUtcTs);
    st.where().isEqual(ALIAS, STATUS, AcDomesticNominatedRouteStatusEnum.NEW.getCode());
    st.groupBy(ALIAS, NORMALIZED_BEGIN_UTC_DT);
    st.groupBy(ALIAS, NORMALIZED_END_UTC_DT);
    AcDbUtility.processResults(
        getAccess(), st, getReadNominatedRouteSummaryVoListResultSetProcessor(v));
    return v;
  }
コード例 #2
0
  public JwList<AcDomesticCandidateRouteSummaryVo> groupSummaryByNormalizedBeginUtcDtBetween(
      JwDate startUtcDt, JwDate endUtcDt) {
    // select c.normalizedBeginUtcDt, c.normalizedEndUtcDt, count(distinct c.id),
    // group_concat(distinct c.status)
    // from domesticNominatedRoute c
    // where c.normalizedBeginUtcDt >= startUtcDt and c.normalizedBeginUtcDt <= endUtcDt
    // group by c.normalizedBeginUtcDt, c.normalizedEndUtcDt
    JwList<AcDomesticCandidateRouteSummaryVo> v = new JwList<AcDomesticCandidateRouteSummaryVo>();

    JwSqlSelect st = createSelect();
    st.selectDate(ALIAS, NORMALIZED_BEGIN_UTC_DT);
    st.selectDate(ALIAS, NORMALIZED_END_UTC_DT);
    st.selectCountDistinct(ALIAS, ID);
    st.selectGroupConcatDistinct(ALIAS, STATUS);
    st.from(TABLE, ALIAS);
    st.where().isGreaterThanOrEqualTo(ALIAS, NORMALIZED_BEGIN_UTC_DT, startUtcDt);
    st.where().isLessThanOrEqualTo(ALIAS, NORMALIZED_BEGIN_UTC_DT, endUtcDt);
    st.groupBy(ALIAS, NORMALIZED_BEGIN_UTC_DT);
    st.groupBy(ALIAS, NORMALIZED_END_UTC_DT);
    AcDbUtility.processResults(getAccess(), st, getReadSummaryVoListResultSetProcessor(v));
    return v;
  }