public JwList<AcDomesticNominatedRoute> getAllByNormalizedBeginUtcDtBetweenCreatedOnOrAfter(
      JwDate startUtcDt,
      JwDate endUtcDt,
      String originAirport,
      String destinationAirport,
      String flightNumber,
      JwTimestamp createdUtcTs,
      JwList<String> statuses) {
    if (statuses != null && statuses.isEmpty()) return new JwList<AcDomesticNominatedRoute>();

    JwSqlSelect st = getSelect();
    st.where().isGreaterThanOrEqualTo(ALIAS, NORMALIZED_BEGIN_UTC_DT, startUtcDt);
    st.where().isLessThanOrEqualTo(ALIAS, NORMALIZED_BEGIN_UTC_DT, endUtcDt);
    if (JwUtility.hasValue(originAirport))
      st.where().isEqual(ALIAS, ORIGIN_AIRPORT_CODE, originAirport);
    if (JwUtility.hasValue(destinationAirport))
      st.where().isEqual(ALIAS, DESTINATION_AIRPORT_CODE, destinationAirport);
    if (JwUtility.hasValue(flightNumber))
      st.where().exists(getFlightNumberExistsSelect(flightNumber));
    if (createdUtcTs != null)
      st.where().isGreaterThanOrEqualTo(ALIAS, CREATED_UTC_TS, createdUtcTs);
    if (statuses != null) st.where().isInStrings(ALIAS, STATUS, statuses);
    st.orderBy(ALIAS, NORMALIZED_BEGIN_UTC_DT);
    st.orderBy(ALIAS, NORMALIZED_END_UTC_DT);
    return composeList(st);
  }
Ejemplo n.º 2
0
  public JwSqlSelect getUserAirportAndRolesAndRoleGroupsSelect(
      String airportCode, String roleOrRoleGroup) {
    boolean isRole = AcRoleEnum.getFromCode(roleOrRoleGroup) != null;
    String roleCode = isRole ? roleOrRoleGroup : null;
    String roleGroupCode = isRole ? null : roleOrRoleGroup;

    AcUserAirportDb ua = null;
    String x = "x";
    String roles = "roles";
    String roleGroups = "roleGroups";
    String airports = "airports";

    JwSqlSelect st = createSelect();
    st.selectString(x, LOGIN);
    st.selectString(x, FIRST_NAME);
    st.selectString(x, LAST_NAME);
    st.selectString(x, roles);
    st.selectString(x, roleGroups);
    st.selectGroupConcat(ua.ALIAS, ua.AIRPORT_CODE, null, "1", null, airports);
    st.from(getUserRolesAndRoleGroupsSelect(roles, roleGroups), x);
    st.fromLeftOuterJoin(null, x, ua.TABLE, ua.ALIAS, LOGIN, ua.LOGIN);
    st.groupBy(1, 2, 3, 4, 5);
    if (JwUtility.hasValue(airportCode)) st.having().contains(null, airports, airportCode);
    if (JwUtility.hasValue(roleCode)) st.having().contains(null, roles, roleCode);
    if (JwUtility.hasValue(roleGroupCode)) st.having().contains(null, roleGroups, roleGroupCode);
    return st;
  }
 private boolean passesAirportFilter(
     String movementAirportCode,
     String filterAirportCode,
     boolean isAll,
     boolean isAirports,
     boolean isNoAirports,
     boolean isSpecifiedAirport) {
   if (isAll) return true;
   if (isAirports && JwUtility.hasValue(movementAirportCode)) return true;
   if (isNoAirports && JwUtility.isEmpty(movementAirportCode)) return true;
   if (isSpecifiedAirport && JwUtility.isEqual(movementAirportCode, filterAirportCode))
     return true;
   return false;
 }
 public boolean hasErrorDisplayLabel() {
   return JwUtility.hasValue(getErrorDisplayLabel());
 }
 public boolean hasDueDtTitle() {
   return JwUtility.hasValue(getDueDtTitle());
 }
 public boolean hasJourneyId() {
   return JwUtility.hasValue(_journeyId);
 }
 public boolean hasAirportCode() {
   return JwUtility.hasValue(_airportCode);
 }
 public boolean hasDeliveredOfHandledPercentDisplay() {
   return JwUtility.hasValue(getDeliveredOfHandledPercentDisplay());
 }
 public boolean hasTag() {
   return JwUtility.hasValue(_messageTag);
 }
 public boolean hasCarrierDestination() {
   return JwUtility.hasValue(_carrierDestination);
 }
 public boolean hasHandledSuccessPercentDisplay() {
   return JwUtility.hasValue(getHandledSuccessPercentDisplay());
 }
