Package org.xrace.model

Examples of org.xrace.model.Province


     * @see wicket.markup.html.form.IChoiceRenderer#getDisplayValue(Object)
     */
    @Override
    public Object getDisplayValue(final Object object)
    {
      final Province province = (Province) object;

      if (province == null)
      {
        return "Indépendant";
      }

      final Locale locale = getLocale();
      if (locale.getLanguage().equals(Locale.FRENCH.getLanguage()))
      {
        return province.getNom();
      }
      else
      {
        return province.getName();
      }
    }
View Full Code Here


  {
    final Personne personne = new Personne();

    final Federation defaultFederation = federationService
        .findByCode("CAN");
    final Province defaultProvince = provinceService.findByCode(
        defaultFederation, "QB");

    personne.setPays(defaultFederation);
    personne.setNationalite(defaultFederation);
    personne.setProvince(defaultProvince);
View Full Code Here

    Assert.assertNull(getProvinceService().findByCode(federation, "PQ"));
  }

  public void testSave() throws Exception
  {
    Province province = getProvinceService().findByCode(federation, "QB");
    province.setCode("QC");

    getProvinceService().save(province);
  }
View Full Code Here

  private void createTestPersonnes()
  {
    final Federation paysCan = getFederationService().findByCode("CAN");
    final Federation paysUsa = getFederationService().findByCode("USA");
    Province provinceQc = getProvinceService().findByCode(paysCan, "QB");

    Personne personne;

    personne = new Personne("Doe", "John", "38 rue St-Joseph", "Quebec",
        "G1B 4R8", "418-661-9099",
View Full Code Here

     * Provinces du Canada
     */
    final Federation federationCanada = getFederationService().findByCode(
        "CAN");
    getProvinceService().save(
        new Province(federationCanada, "AB", "Alberta", "Alberta"));
    getProvinceService().save(
        new Province(federationCanada, "BC", "Colombie-Britannique",
            "British Columbia"));
    getProvinceService().save(
        new Province(federationCanada, "MB", "Manitoba", "Manitoba"));
    getProvinceService().save(
        new Province(federationCanada, "NB", "Nouveau-Brunswick",
            "New Brunswick"));
    getProvinceService().save(
        new Province(federationCanada, "NT", "Terre-Neuve-et-Labrador",
            "Newfoundland and Labrador"));
    getProvinceService().save(
        new Province(federationCanada, "NS", "Nouvelle-Écosse",
            "Nova Scotia"));
    getProvinceService().save(
        new Province(federationCanada, "NU", "Nunavut", "Nunavut"));
    getProvinceService().save(
        new Province(federationCanada, "ON", "Ontario", "Ontario"));
    getProvinceService().save(
        new Province(federationCanada, "PEI", "Île-du-Prince-Édouard",
            "Prince Edward Island"));
    getProvinceService().save(
        new Province(federationCanada, "QB", "Québec", "Quebec"));
    getProvinceService().save(
        new Province(federationCanada, "SK", "Saskatchewan",
            "Saskatchewan"));
    getProvinceService().save(
        new Province(federationCanada, "YK", "Yukon", "Yukon"));

    /*
     * États des USA
     */
    final Federation federationUSA = getFederationService().findByCode(
        "USA");
    getProvinceService().save(
        new Province(federationUSA, "AK", "Alaska", "Alaska"));
    getProvinceService().save(
        new Province(federationUSA, "AZ", "Arizona", "Arizona"));
    getProvinceService().save(
        new Province(federationUSA, "AR", "Arkansas", "Arkansas"));
    getProvinceService().save(
        new Province(federationUSA, "CA", "Californie", "California"));
    getProvinceService().save(
        new Province(federationUSA, "CO", "Colorado", "Colorado"));
    getProvinceService()
        .save(new Province(federationUSA, "CT", "Connecticut",
            "Connecticut"));
    getProvinceService().save(
        new Province(federationUSA, "DE", "Delaware", "Delaware"));
    getProvinceService().save(
        new Province(federationUSA, "DC", "District of Columbia",
            "District of Columbia"));
    getProvinceService().save(
        new Province(federationUSA, "FL", "Floride", "Florida"));
    getProvinceService().save(
        new Province(federationUSA, "GA", "Georgie", "Georgia"));
    getProvinceService().save(
        new Province(federationUSA, "HI", "Hawaii", "Hawaii"));
    getProvinceService().save(
        new Province(federationUSA, "ID", "Idaho", "Idaho"));
    getProvinceService().save(
        new Province(federationUSA, "IL", "Illinois", "Illinois"));
    getProvinceService().save(
        new Province(federationUSA, "IN", "Indiana", "Indiana"));
    getProvinceService().save(
        new Province(federationUSA, "IA", "Iowa", "Iowa"));
    getProvinceService().save(
        new Province(federationUSA, "KS", "Kansas", "Kansas"));
    getProvinceService().save(
        new Province(federationUSA, "KY", "Kentucky", "Kentucky"));
    getProvinceService().save(
        new Province(federationUSA, "LA", "Louisiane", "Louisiana"));
    getProvinceService().save(
        new Province(federationUSA, "ME", "Maine", "Maine"));
    getProvinceService().save(
        new Province(federationUSA, "MD", "Maryland", "Maryland"));
    getProvinceService().save(
        new Province(federationUSA, "MA", "Massachusetts",
            "Massachusetts"));
    getProvinceService().save(
        new Province(federationUSA, "MI", "Michigan", "Michigan"));
    getProvinceService().save(
        new Province(federationUSA, "MN", "Minnesota", "Minnesota"));
    getProvinceService()
        .save(new Province(federationUSA, "MS", "Mississippi",
            "Mississippi"));
    getProvinceService().save(
        new Province(federationUSA, "MO", "Missouri", "Missouri"));
    getProvinceService().save(
        new Province(federationUSA, "MT", "Montana", "Montana"));
    getProvinceService().save(
        new Province(federationUSA, "NE", "Nebraska", "Nebraska"));
    getProvinceService().save(
        new Province(federationUSA, "NV", "Nevada", "Nevada"));
    getProvinceService().save(
        new Province(federationUSA, "NH", "New Hampshire",
            "New Hampshire"));
    getProvinceService().save(
        new Province(federationUSA, "NJ", "New Jersey", "New Jersey"));
    getProvinceService().save(
        new Province(federationUSA, "NM", "Nouveau Mexique",
            "New Mexico"));
    getProvinceService().save(
        new Province(federationUSA, "NY", "New York", "New York"));
    getProvinceService().save(
        new Province(federationUSA, "NC", "Caroline du nord",
            "North Carolina"));
    getProvinceService().save(
        new Province(federationUSA, "ND", "Dakota du nord",
            "North Dakota"));
    getProvinceService().save(
        new Province(federationUSA, "OH", "Ohio", "Ohio"));
    getProvinceService().save(
        new Province(federationUSA, "OK", "Oklahoma", "Oklahoma"));
    getProvinceService().save(
        new Province(federationUSA, "OR", "Oregon", "Oregon"));
    getProvinceService().save(
        new Province(federationUSA, "PA", "Pennsylvanie",
            "Pennsylvania"));
    getProvinceService()
        .save(new Province(federationUSA, "PR", "Puerto Rico",
            "Puerto Rico"));
    getProvinceService().save(
        new Province(federationUSA, "RI", "Rhode Island",
            "Rhode Island"));
    getProvinceService().save(
        new Province(federationUSA, "SC", "Caroline du sud",
            "South Carolina"));
    getProvinceService().save(
        new Province(federationUSA, "SD", "Dakota du sud",
            "South Dakota"));
    getProvinceService().save(
        new Province(federationUSA, "TN", "Tennessee", "Tennessee"));
    getProvinceService().save(
        new Province(federationUSA, "TX", "Texas", "Texas"));
    getProvinceService().save(
        new Province(federationUSA, "UT", "Utah", "Utah"));
    getProvinceService().save(
        new Province(federationUSA, "VT", "Vermont", "Vermont"));
    getProvinceService().save(
        new Province(federationUSA, "VI", "Virgin Islands",
            "Virgin Islands"));
    getProvinceService().save(
        new Province(federationUSA, "VA", "Virginie", "Virginia"));
    getProvinceService().save(
        new Province(federationUSA, "WA", "Washington", "Washington"));
    getProvinceService().save(
        new Province(federationUSA, "WV", "West Virginia",
            "West Virginia"));
    getProvinceService().save(
        new Province(federationUSA, "WI", "Wisconsin", "Wisconsin"));
    getProvinceService().save(
        new Province(federationUSA, "WY", "Wyoming", "Wyoming"));
  }
View Full Code Here

TOP

Related Classes of org.xrace.model.Province

Copyright © 2018 www.massapicom. 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.