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

Examples of net.sf.mp.demo.conference.domain.conference.Address


      return referAddressUseCache (address, false);
   }
         
   public Address referAddressUseCache (Address address, boolean isAssign) {
    String key = getCacheKey(null, address, null, "assignAddress");
      Address addressCache = (Address)simpleCache.get(key);
      if (addressCache==null) {
         addressCache = referAddress (address, isAssign);
         if (key!=null)
           simpleCache.put(key, addressCache);
      }
View Full Code Here


     BeanUtils.populateBeanObject(address, 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 address.clone() instead
  private Address cloneAddress (Address address) throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {
    //return (Address) BeanUtils.cloneBeanObject(address);
     if (address==null) return new Address();
     return address.clone();
  }
View Full Code Here

   private List getFirstResultWhereConditionsAre (Address address) {
      return  partialLoadWithParentAddressQueryResult(getDefaultAddressWhat(), address, null, 1, false)
   }
  
   protected Address getDefaultAddressWhat() {
      Address address = new Address();
      address.setId(Long.valueOf("-1"));
      return address;
   }
View Full Code Here

    }
     
   private List<Address> convertPartialLoadWithParentAddress(List<Object[]> list, Map<Integer, String> beanPath, Address addressWhat) throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {
     List<Address> resultList = new ArrayList<Address>();
     for (Object[] row : list) {   
        Address address = cloneAddress (addressWhat);
        Iterator<Entry<Integer, String>> iter = beanPath.entrySet().iterator()
        while (iter.hasNext()) {
           Entry entry = iter.next();
           populateAddress (address, row[(Integer)entry.getKey()], (String)entry.getValue());
        }
View Full Code Here

  
   
   private List<Address> convertPartialLoadWithParentAddressWithOneElementInRow(List<Object> list, Map<Integer, String> beanPath, Address addressWhat) throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {
     List<Address> resultList = new ArrayList<Address>();
     for (Object row : list) {   
        Address address = cloneAddress (addressWhat);
        Iterator<Entry<Integer, String>> iter = beanPath.entrySet().iterator()
        while (iter.hasNext()) {
           Entry entry = iter.next();
           populateAddress (address, row, (String)entry.getValue());
        }
View Full Code Here

         if (countPartialField==1) {
          row = new Object[1];
          row[0] = iter.next();
         } else
          row = (Object[]) iter.next();
       Address addressResult = new Address();
           if (address.getId() != null) {
        addressResult.setId((Long) row[index]);
        index++;
           }
           if (address.getStreet1() != null) {
        addressResult.setStreet1((String) row[index]);
        index++;
           }
           if (address.getStreet2() != null) {
        addressResult.setStreet2((String) row[index]);
        index++;
           }
           if (address.getCountryId() != null) {
        addressResult.setCountryId_((Integer) row[index]);
        index++;
           }
           returnList.add(addressResult);
        }
      return returnList;
View Full Code Here

    }

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

    @RequestMapping(method = RequestMethod.GET)
    @Transactional
  @ResponseBody
    public List<Address> findAll () {
    List<Address> r = new ArrayList<Address>();
        List<Address> l = addressDao.searchPrototypeAddress(new Address());
    for (Address address : l) {
      r.add(address.flat());
    }
    return r;
    }
View Full Code Here

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @FIND_BY_ID-address@
  @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  @ResponseBody
  @Transactional
    public Address findById (@PathVariable ("id") java.lang.Long id) {
        Address _address = new Address ();
    _address.setId(id);
    _address = addressExtDao.getFirstAddress(_address);
    if (_address!=null) return _address.flat();
    return new Address ();
    }
View Full Code Here

        @RequestParam("street1") String street1,
        @RequestParam("street2") String street2,
        @RequestParam("countryId") Integer countryId,
        HttpServletResponse servletResponse
        ) throws IOException {
        Address _address = new Address (
           id,
           street1,
           street2,
           countryId);
        return save(_address);
View Full Code Here

TOP

Related Classes of net.sf.mp.demo.conference.domain.conference.Address

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.