protected AcConsignment getConsignment(Integer id) {
   AcConsignment c = _consignmentMap.get(id);
   if (c == null) {
     c = _access.getConsignmentDb().getConsignment(id);
     _consignmentMap.put(id, c);
   }
   return c;
 }
 private AcAirport getAirport(JwMap<String, AcAirport> airportCache, String code) {
   AcAirport e = airportCache.get(code);
   if (e == null) {
     e = getAccess().getAirportDb().getAirport(code);
     airportCache.put(code, e);
   }
   return e;
 }
 public AcGlobalLanguage getGlobalLanguage(AcGlobalLanguagePkIF pk) {
   JwMap<AcGlobalLanguagePkIF, AcGlobalLanguage> m = getGlobalLanguageMap();
   AcGlobalLanguage e = m.get(pk);
   if (isAllLoaded()) return e;
   if (e == null) {
     if (isSingleLoad() && m.containsKey(pk)) return null;
     e = getGlobalLanguageFromDb(pk);
     m.put(pk, e);
   }
   return e;
 }
 public AcMonitorAlert getMonitorAlert(AcMonitorAlertPkIF pk) {
   JwMap<AcMonitorAlertPkIF, AcMonitorAlert> m = getMonitorAlertMap();
   AcMonitorAlert e = m.get(pk);
   if (isAllLoaded()) return e;
   if (e == null) {
     if (isSingleLoad() && m.containsKey(pk)) return null;
     e = getMonitorAlertFromDb(pk);
     m.put(pk, e);
   }
   return e;
 }
 public AcEquipment getEquipment(AcEquipmentPkIF pk) {
   JwMap<AcEquipmentPkIF, AcEquipment> m = getEquipmentMap();
   AcEquipment e = m.get(pk);
   if (isAllLoaded()) return e;
   if (e == null) {
     if (isSingleLoad() && m.containsKey(pk)) return null;
     e = getEquipmentFromDb(pk);
     m.put(pk, e);
   }
   return e;
 }
 public AcUploadDownloadFile getUploadDownloadFile(AcUploadDownloadFilePkIF pk) {
   JwMap<AcUploadDownloadFilePkIF, AcUploadDownloadFile> m = getUploadDownloadFileMap();
   AcUploadDownloadFile e = m.get(pk);
   if (isAllLoaded()) return e;
   if (e == null) {
     if (isSingleLoad() && m.containsKey(pk)) return null;
     e = getUploadDownloadFileFromDb(pk);
     m.put(pk, e);
   }
   return e;
 }
 public AcInclusionOperator getInclusionOperator(AcInclusionOperatorPkIF pk) {
   JwMap<AcInclusionOperatorPkIF, AcInclusionOperator> m = getInclusionOperatorMap();
   AcInclusionOperator e = m.get(pk);
   if (isAllLoaded()) return e;
   if (e == null) {
     if (isSingleLoad() && m.containsKey(pk)) return null;
     e = getInclusionOperatorFromDb(pk);
     m.put(pk, e);
   }
   return e;
 }
 public AcUspsInternationalRouteStatus getUspsInternationalRouteStatus(
     AcUspsInternationalRouteStatusPkIF pk) {
   JwMap<AcUspsInternationalRouteStatusPkIF, AcUspsInternationalRouteStatus> m =
       getUspsInternationalRouteStatusMap();
   AcUspsInternationalRouteStatus e = m.get(pk);
   if (isAllLoaded()) return e;
   if (e == null) {
     if (isSingleLoad() && m.containsKey(pk)) return null;
     e = getUspsInternationalRouteStatusFromDb(pk);
     m.put(pk, e);
   }
   return e;
 }
 public AcUspsDomesticSupplyCircuity getUspsDomesticSupplyCircuity(
     AcUspsDomesticSupplyCircuityPkIF pk) {
   JwMap<AcUspsDomesticSupplyCircuityPkIF, AcUspsDomesticSupplyCircuity> m =
       getUspsDomesticSupplyCircuityMap();
   AcUspsDomesticSupplyCircuity e = m.get(pk);
   if (isAllLoaded()) return e;
   if (e == null) {
     if (isSingleLoad() && m.containsKey(pk)) return null;
     e = getUspsDomesticSupplyCircuityFromDb(pk);
     m.put(pk, e);
   }
   return e;
 }
  protected AcCn46ActualConveyanceModel getModel(
      AcItem i, AcUpuTag upuTag, String offloadingAirport, boolean splitOnDispatchDestination) {
    AcFlight f = getDepartingFlight(i.getId());
    AcResult last = getLastHandledAction(i.getId());

    _dummy.clear();
    _dummy.setTypeFromTag(upuTag);
    if (splitOnDispatchDestination)
      _dummy.setDispatchDestination(upuTag.getDestinationDispatchImpcCode());
    if (last != null) {
      AcAirport a = getAirport(last.getAirportCode());
      _dummy.setLastHandledAirport(last.getAirportCode());
      _dummy.setGeneratedTz(a.getTimeZone());
    }
    _dummy.setOriginAdministration(i.getUpuShortPostName());
    _dummy.setAirportOfOffloading(offloadingAirport);
    if (f != null) {
      _dummy.setAirportOfLoading(f.getOriginAirportCode());
      _dummy.setFlightCarrierCode(f.getOperatorCarrierCode());
      _dummy.setFlightNumber(f.getOperatorNumber());
      _dummy.setFlightNumberDisplayLabel(f.getOperatorNumberDisplayLabel());
      _dummy.setDepartureDt(
          f.hasActualDepartureLocalTs()
              ? f.getActualDepartureLocalTs().getDate()
              : f.getScheduledDepartureLocalDt());
    }
    String key = _dummy.getHashKey();
    AcCn46ActualConveyanceModel model = _models.get(key);
    if (model == null) {
      model = _dummy.getCopy();
      model.setCarrierCode(AcUtility.getAccountCarrierName(_access.getAccountCode()));
      model.setGeneratedTs(_nowUtcTs);
      model.setNote("** Note: This document was generated out of VelocityMail **");
      _models.put(key, model);
    }

    return model;
  }