Package org.encuestame.persistence.domain

Examples of org.encuestame.persistence.domain.GeoPointType


     * @param locationTypeName locationTypeName
     * @return locationType
     */

    public GeoPointType createGeoPointType(final String locationTypeName){
        final GeoPointType catLocatType = new GeoPointType();
        catLocatType.setLocationTypeDescription(locationTypeName);
        catLocatType.setLocationTypeLevel(1);
        catLocatType.setUsers(createAccount());
        getGeoPointTypeDao().saveOrUpdate(catLocatType);
        return catLocatType;
    }
View Full Code Here


     */
    public UnitLocationTypeBean createGeoPointType(
            final UnitLocationTypeBean locatTypeBean) throws EnMeExpcetion {
        if (locatTypeBean != null) {
            try {
                final GeoPointType locationTypeDomain = new GeoPointType();
                locationTypeDomain.setLocationTypeDescription(locatTypeBean
                        .getLocTypeDesc());
                locationTypeDomain.setLocationTypeLevel(locatTypeBean
                        .getLevel());
                locationTypeDomain.setUsers(getUserAccount(getUserPrincipalUsername()).getAccount());
                getGeoPointTypeDao().saveOrUpdate(locationTypeDomain);
                locatTypeBean.setIdLocType(locationTypeDomain
                        .getLocationTypeId());
            } catch (Exception e) {
                throw new EnMeExpcetion(e);
            }
            return locatTypeBean;
View Full Code Here

     * @param locationTypeBean locationTypeBean
     * @throws EnMeExpcetion EnMeExpcetion
     * @throws EnMeNoResultsFoundException
     */
    public void updateGeoPointType(final UnitLocationTypeBean locationTypeBean) throws EnMeExpcetion, EnMeNoResultsFoundException{
        final GeoPointType geoPointType = getGeoPointTypeDao().getLocationById(locationTypeBean.getIdLocType());
        if (geoPointType!=null){
            geoPointType.setLocationTypeDescription(locationTypeBean.getLocTypeDesc());
            geoPointType.setLocationTypeLevel(locationTypeBean.getLevel());
            getGeoPointTypeDao().saveOrUpdate(geoPointType);
        }
        else{
            throw new EnMeNoResultsFoundException("location type not found");
        }
View Full Code Here

    /**
    * Test Catalog Location Type.
    */
   @Test
   public void testLocationType(){
       final GeoPointType catLocType = new GeoPointType();
       catLocType.setLocationTypeDescription("Departamento");
       catLocType.setLocationTypeLevel(1);
       getGeoPointDao().saveOrUpdate(catLocType);
       assertNotNull(catLocType.getLocationTypeId());
   }
View Full Code Here

    /**
     * Test Location Type.
     */
    @Test
    public void testLocationType(){
        final GeoPointType catLocType = new GeoPointType();
        catLocType.setLocationTypeDescription("Description");
        catLocType.setLocationTypeLevel(1);
        catLocType.setLocationTypeId(1L);
        //getCatLocationType().saveOrUpdate(catLocType);
    }
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.GeoPointType

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.