Examples of Country


Examples of org.nutz.dao.test.meta.Country

    b.setLevel(6);
    b.getCountry().setName("ABC");
    dao.updateWith(b, "country");
    b = dao.fetch(Base.class, b.getName());
    assertEquals(6, b.getLevel());
    Country c = dao.fetch(Country.class, b.getCountryId());
    assertEquals("ABC", c.getName());
  }
View Full Code Here

Examples of org.objectweb.speedo.pobjects.fetchgroup.Country

   * test the definition of a fetch-group in the jdo file with a a.b.c field
   * <field name="a.b.c">
   */
  public void testRefreshReference() {
    logger.log(BasicLevel.DEBUG, "***************testRefreshReference*****************");
    Country country = new Country("it","Italie");
    Address address = new Address("Rue Spiaggi", "Milan", country);
    Person parent = new Person();
    parent.setName("Del Piero Joel");
    parent.setAge(32);
    parent.setAddress(address);
    Person child1 = new Person("Del Piero Sophie", address, null, 14);
    Person child2 = new Person("Del Piero Mikael", address, null, 11);
    Set children = new HashSet();
    children.add(child1);
    children.add(child2);
    parent.setChildren(children);
    PersistenceManager pm = pmf.getPersistenceManager();
    try {
      FetchPlan fp = pm.getFetchPlan();
      fp.clearGroups();
      fp.addGroup("detail").removeGroup("default");
      pm.currentTransaction().begin();
      logger.log(BasicLevel.DEBUG, "make persistent the person " + parent.toString());
      pm.makePersistent(parent);
      Object id = pm.getObjectId(parent);
      pm.currentTransaction().commit();
      logger.log(BasicLevel.DEBUG, "FG: " + fp.getGroups());
   
      pm.currentTransaction().begin();
      //update the age and the address
      parent.setAge(99);
      Address newAddress = new Address("rue Ampere", "Rennes", new Country("bz", "Bretagne"));
      parent.setAddress(newAddress);
      pm.refresh(parent)
      pm.currentTransaction().commit();
      assertEquals(32, parent.getAge());
      assertEquals(address.getCity(), parent.getAddress().getCity());
View Full Code Here

Examples of org.objectweb.speedo.tutorial.pobjects.basics.Country

   * Make objects persistent
   */
  public static void makePersistent() {
    System.out.println("***************makePersistent*****************");
    //create a country and 3 addresses
    Country france = new Country("fr", "France");
    Address address1 = new Address("rue de Mons", "Avignon", france);
    Address address2 = new Address("impasse St Jacques", "Clermont", france);
    Address address3 = new Address("rue Laffiteau", "Paris", france);
   
    PersistenceManager pm = pmf.getPersistenceManager();
View Full Code Here

Examples of org.openbravo.model.common.geography.Country

   * Tests Access Level System Client.
   */
  public void testAccessLevelSC() {
    setUserContext("0");
    final Organization o = OBDal.getInstance().get(Organization.class, "1000001");
    final Country c = OBDal.getInstance().get(Country.class, "100");
    c.setOrganization(o);

    try {
      commitTransaction();
      fail("The organization of a system client may not be set to a non-zero org.");
    } catch (final OBException e) {
View Full Code Here

Examples of org.openqreg.bean.Country

   
    Collection<LanguageBean> languages = LanguageFinderBase.findAll();
    Language language = languages.iterator().next();
   
    Collection<CountryBean> countries = CountryFinderBase.findAll();
    Country country = countries.iterator().next();
   
    Collection<CentretypeBean> centretypes = CentretypeFinderBase.findAll();
    Centretype centretype = centretypes.iterator().next();
   
    testCentre.setId(centreid);
    testCentre.setCentrename(centreid);
    testCentre.setBelongsto(null);
    testCentre.setCentreshortname(centreid.substring(0, 9));
    testCentre.setTimezone(null);
    testCentre.setImportformat(null);
    testCentre.setImporting(new Integer(0));
    testCentre.setStatus(new Integer(Status.ACTIVE));
    testCentre.setLanguageid(language.getLanguageid());
    testCentre.setCountryid(country.getId());
    testCentre.setTypeid(centretype.getId());
    testCentre.setTest(new Integer(1));
    testCentre.setDefaultlanguageid(language.getLanguageid());
    testCentre.setCreatedby("System");
    testCentre.setTscreated(new Timestamp(System.currentTimeMillis()));
View Full Code Here

Examples of org.richfaces.demo.tree.model.Country

    @PostConstruct
    public void init() {
        for (CDXmlDescriptor current : cdXmlDescriptors) {
            String countryName = current.getCountry();
            String companyName = current.getCompany();
            Country country = getCountryByName(current);
            Company company = getCompanyByName(current, country);
            CD cd = new CD(current.getTitle(), current.getArtist(), company, current.getPrice(), current.getYear());
            company.getCds().add(cd);
        }
    }
View Full Code Here

Examples of org.richfaces.demo.tree.model.Country

        tree.setRowKey(storedKey);
    }

    private Country getCountryByName(CDXmlDescriptor descriptor) {
        String countryName = descriptor.getCountry();
        Country country = countriesCache.get(countryName);
        if (country == null) {
            country = new Country();
            country.setName(countryName);
            countriesCache.put(countryName, country);
            rootNodes.add(country);
        }
        return country;
    }
View Full Code Here

Examples of org.springframework.data.envers.sample.Country

    License license = new License();
    license.name = "Schnitzel";

    licenseRepository.save(license);

    Country de = new Country();
    de.code = "de";
    de.name = "Deutschland";

    countryRepository.save(de);

    Country se = new Country();
    se.code = "se";
    se.name = "Schweden";

    countryRepository.save(se);
View Full Code Here

Examples of org.spw.model.Country

public class CountryDataProvider extends ObjectListDataProvider {
    private ArrayList<Country> aList = new ArrayList<Country>();
    /** Creates a new instance of CountryDataProvider */
    public CountryDataProvider() {
        // Put in dummy data for design time
        aList.add(new Country());

        // Wrap the list
        setList(aList);       
    }
View Full Code Here

Examples of org.zeroexchange.model.location.Country

        countryChoice.add(new AjaxFormComponentUpdatingBehavior("onclick") {
            private static final long serialVersionUID = 1L;

            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                Country country = countryChoice.getModelObject();
                if(country != null) {
                    cityChoice.setChoices(getCities(country));
                    target.add(cityChoice);
                }
            }
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.