Examples of Country


Examples of cn.edu.zju.acm.onlinejudge.bean.enumeration.Country

                            ps = conn.prepareStatement(UserPersistenceImpl.GET_ALL_COUNTRIES);
                            ResultSet rs = ps.executeQuery();

                            List<Country> countries = new ArrayList<Country>();
                            while (rs.next()) {
                                countries.add(new Country(rs.getLong(DatabaseConstants.COUNTRY_COUNTRY_ID),
                                                          rs.getString(DatabaseConstants.COUNTRY_NAME)));
                            }
                            this.allCountries = Collections.unmodifiableList(countries);
                        } finally {
                            Database.dispose(ps);
View Full Code Here

Examples of com.alibaba.json.bvt.bug.Bug_for_lenolix_9.Address.Country

        address.setStreet("wangshang.RD");
        address.setPostCode(310002);
        submap4.put("address1", address);
        submap4.put("address2", address);

        Country country = address.new Country();
        country.setProvince("ZheJiang");
       
        address.setCountry(country);

        String mapString4 = JSON.toJSONString(submap4, SerializerFeature.WriteClassName,
                                              SerializerFeature.WriteMapNullValue);
View Full Code Here

Examples of com.avaje.tests.model.basic.Country

    Assert.assertTrue(countryCache.size() > 0);

    // reset the statistics
    countryCache.getStatistics(true);

    Country c0 = Ebean.getReference(Country.class, "NZ");
    ServerCacheStatistics statistics = countryCache.getStatistics(false);
    int hc = statistics.getHitCount();
    Assert.assertEquals(1, hc);
    Assert.assertNotNull(c0);
View Full Code Here

Examples of com.avaje.tests.model.basic.Country

    ServerCacheStatistics statistics = cache.getStatistics(false);
    Assert.assertEquals(1, statistics.getSize());
    Assert.assertEquals(1, statistics.getHitCount());
    Assert.assertSame(countryList1, countryList0);
   
    Country nz = Ebean.find(Country.class, "NZ");
    nz.setName("New Zealandia");
    Ebean.save(nz);
   
    statistics = cache.getStatistics(false);
    Assert.assertEquals(0, statistics.getSize());
   
View Full Code Here

Examples of com.avaje.tests.model.basic.Country

      .setUseQueryCache(true)
      .setReadOnly(true)
      .order("name")
      .findMap();
   
    Country loadedNz = map.get("NZ");
   
    // this will hit the cache
    Country nz = Ebean.find(Country.class, "NZ");
   
    Assert.assertTrue(loadedNz == nz);
  }
View Full Code Here

Examples of com.avaje.tests.model.basic.Country

    serverCacheManager.clear(Country.class);

    ServerCache beanCache = serverCacheManager.getBeanCache(Country.class);
    Assert.assertEquals(0, beanCache.size());

    Country nz1 = Ebean.getReference(Country.class, "NZ");
    Assert.assertEquals(0, beanCache.size());

    // has the effect of loading the cache via lazy loading
    nz1.getName();
    Assert.assertEquals(1, beanCache.size());

    Country nz2 = Ebean.getReference(Country.class, "NZ");
    Country nz2b = Ebean.getReference(Country.class, "NZ");

    Country nz3 = Ebean.find(Country.class, "NZ");

    Country nz4 = Ebean.find(Country.class).setId("NZ").setAutofetch(false).setUseCache(false)
        .findUnique();

    Assert.assertTrue(nz2 == nz2b);
    Assert.assertTrue(nz2 == nz3);
    Assert.assertTrue(nz3 != nz4);
View Full Code Here

Examples of com.bean.Country

      HttpServletResponse response, ModelMap model) {

    logger.info("entro a controladora");

    List<Country> countries = new ArrayList<Country>();
    countries.add(new Country("IND", "INDIA"));
    countries.add(new Country("US", "USA"));
    countries.add(new Country("AU", "AUSTRALIA"));
    countries.add(new Country("MX", "MEXICO"));
    countries.add(new Country("COL", "COLOMBIA"));

    model.addAttribute("listCountries", countries);

    return "contacto";
  }
View Full Code Here

Examples of com.coherentlogic.wb.client.core.domain.Country

    @Test
    public void findCountry () {

        List<Country> countryList = countries.getCountryList();

        Country country = countryList.get(2);

        reviewCountry (country);

        Long id = country.getPrimaryKey();

        assertNotNull (id);

        Country persistedCountry = countryDAO.find(id);

        assertNotNull (persistedCountry);
    }
View Full Code Here

Examples of com.coherentlogic.wb.client.core.domain.Country

        List<Country> countryList = parent.getCountryList();

        assertNotNull (countryList);
        assertEquals (10, countryList.size ());

        Country firstCountry = countryList.get(0);

        assertNull (firstCountry.getPrimaryKey());

        return parent;
    }
View Full Code Here

Examples of com.devsniper.desktop.customers.model.Country

        new CountryForm(this, country).showDialog();
    }

    @Override
    public void onAddNew() {
        openFormView(new Country());
    }
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.