Examples of Country


Examples of com.liferay.faces.demos.dto.Country

  private List<Country> countries;

  @Override
  public Country findByAbbreviation(String countryAbbreviation) {

    Country country = null;

    getCountries();

    for (Country curCountry : countries) {
View Full Code Here

Examples of com.liferay.portal.model.Country

    try {

      PermissionThreadLocal.setPermissionChecker(new OminAdminPermissionChecker());

      Country brazil = CountryServiceUtil.getCountryByA2("BR");
      long countryId = brazil.getCountryId();

      List<Region> regions = RegionServiceUtil.getRegions(countryId);

      if (regions.isEmpty()) {
        RegionServiceUtil.addRegion(countryId, "AL","Alagoas", true);
View Full Code Here

Examples of com.maxmind.geoip.Country

   * @param date  The date to use for the increment.
   * @throws IOException When updating the counter fails.
   */
  public void incrementUsage(String shortId, RequestInfo info, long incrBy,
      Date date) throws IOException {
    Country country = null;
    if (info != null) {
      country = rm.getCountry(info.get(RequestInfo.InfoName.RemoteAddr));
    }
    // increment user statistics
    HTable table = rm.getTable(ShortUrlTable.NAME);
    byte[] rowKey = Bytes.toBytes(shortId);
    Increment increment = new Increment(rowKey);
    increment.addColumn(ShortUrlTable.DATA_FAMILY, ShortUrlTable.CLICKS,
      incrBy);
    addIncrement(increment, StatisticsCategory.CLICK, date, null, incrBy);
    if (country != null) {
      addIncrement(increment, StatisticsCategory.COUNTRY, date,
        country.getCode(), incrBy);
    }
    table.increment(increment);
    rm.putTable(table);
  }
View Full Code Here

Examples of com.maxmind.geoip2.record.Country

    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.PREHOME.getVelocityPage());

    final String remoteAddress = requestUtil.getRemoteAddr(request);
        model.addAttribute(ModelConstants.GEOLOC_REMOTE_ADDRESS, remoteAddress);
       
    final Country country = geolocService.geolocAndGetCountry(remoteAddress);
        model.addAttribute(ModelConstants.GEOLOC_COUNTRY, country);

        final City city = geolocService.geolocAndGetCity(remoteAddress);
        model.addAttribute(ModelConstants.GEOLOC_CITY, city);
View Full Code Here

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

    database.open("admin", "admin");

    final long beginProfiles = database.countClusterElements("Profile");
    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);
View Full Code Here

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

  }

  @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.Country

  @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.Country

    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.Country

    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.Country

  }

  @Test(dependsOnMethods = "testInsertCommit")
  public void testInsertRollback() {
    String initialCountryName = "insertRollback";
    Country country = new Country(initialCountryName);

    long initCount = database.countClass(Country.class);

    database.begin();
    database.save(country);
    database.rollback();

    Assert.assertEquals(database.countClass(Country.class), initCount);
    Assert.assertNull(country.getId());
    Assert.assertNull(country.getVersion());
  }
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.