Ejemplo n.º 12
0
 public JwList<AcMobileProfile> getAllWhere(String whereClause, Integer rowLimit) {
   JwSqlSelect st = getSelect();
   if (JwUtility.hasValue(whereClause)) st.where().setCondition(whereClause);
   return composeList(st, rowLimit);
 }
 public boolean hasCarrierOrigin() {
   return JwUtility.hasValue(_carrierOrigin);
 }
Ejemplo n.º 14
0
 private void debug(String code, String s) {
   String x = "";
   if (JwUtility.hasValue(code)) x = "    " + code + code + code + code + code + "    ";
   JwLog.debug(AcGlobalDebugChannel.ACTION_PROCESSOR, x + s);
 }
Ejemplo n.º 15
0
 public static boolean isSacsVidesSubclassCode(String s) {
   if (JwUtility.hasValue(s)) return s.contains("T");
   return false;
 }
 public boolean hasContainerNumber() {
   return JwUtility.hasValue(_containerNumber);
 }
 public boolean hasConsignedSuccessPercentDisplay() {
   return JwUtility.hasValue(getConsignedSuccessPercentDisplay());
 }
 public boolean hasContractedParty() {
   return JwUtility.hasValue(_contractedParty);
 }
 public boolean hasConsignedFailurePercentDisplay() {
   return JwUtility.hasValue(getConsignedFailurePercentDisplay());
 }
 public boolean hasSubcontractedCarriers() {
   return JwUtility.hasValue(_subcontractedCarriers);
 }
 public boolean hasHandledFailurePercentDisplay() {
   return JwUtility.hasValue(getHandledFailurePercentDisplay());
 }
Ejemplo n.º 22
0
 public JwList<AcUser> getAllStartingWithMatchingActive(String s, Boolean active) {
   JwSqlSelect st = getSelect();
   if (JwUtility.hasValue(s)) st.where().startsWith(ALIAS, LOGIN, s);
   if (active != null) st.where().isEqual(ALIAS, ACTIVE, active);
   return composeList(st);
 }
 public boolean hasLateOfHandledPercentDisplay() {
   return JwUtility.hasValue(getLateOfHandledPercentDisplay());
 }
 public JwList<AcDomesticCandidateRouteTmp> getAllWhere(String whereClause, Integer rowLimit) {
   JwSqlSelect st = getSelect();
   if (JwUtility.hasValue(whereClause)) st.where().setCondition(whereClause);
   return composeList(st, rowLimit);
 }
 public boolean hasDateRangeDisplayLabel() {
   return JwUtility.hasValue(getDateRangeDisplayLabel());
 }
Ejemplo n.º 26
0
 public boolean hasReferenceNumberDisplayLabel() {
   return JwUtility.hasValue(getReferenceNumberDisplayLabel());
 }
Ejemplo n.º 27
0
 public boolean hasName() {
   return JwUtility.hasValue(_name);
 }
 public boolean hasStatusDisplayLabel() {
   return JwUtility.hasValue(getStatusDisplayLabel());
 }
 public boolean hasTypeDisplayLabel() {
   return JwUtility.hasValue(getTypeDisplayLabel());
 }
 public boolean hasLogin() {
   return JwUtility.hasValue(_login);
 }