示例#1
0
 public AgencyV2Bean getAgency(AgencyBean agency) {
   AgencyV2Bean bean = new AgencyV2Bean();
   bean.setDisclaimer(agency.getDisclaimer());
   bean.setId(agency.getId());
   bean.setLang(agency.getLang());
   bean.setName(agency.getName());
   bean.setPhone(agency.getPhone());
   bean.setPrivateService(agency.isPrivateService());
   bean.setTimezone(agency.getTimezone());
   bean.setUrl(agency.getUrl());
   return bean;
 }
示例#2
0
 /** ** References Methods ** */
 public void addToReferences(AgencyBean agency) {
   if (!shouldAddReferenceWithId(_references.getAgencies(), agency.getId())) return;
   AgencyV2Bean bean = getAgency(agency);
   _references.addAgency(bean);
 }
  @Cacheable
  public AgencyBean getAgencyForId(String id) {

    AgencyNarrative agency = _narrativeService.getAgencyForId(id);

    if (agency == null) return null;

    AgencyBean bean = new AgencyBean();
    bean.setId(id);
    bean.setLang(agency.getLang());
    bean.setName(agency.getName());
    bean.setPhone(agency.getPhone());
    bean.setTimezone(agency.getTimezone());
    bean.setUrl(agency.getUrl());
    bean.setDisclaimer(agency.getDisclaimer());
    bean.setPrivateService(agency.isPrivateService());
    bean.setFareUrl(agency.getFareUrl());
    bean.setEmail(agency.getEmail());

    return bean;
  }