Package net.sf.mp.demo.conference.domain.admin

Examples of net.sf.mp.demo.conference.domain.admin.Country


       setId (id);
       //attributes
       setStreet1 (street1);
       setStreet2 (street2);
       //parents
       this.countryId = new Country();
       this.countryId.setId(countryId); //Country Column [name=id; type=INTEGER] - local Address Column [name=country_id; type=INTEGER]
    }
View Full Code Here


      return referCountryUseCache (country, false);
   }
         
   public Country referCountryUseCache (Country country, boolean isAssign) {
    String key = getCacheKey(null, country, null, "assignCountry");
      Country countryCache = (Country)simpleCache.get(key);
      if (countryCache==null) {
         countryCache = referCountry (country, isAssign);
         if (key!=null)
           simpleCache.put(key, countryCache);
      }
View Full Code Here

     BeanUtils.populateBeanObject(country, beanPath, value);
  }
      // to set in super class BEWARE: genericity is only one level!!!!! first level is a copy second level is a reference!!! change to country.clone() instead
  private Country cloneCountry (Country country) throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {
    //return (Country) BeanUtils.cloneBeanObject(country);
     if (country==null) return new Country();
     return country.clone();
  }
View Full Code Here

   private List getFirstResultWhereConditionsAre (Country country) {
      return  partialLoadWithParentCountryQueryResult(getDefaultCountryWhat(), country, null, 1, false)
   }
  
   protected Country getDefaultCountryWhat() {
      Country country = new Country();
      country.setId(Integer.valueOf("-1"));
      return country;
   }
View Full Code Here

    }
     
   private List<Country> convertPartialLoadWithParentCountry(List<Object[]> list, Map<Integer, String> beanPath, Country countryWhat) throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {
     List<Country> resultList = new ArrayList<Country>();
     for (Object[] row : list) {   
        Country country = cloneCountry (countryWhat);
        Iterator<Entry<Integer, String>> iter = beanPath.entrySet().iterator()
        while (iter.hasNext()) {
           Entry entry = iter.next();
           populateCountry (country, row[(Integer)entry.getKey()], (String)entry.getValue());
        }
View Full Code Here

  
   
   private List<Country> convertPartialLoadWithParentCountryWithOneElementInRow(List<Object> list, Map<Integer, String> beanPath, Country countryWhat) throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {
     List<Country> resultList = new ArrayList<Country>();
     for (Object row : list) {   
        Country country = cloneCountry (countryWhat);
        Iterator<Entry<Integer, String>> iter = beanPath.entrySet().iterator()
        while (iter.hasNext()) {
           Entry entry = iter.next();
           populateCountry (country, row, (String)entry.getValue());
        }
View Full Code Here

         if (countPartialField==1) {
          row = new Object[1];
          row[0] = iter.next();
         } else
          row = (Object[]) iter.next();
       Country countryResult = new Country();
           if (country.getId() != null) {
        countryResult.setId((Integer) row[index]);
        index++;
           }
           if (country.getName() != null) {
        countryResult.setName((String) row[index]);
        index++;
           }
           if (country.getIsoName() != null) {
        countryResult.setIsoName((String) row[index]);
        index++;
           }
           returnList.add(countryResult);
        }
      return returnList;
View Full Code Here

    }

  private List<Country> copy(List<Country> inputs) {
    List<Country> l = new ArrayList<Country>();
    for (Country input : inputs) {
      Country copy = new Country();
      copy.copy(input);
      l.add(copy);
    }
    return l;
  }
View Full Code Here

TOP

Related Classes of net.sf.mp.demo.conference.domain.admin.Country

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.