Package org.encuestame.utils.web

Examples of org.encuestame.utils.web.UnitLocationBean


        final String description,
        final Float lng,
        final Float lat,
        final Integer level,
        final String desc){
        final UnitLocationBean locationBean = new UnitLocationBean();
        //locationBean.se
       // locationBean.setDescription(description);
       // locationBean.setLat(lat);
       // locationBean.setLng(lng);
       // locationBean.setLevel(level);
View Full Code Here


     * @throws EnMeExpcetion
     */
    @Test
    public void testupdateGeoPoint() throws EnMeExpcetion{
        final GeoPoint locationBean = createGeoPoint("test", "test", 0, getSpringSecurityLoggedUserAccount().getAccount());
        final UnitLocationBean bean = ConvertDomainBean.convertLocationToBean(locationBean);
        bean.setName("test2");
        this.locationService.updateGeoPoint(bean);
        Assert.assertEquals(locationBean.getLocationDescription(), new String("test2"));
    }
View Full Code Here

     * test for createGeoPoint.
     * @throws EnMeExpcetion
     */
    //@Test
    public void testCreateGeoPoint() throws EnMeExpcetion{
        final UnitLocationBean locationBean = createUnitLocationBean("pozuelo");
        this.locationService.createGeoPoint(locationBean);
        Assert.assertNotNull(locationBean.getId());
    }
View Full Code Here

     *            {@link GeoPoint}
     * @return {@link UnitLocationBean}
     */
    public static final UnitLocationBean convertLocationToBean(
            final GeoPoint location) {
        final UnitLocationBean locationBean = new UnitLocationBean();
        locationBean.setId(location.getLocateId());
        locationBean
                .setStatus(location.getLocationStatus() == null ? Status.INACTIVE
                        .name() : location.getLocationStatus().name());
        locationBean.setName(location.getLocationDescription());
        locationBean.setLat(location.getLocationLatitude());
        locationBean.setLng(location.getLocationLongitude());
        locationBean.setAccuracy(location.getLocationAccuracy());
        locationBean.setAddress(location.getLocationAddress());
        locationBean.setCountryName(location.getLocationCountryName());
        locationBean.setCountryCode(location.getLocationCountryCode());
        if (location.getTidtype() != null) {
            locationBean.setTidtype(location.getTidtype().getLocationTypeId());
        }
        return locationBean;
    }
View Full Code Here

      * Create Unit Location Bean.
      * @param name
      * @return
      */
     public UnitLocationBean createUnitLocationBean(final String name){
         final UnitLocationBean locationBean = new UnitLocationBean();
         locationBean.setAccuracy(232);
         locationBean.setAddress("address");
         locationBean.setCountryCode("SP");
         locationBean.setCountryName("spain");
         locationBean.setLat(124.232F);
         locationBean.setLevel(1);
         locationBean.setLng(-2321.23F);
         locationBean.setName(name);
         locationBean.setStatus("ACTIVE");
         locationBean.setTidtype(21L);
         return locationBean;
     }
View Full Code Here

TOP

Related Classes of org.encuestame.utils.web.UnitLocationBean

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.