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

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


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


//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @FIND_BY_ID-country@
  @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  @ResponseBody
  @Transactional
    public Country findById (@PathVariable ("id") java.lang.Integer id) {
        Country _country = new Country ();
    _country.setId(id);
    _country = countryExtDao.getFirstCountry(_country);
    if (_country!=null) return _country.flat();
    return new Country ();
    }
View Full Code Here

        @RequestParam("id") Integer id,
        @RequestParam("name") String name,
        @RequestParam("isoName") String isoName,
        HttpServletResponse servletResponse
        ) throws IOException {
        Country _country = new Country (
           id,
           name,
           isoName);
        return save(_country);
    }
View Full Code Here

    @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
    @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
  @ResponseBody
    public String delete (@PathVariable ("id") Integer id) {
        Country country = new Country ();
        country.setId(id);
        countryDao.deleteCountry(country);
    return "OK";
    }
View Full Code Here

        @RequestParam("id") Integer id,
        @RequestParam("name") String name,
        @RequestParam("isoName") String isoName,
        HttpServletResponse servletResponse
        ) throws IOException {
        Country _country = new Country (
           id,
           name,
           isoName);
        return save(_country);
   
View Full Code Here

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @FIND_ALL-country@
    @GET
    @Produces ({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) 
    public List<Country> findAll () {
    List<Country> r = new ArrayList<Country>();
        List<Country> l = countryDao.searchPrototypeCountry(new Country());
    for (Country country : l) {
      r.add(country.flat());
    }
    return r;
    }
View Full Code Here

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @FIND_BY_ID-country@
    @GET
    @Path("{id}")
    @Produces ({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})   
    public Country findById (@PathParam ("id") java.lang.Integer id) {
        Country _country = new Country ();
    _country.setId(id);
    _country = countryExtDao.getFirstCountry(_country);
    if (_country!=null) return _country.flat();
    return new Country ();
    }
View Full Code Here

//MP-MANAGED-UPDATABLE-ENDING

    @DELETE
    @Path("{id}")
    public void delete (@PathParam ("id") Integer id) {
        Country country = new Country ();
        country.setId(id);
        countryDao.deleteCountry(country);
    }
View Full Code Here

        @FormParam("id") Integer id,
        @FormParam("name") String name,
        @FormParam("isoName") String isoName,
        @Context HttpServletResponse servletResponse
        ) throws IOException {
        Country _country = new Country (
           id,
           name,
           isoName);
        return save(_country);
    }
View Full Code Here

    }

    @PUT
    @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Country save(JAXBElement<Country> jaxbCountry) {
        Country country = jaxbCountry.getValue();
        if (country.getId()!=null)
            return countryDao.updateCountry(country);
        return save(country);
    }
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.