Examples of CountryCode


Examples of de.forsthaus.backend.model.CountryCode

  }

  @Test
  @Transactional
  public void getCountryCodeByCode2() {
    CountryCode obj = getCountryCodeDAO().getCountryCodeByCode2("DE");
    Assert.assertEquals("Not the expected result", "GERMANY", obj.getCcdName());
  }
View Full Code Here

Examples of de.forsthaus.backend.model.CountryCode

  }

  @Test
  @Transactional
  public void saveOrUpdateCountryCode() {
    CountryCode entity = getCountryCodeDAO().getNewCountryCode();
    entity.setCcdCode2("XX");
    entity.setCcdName("testcode");

    getCountryCodeDAO().saveOrUpdate(entity);

    List<CountryCode> list = getCountryCodeDAO().getAllCountryCodes();
    for (CountryCode obj : list) {
      System.out.println(obj.getId() + " / " + obj.getCcdName());
    }

    CountryCode obj2 = getCountryCodeDAO().getCountryCodeByCode2("xx");
    Assert.assertEquals("Not the expected result", "UNROUTABLE ADDRESS", obj2.getCcdName());
  }
View Full Code Here

Examples of de.forsthaus.backend.model.CountryCode

  }

  @Test
  @Transactional
  public void deleteCountryCode() {
    CountryCode entity = getCountryCodeDAO().getNewCountryCode();
    entity.setCcdCode2("XX");
    entity.setCcdName("testcode");

    getCountryCodeDAO().saveOrUpdate(entity);

    List<CountryCode> list = getCountryCodeDAO().getAllCountryCodes();
    for (CountryCode obj : list) {
      System.out.println(obj.getId() + " / " + obj.getCcdName());
    }

    CountryCode obj2 = getCountryCodeDAO().getCountryCodeByCode2("xx");
    Assert.assertEquals("Not the expected result", "UNROUTABLE ADDRESS", obj2.getCcdName());

    getCountryCodeDAO().delete(entity);
  }
View Full Code Here

Examples of de.forsthaus.backend.model.CountryCode

  }

  @Test
  @Transactional
  public void saveCountryCode() {
    CountryCode entity = getCountryCodeDAO().getNewCountryCode();
    entity.setCcdCode2("XX");
    entity.setCcdName("testcode");

    getCountryCodeDAO().saveOrUpdate(entity);

    List<CountryCode> list = getCountryCodeDAO().getAllCountryCodes();
    for (CountryCode obj : list) {
      System.out.println(obj.getId() + " / " + obj.getCcdName());
    }

    CountryCode obj2 = getCountryCodeDAO().getCountryCodeByCode2("xx");
    Assert.assertEquals("Not the expected result", "UNROUTABLE ADDRESS", obj2.getCcdName());
  }
View Full Code Here

Examples of de.forsthaus.backend.model.CountryCode

      // Fill with the related data for Ip2Country
      final Ip2Country ip2 = secLoginlog.getIp2Country();
      if (ip2 != null) {
        // Fill with the related data for CountryCode
        final CountryCode cc = ip2.getCountryCode();
        if (cc != null) {
        }

      }
    }
View Full Code Here

Examples of de.forsthaus.backend.model.CountryCode

      // Fill with the related data for Ip2Country
      final Ip2Country ip2 = secLoginlog.getIp2Country();
      if (ip2 != null) {
        // Fill with the related data for CountryCode
        final CountryCode cc = ip2.getCountryCode();
        if (cc != null) {
        }

      }
    }
View Full Code Here

Examples of de.forsthaus.backend.model.CountryCode

      // Fill with the related data for Ip2Country
      final Ip2Country ip2 = secLoginlog.getIp2Country();
      if (ip2 != null) {
        // Fill with the related data for CountryCode
        final CountryCode cc = ip2.getCountryCode();
        if (cc != null) {
        }

      }
    }
View Full Code Here

Examples of de.forsthaus.backend.model.CountryCode

      lc = new Listcell();
      final Hbox hbox = new Hbox();
      hbox.setParent(lc);

      // Fill with the related data for CountryCode
      final CountryCode cc = ip2.getCountryCode();
      if (cc != null) {
        /* Flag-image */
        final Image img = new Image();
        final String path = "/images/countrycode_flags/";
        final String flag = StringUtils.lowerCase(cc.getCcdCode2()) + ".gif";
        img.setSrc(path + flag);
        hbox.appendChild(img);

        final Separator sep = new Separator();
        hbox.appendChild(sep);

        /* Country */
        final Label label = new Label();
        label.setValue(cc.getCcdCode2());
        hbox.appendChild(label);

        // show other stuff from the Ip2Country
        /* Provider-City */
        final Label label2 = new Label();
View Full Code Here

Examples of slash.navigation.fpl.CountryCode

*/

public class CountryCodeListCellRenderer extends DefaultListCellRenderer {
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        CountryCode countryCode = CountryCode.class.cast(value);
        String text;
        if (countryCode != null) {
            if (None.equals(countryCode))
                text = RouteConverter.getBundle().getString("country-code-none");
            else
                text = countryCode.name().replaceAll("_", " ") +
                        " (" + countryCode.value() + ")";
        } else
            text = null;
        label.setText(text);
        return label;
    }
View Full Code Here

Examples of slash.navigation.fpl.CountryCode

        comboBoxCountryCode.setModel(new DefaultComboBoxModel(CountryCode.values()));
        comboBoxCountryCode.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() != SELECTED)
                    return;
                CountryCode countryCode = (CountryCode) e.getItem();
                getPosition().setCountryCode(countryCode);
                validateModel();
            }
        });
        comboBoxWaypointType.setRenderer(new WaypointTypeListCellRenderer());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.