Examples of City


Examples of com.orientechnologies.orient.test.domain.business.City

    Account a;
    for (Object o : database.browseCluster("Account")) {
      a = (Account) o;

      if (i % 2 == 0)
        a.getAddresses().set(0, new Address("work", new City(new Country("Spain"), "Madrid"), "Plaza central"));

      a.setSalary(i + 500.10f);

      database.save(a);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

    database = ODatabaseObjectPool.global().acquire(url, "admin", "admin");

    long profiles = database.countClass("Profile");

    Profile neo = new Profile("Neo").setValue("test").setLocation(
        new Address("residence", new City(new Country("Spain"), "Madrid"), "Rio de Castilla"));
    neo.addFollowing(new Profile("Morpheus"));
    neo.addFollowing(new Profile("Trinity"));

    database.save(neo);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

    beginCities = database.countClusterElements("City");

    Country italy = new Country("Italy");

    Profile garibaldi = new Profile("GGaribaldi", "Giuseppe", "Garibaldi", null);
    garibaldi.setLocation(new Address("Residence", new City(italy, "Rome"), "Piazza Navona, 1"));

    Profile bonaparte = new Profile("NBonaparte", "Napoleone", "Bonaparte", garibaldi);
    bonaparte.setLocation(new Address("Residence", garibaldi.getLocation().getCity(), "Piazza di Spagna, 111"));
    database.save(bonaparte);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

  }

  @Test(dependsOnMethods = "testCityEquality")
  public void testSaveCircularLink() {
    Profile winston = new Profile("WChurcill", "Winston", "Churcill", null);
    winston.setLocation(new Address("Residence", new City(new Country("England"), "London"), "unknown"));

    Profile nicholas = new Profile("NChurcill", "Nicholas ", "Churcill", winston);
    nicholas.setLocation(winston.getLocation());

    nicholas.setInvitedBy(winston);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

  @Test(dependsOnMethods = "testQueryCircular")
  public void testSaveMultiCircular() {
    startRecordNumber = database.countClusterElements("Profile");

    Profile bObama = new Profile("ThePresident", "Barack", "Obama", null);
    bObama.setLocation(new Address("Residence", new City(new Country("Hawaii"), "Honolulu"), "unknown"));
    bObama.addFollower(new Profile("PresidentSon1", "Malia Ann", "Obama", bObama));
    bObama.addFollower(new Profile("PresidentSon2", "Natasha", "Obama", bObama));

    database.save(bObama);
  }
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

    Account a;
    for (Object o : database.browseCluster("Account")) {
      a = (Account) o;

      if (i % 2 == 0)
        a.getAddresses().set(0, new Address("work", new City(new Country("Spain"), "Madrid"), "Plaza central"));

      a.setSalary(i + 500.10f);

      database.save(a);
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.City

    database = ODatabaseObjectPool.global().acquire(url, "admin", "admin");

    long profiles = database.countClass("Profile");

    Profile neo = new Profile("Neo").setValue("test").setLocation(
        new Address("residence", new City(new Country("Spain"), "Madrid"), "Rio de Castilla"));
    neo.addFollowing(new Profile("Morpheus"));
    neo.addFollowing(new Profile("Trinity"));

    database.save(neo);
View Full Code Here

Examples of de.gamobi.jkariam.core.City

      if(cityName == null) {
        return;
      }
    }
   
    City city;
    try {
      city = City.createNewCity(this.account.getPlayer(), cityName);
    } catch (Exception e) {
      e.printStackTrace();
      return;
View Full Code Here

Examples of er.plugintest.model.City

      for (int i = 0; i < 25; i++) {
        ERXEC ec = (ERXEC) ERXEC.newEditingContext();
        ec.lock();
        try {
          Country country = Country.fetchAllCountries(ec).lastObject();
          City city = City.createCity(ec, RandomStringUtils.randomAlphabetic(15));
          city.setCountryRelationship(country);
         
          ec.saveChanges();
        } finally {
          ec.unlock();
        }
View Full Code Here

Examples of models.City

  }

  public static void tryCities() {
    List<City> cities = new ArrayList<City>();
    for(int i=0; i<100; i++){
      City city = new City("city"+i, new String[] { "alpha", "beta" });
      cities.add(city);
    }
   
    Model.batch(City.class).insert(cities);
    int nbBefore = Model.all(City.class).count();
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.