Commits

Anonymous committed 07f8e5c

Change the names of parameters related to the old domain name SecPermission, CatEmails, CatEmailList, CatLocation, CatLocationFolder and CatSubscribeEmails
.

git-svn-id: http://svn.encuesta.me/trunk/encuestame@100839e2479b-dd58-4041-9f67-69c9b71f0610

Comments (0)

Files changed (16)

encuestame-business/src/main/java/org/encuestame/business/service/AbstractDataSource.java

     private IGeoPoint geoPointDao;
     /** {@link GeoPointTypeDao}. */
     @Autowired
-    private IGeoPointTypeDao catLocationTypeDao;
+    private IGeoPointTypeDao geoPointTypeDao;
     /** {@link ProjectDaoImp}. */
     @Autowired
     private IProjectDao projectDaoImp;
     }
 
     /**
-     * @return the catLocationDao
+     * @return the geoPointDao
      */
     public final IGeoPoint getGeoPointDao() {
         return geoPointDao;
     }
 
     /**
-     * @param catLocationDao the catLocationDao to set
+     * @param geoPointDao the geoPointDao to set
      */
 
     public final void setGeoPointDao(final IGeoPoint geoPointDao) {
     }
 
     /**
-     * @return the catLocationTypeDao
+     * @return the geoPointTypeDao
      */
-    public final IGeoPointTypeDao getCatLocationTypeDao() {
-        return catLocationTypeDao;
+    public final IGeoPointTypeDao getGeoPointTypeDao() {
+        return geoPointTypeDao;
     }
 
     /**
-     * @param catLocationTypeDao the catLocationTypeDao to set
+     * @param geoPointTypeDao the geoPointTypeDao to set
      */
-    public final void setCatLocationTypeDao(final IGeoPointTypeDao catLocationTypeDao) {
-        this.catLocationTypeDao = catLocationTypeDao;
+    public final void setGeoPointTypeDao(final IGeoPointTypeDao geoPointTypeDao) {
+        this.geoPointTypeDao = geoPointTypeDao;
     }
 
     /**

encuestame-business/src/main/java/org/encuestame/business/service/LocationService.java

      * @return locatTypeBean type bean
      * @throws EnMeExpcetion exception
      */
-    public UnitLocationTypeBean createCatLocationType(
+    public UnitLocationTypeBean createGeoPointType(
             final UnitLocationTypeBean locatTypeBean, final String username) throws EnMeExpcetion {
         if (locatTypeBean != null) {
             try {
                 locationTypeDomain.setLocationTypeLevel(locatTypeBean
                         .getLevel());
                 locationTypeDomain.setUsers(getUser(username).getAccount());
-                getCatLocationTypeDao().saveOrUpdate(locationTypeDomain);
+                getGeoPointTypeDao().saveOrUpdate(locationTypeDomain);
                 locatTypeBean.setIdLocType(locationTypeDomain
                         .getLocationTypeId());
             } catch (Exception e) {
      * @throws EnMeDomainNotFoundException
      * @throws EnMeExpcetion EnMeExpcetion
      */
-    public void updateCatLocation(final UnitLocationBean locationBean, final String username) throws EnMeDomainNotFoundException, EnMeExpcetion{
-       final GeoPoint catLocation =  getLocation(locationBean.getId(), username);
-        if (catLocation!=null){
-            catLocation.setLocationStatus(Status.valueOf(locationBean.getStatus()));
-            catLocation.setLocationDescription(locationBean.getName());
-            catLocation.setLocationLatitude(locationBean.getLat());
-            catLocation.setLocationLongitude(locationBean.getLng());
-            getGeoPointDao().saveOrUpdate(catLocation);
+    public void updateGeoPoint(final UnitLocationBean locationBean, final String username) throws EnMeDomainNotFoundException, EnMeExpcetion{
+       final GeoPoint geoPoint =  getLocation(locationBean.getId(), username);
+        if (geoPoint!=null){
+            geoPoint.setLocationStatus(Status.valueOf(locationBean.getStatus()));
+            geoPoint.setLocationDescription(locationBean.getName());
+            geoPoint.setLocationLatitude(locationBean.getLat());
+            geoPoint.setLocationLongitude(locationBean.getLng());
+            getGeoPointDao().saveOrUpdate(geoPoint);
         }else{
-            throw new EnMeExpcetion("location not found");
+            throw new EnMeExpcetion("geoPoint not found");
         }
    }
 
      * @throws EnMeExpcetion EnMeExpcetion
      * @throws EnMeDomainNotFoundException
      */
-    public void updateCatLocationType(final UnitLocationTypeBean locationTypeBean) throws EnMeExpcetion, EnMeDomainNotFoundException{
-        final GeoPointType catLocationType = getCatLocationTypeDao().getLocationById(locationTypeBean.getIdLocType());
-        if (catLocationType!=null){
-            catLocationType.setLocationTypeDescription(locationTypeBean.getLocTypeDesc());
-            catLocationType.setLocationTypeLevel(locationTypeBean.getLevel());
-            getCatLocationTypeDao().saveOrUpdate(catLocationType);
+    public void updateGeoPointType(final UnitLocationTypeBean locationTypeBean) throws EnMeExpcetion, EnMeDomainNotFoundException{
+        final GeoPointType geoPointType = getGeoPointTypeDao().getLocationById(locationTypeBean.getIdLocType());
+        if (geoPointType!=null){
+            geoPointType.setLocationTypeDescription(locationTypeBean.getLocTypeDesc());
+            geoPointType.setLocationTypeLevel(locationTypeBean.getLevel());
+            getGeoPointTypeDao().saveOrUpdate(geoPointType);
         }
         else{
             throw new EnMeDomainNotFoundException("location type not found");
      * @param location {@link LocationBean}
      * @throws EnMeExpcetion exception
      */
-    public UnitLocationBean createCatLocation(final UnitLocationBean location, final String username) throws EnMeExpcetion{
+    public UnitLocationBean createGeoPoint(final UnitLocationBean location, final String username) throws EnMeExpcetion{
         if (location != null){
             try{
-                final GeoPoint catLocationDomain = new GeoPoint();
-                catLocationDomain.setLocationDescription(location.getName());
-                catLocationDomain.setLocationStatus(Status.ACTIVE);
-                catLocationDomain.setLocationLatitude(location.getLat());
-                catLocationDomain.setAccount(getUser(username).getAccount());
-                catLocationDomain.setLocationLongitude(location.getLng());
+                final GeoPoint geoPointDomain = new GeoPoint();
+                geoPointDomain.setLocationDescription(location.getName());
+                geoPointDomain.setLocationStatus(Status.ACTIVE);
+                geoPointDomain.setLocationLatitude(location.getLat());
+                geoPointDomain.setAccount(getUser(username).getAccount());
+                geoPointDomain.setLocationLongitude(location.getLng());
                 if(location.getTidtype() != null){
-                    catLocationDomain.setTidtype(getCatLocationTypeDao().getLocationById(location.getTidtype()));
+                    geoPointDomain.setTidtype(getGeoPointTypeDao().getLocationById(location.getTidtype()));
                 }
-                getGeoPointDao().saveOrUpdate(catLocationDomain);
-                location.setId(catLocationDomain.getLocateId());
-                createNotification(NotificationEnum.LOCATION_NEW, location.getName() +" is created.", catLocationDomain.getAccount());
+                getGeoPointDao().saveOrUpdate(geoPointDomain);
+                location.setId(geoPointDomain.getLocateId());
+                createNotification(NotificationEnum.LOCATION_NEW, location.getName() +" is created.", geoPointDomain.getAccount());
             } catch (Exception e) {
                 throw new EnMeExpcetion(e);
             }
      * @return {@link UnitLocationFolder}.
      * @throws EnMeDomainNotFoundException
      */
-    public UnitLocationFolder createLocationFolder(final UnitLocationFolder locationFolder, final String username) throws EnMeDomainNotFoundException{
-        final GeoPointFolder catLocationFolder = new GeoPointFolder();
-        catLocationFolder.setFolderType(GeoPointFolderType.valueOf(locationFolder.getType()));
-        catLocationFolder.setLocationFolderName(locationFolder.getName());
-        catLocationFolder.setAccount(getUser(username).getAccount());
-        getGeoPointDao().saveOrUpdate(catLocationFolder);
-        locationFolder.setId(catLocationFolder.getLocationFolderId());
-        createNotification(NotificationEnum.LOCATION_FOLDER_NEW, "New Folder "+locationFolder.getName() +" is created.", catLocationFolder.getAccount());
+    public UnitLocationFolder createGeoPointFolder(final UnitLocationFolder locationFolder, final String username) throws EnMeDomainNotFoundException{
+        final GeoPointFolder geoPointFolder = new GeoPointFolder();
+        geoPointFolder.setFolderType(GeoPointFolderType.valueOf(locationFolder.getType()));
+        geoPointFolder.setLocationFolderName(locationFolder.getName());
+        geoPointFolder.setAccount(getUser(username).getAccount());
+        getGeoPointDao().saveOrUpdate(geoPointFolder);
+        locationFolder.setId(geoPointFolder.getLocationFolderId());
+        createNotification(NotificationEnum.LOCATION_FOLDER_NEW, "New Folder "+locationFolder.getName() +" is created.", geoPointFolder.getAccount());
         return locationFolder;
     }
 
      * Assign Location to Location Folder.
      * @param location
      */
-    public void assignLocationToLocationFolder(final GeoPoint location, final GeoPointFolder catLocationFolder){
-            location.setCatLocationFolder(catLocationFolder);
+    public void assignLocationToLocationFolder(final GeoPoint location, final GeoPointFolder geoPointFolder){
+            location.setGeoPointFolder(geoPointFolder);
             getGeoPointDao().saveOrUpdate(location);
     }
 
      * @throws EnMeDomainNotFoundException
      */
     public UnitLocationFolder getFolderLocation(final Long folderLocationId, final String username) throws EnMeDomainNotFoundException{
-        return ConvertDomainBean.convertCatLocationFolderDomainToBean(getGeoPointDao()
+        return ConvertDomainBean.convertGeoPointFolderDomainToBean(getGeoPointDao()
                                 .getLocationFolderByIdAndUserId(folderLocationId, getPrimaryUser(username)));
     }
 
             throw new EnMeDomainNotFoundException("location folder not found");
         }
         else {
-            final GeoPoint catLocation = new GeoPoint();
-            catLocation.setCatLocationFolder(locationFolder);
-            catLocation.setAccount(getUser(username).getAccount());
-            catLocation.setLocationStatus(Status.ACTIVE);
-            catLocation.setLocationDescription("Default Item Name");
-            getGeoPointDao().saveOrUpdate(catLocation);
+            final GeoPoint geopoint = new GeoPoint();
+            geopoint.setGeoPointFolder(locationFolder);
+            geopoint.setAccount(getUser(username).getAccount());
+            geopoint.setLocationStatus(Status.ACTIVE);
+            geopoint.setLocationDescription("Default Item Name");
+            getGeoPointDao().saveOrUpdate(geopoint);
             log.info("Default Location Item Created");
         }
     }
             //TODO: we need remove items on CASCADE.
             final List<GeoPoint> itemsToDelete = getGeoPointDao()
                                     .getLocationByFolder(locationFolder.getLocationFolderId(), getPrimaryUser(username));
-            for (GeoPoint catLocation : itemsToDelete) {
-                 getGeoPointDao().delete(catLocation);
+            for (GeoPoint geoPoint : itemsToDelete) {
+                 getGeoPointDao().delete(geoPoint);
             }
             getGeoPointDao().delete(locationFolder);
             log.info("delete location folder");

encuestame-business/src/main/java/org/encuestame/business/service/imp/ILocationService.java

      * @return {@link UnitLocationFolder}.
      * @throws EnMeDomainNotFoundException
      */
-    UnitLocationFolder createLocationFolder(final UnitLocationFolder locationFolder, final String username) throws EnMeDomainNotFoundException;
+    UnitLocationFolder createGeoPointFolder(final UnitLocationFolder locationFolder, final String username) throws EnMeDomainNotFoundException;
 
     /**
      * Create Cat LocationType.
      * @return locatTypeBean
      * @throws EnMeExpcetion exception
      */
-    UnitLocationTypeBean createCatLocationType(
+    UnitLocationTypeBean createGeoPointType(
             final UnitLocationTypeBean locatTypeBean, final String username) throws EnMeExpcetion;
 
     /**
      * @throws EnMeExpcetion EnMeExpcetion
      * @throws EnMeDomainNotFoundException
      */
-    void updateCatLocation(final UnitLocationBean locationBean, final String username) throws EnMeExpcetion, EnMeDomainNotFoundException;
+    void updateGeoPoint(final UnitLocationBean locationBean, final String username) throws EnMeExpcetion, EnMeDomainNotFoundException;
 
     /**
      * @param locationTypeBean locationTypeBean
      * @throws EnMeExpcetion EnMeExpcetion
      * @throws EnMeDomainNotFoundException
      */
-    void updateCatLocationType(final UnitLocationTypeBean locationTypeBean) throws EnMeExpcetion, EnMeDomainNotFoundException;
+    void updateGeoPointType(final UnitLocationTypeBean locationTypeBean) throws EnMeExpcetion, EnMeDomainNotFoundException;
 
     /**
      * create Cat Location.
      * @param location {@link LocationBean}
      * @throws EnMeExpcetion exception
      */
-    UnitLocationBean createCatLocation(final UnitLocationBean location, final String username) throws EnMeExpcetion;
+    UnitLocationBean createGeoPoint(final UnitLocationBean location, final String username) throws EnMeExpcetion;
 
     /**
      * Assign Location to Location Folder.
      * @param location {@link GeoPoint}.
      */
-    void assignLocationToLocationFolder(final GeoPoint location, final GeoPointFolder catLocationFolder);
+    void assignLocationToLocationFolder(final GeoPoint location, final GeoPointFolder geoPointFolder);
 
     /**
      * Retrieve Locations Folder Items by Folder Id and User Id.

encuestame-business/src/test/java/org/encuestame/test/business/email/TestCatEmailLists.java

     public void testSendEmail(){
         createDefaultEmails(getProperty("mail.test.email2"), this.emailList);
         createDefaultEmails(getProperty("mail.test.email3"), this.emailList);
-        final List<Email> catEmails = getCatEmailDao().findEmailsByListId(
+        final List<Email> emailList = getCatEmailDao().findEmailsByListId(
                 this.emailList.getIdList());
-        for (Email catemails : catEmails) {
-              assertNotNull(catemails.getEmail());
-              mailService.send(catemails.getEmail().toString(), "Welcome Encuestame List", "Welcome Encuestame List");
+        for (Email emails : emailList) {
+              assertNotNull(emails.getEmail());
+              mailService.send(emails.getEmail().toString(), "Welcome Encuestame List", "Welcome Encuestame List");
             }
     }
 
     @Test(timeout = 80000)
     public void testSendInvitation(){
           createDefaultEmails(getProperty("mail.test.email2"), this.emailList);
-          final List<Email> catEmails = getCatEmailDao().findEmailsByListId(
+          final List<Email> emailList = getCatEmailDao().findEmailsByListId(
                   this.emailList.getIdList());
-          for (Email catemails : catEmails) {
-                assertNotNull(catemails.getEmail());
+          for (Email emails : emailList) {
+                assertNotNull(emails.getEmail());
                 final InvitationBean invitation = new InvitationBean();
                 invitation.setCode("1253");
-                invitation.setEmail((catemails.getEmail().toString()));
+                invitation.setEmail((emails.getEmail().toString()));
                 invitation.setListName(this.emailList.getListName());
                 invitation.setUrlInvitation(URLPOLL);
                 mailService.sendEmailInvitation(invitation);
      */
     @Test
     public void testFindEmailByListId() {
-        final List<Email> catEmails = getCatEmailDao().findEmailsByListId(
+        final List<Email> emailList = getCatEmailDao().findEmailsByListId(
                 this.emailList.getIdList());
-        assertNotNull(catEmails);
-        assertEquals("Should be equals", 1, catEmails.size());
+        assertNotNull(emailList);
+        assertEquals("Should be equals", 1, emailList.size());
     }
 
     /**

encuestame-business/src/test/java/org/encuestame/test/business/service/TestLocationServices.java

      * Cat Location Dao.
      */
     @Autowired
-    private IGeoPoint catLocation;
+    private IGeoPoint geoPoint;
 
     private UserAccount secondary;
 
      * @throws EnMeExpcetion
      */
     @Test
-    public void testupdateCatLocation() throws EnMeExpcetion{
-        final GeoPoint locationBean = createCatLocation("test", "test", 0, this.secondary.getAccount());
+    public void testupdateGeoPoint() throws EnMeExpcetion{
+        final GeoPoint locationBean = createGeoPoint("test", "test", 0, this.secondary.getAccount());
         final UnitLocationBean bean = ConvertDomainBean.convertLocationToBean(locationBean);
         bean.setName("test2");
-        this.locationService.updateCatLocation(bean, this.secondary.getUsername());
+        this.locationService.updateGeoPoint(bean, this.secondary.getUsername());
         Assert.assertEquals(locationBean.getLocationDescription(), new String("test2"));
     }
 
     /**
-     * test for createCatLocation.
+     * test for createGeoPoint.
      * @throws EnMeExpcetion
      */
     @Test
-    public void testcreateCatLocation() throws EnMeExpcetion{
+    public void testCreateGeoPoint() throws EnMeExpcetion{
         final UnitLocationBean locationBean = createUnitLocationBean("pozuelo");
-        this.locationService.createCatLocation(locationBean, this.secondary.getUsername());
+        this.locationService.createGeoPoint(locationBean, this.secondary.getUsername());
         Assert.assertNotNull(locationBean.getId());
     }
 
     @Test
     public void testcreateLocationFolder() throws EnMeExpcetion{
         final UnitLocationFolder folder = createUnitLocationFolder("folder");
-        this.locationService.createLocationFolder(folder, this.secondary.getUsername());
+        this.locationService.createGeoPointFolder(folder, this.secondary.getUsername());
         Assert.assertNotNull(folder.getId());
     }
 
     @Test
     public void testretrieveLocationFolderByUser() throws EnMeDomainNotFoundException{
          final UnitLocationFolder folder1 = createUnitLocationFolder("folder 1");
-         this.locationService.createLocationFolder(folder1, this.secondary.getUsername());
+         this.locationService.createGeoPointFolder(folder1, this.secondary.getUsername());
          final UnitLocationFolder folder2 = createUnitLocationFolder("folder2 ");
-         this.locationService.createLocationFolder(folder2, this.secondary.getUsername());
+         this.locationService.createGeoPointFolder(folder2, this.secondary.getUsername());
          final List<UnitLocationFolder> list = this.locationService.retrieveLocationFolderByUser(this.secondary.getUsername());
          Assert.assertEquals(list.size(), 2);
     }
      */
     @Test
     public void testretrieveLocationSubFolderByUser() throws Exception{
-        final GeoPointFolder locationFolder = createCatLocationFolder(GeoPointFolderType.GROUPING, this.secondary.getAccount(), "folder", null);
-        createCatLocationFolder(GeoPointFolderType.GROUPING, this.secondary.getAccount(), "folder sub", locationFolder);
+        final GeoPointFolder locationFolder = createGeoPointFolder(GeoPointFolderType.GROUPING, this.secondary.getAccount(), "folder", null);
+        createGeoPointFolder(GeoPointFolderType.GROUPING, this.secondary.getAccount(), "folder sub", locationFolder);
         final List<UnitLocationFolder> list = this.locationService.retrieveLocationSubFolderByUser(locationFolder.getLocationFolderId(), this.secondary.getUsername());
         Assert.assertEquals(list.size(), 1);
     }
      */
     @Test
     public void testupdateLocationMap() throws Exception{
-        final GeoPointFolder locationFolder = createCatLocationFolder(GeoPointFolderType.GROUPING, this.secondary.getAccount(), "folder", null);
+        final GeoPointFolder locationFolder = createGeoPointFolder(GeoPointFolderType.GROUPING, this.secondary.getAccount(), "folder", null);
         //final CatLocation location = createCatLocation("Managua", locTypeName, Level, secUsers)
     }
 
     }
 
     /**
-     * @return the catLocation
+     * @return the geoPoint.
      */
-    public IGeoPoint getCatLocation() {
-        return catLocation;
+    public IGeoPoint getGeoPoint() {
+        return geoPoint;
     }
 
     /**
-     * @param catLocation the catLocation to set
+     * @param geoPoint the catLocation to set
      */
-    public void setCatLocation(IGeoPoint catLocation) {
-        this.catLocation = catLocation;
+    public void setGeoPoint(IGeoPoint geoPoint) {
+        this.geoPoint = geoPoint;
     }
 }

encuestame-core/src/main/java/org/encuestame/core/util/ConvertDomainBean.java

 
     /**
      * Convert List of Locations.
-     * @param catLocations List {@link GeoPoint}
+     * @param geoPoint List {@link GeoPoint}
      * @return List of {@link UnitLocationBean}
      */
-    public static final List<UnitLocationBean> convertListToUnitLocationBean(final List<GeoPoint> catLocations){
+    public static final List<UnitLocationBean> convertListToUnitLocationBean(final List<GeoPoint> geoPoint){
         final List<UnitLocationBean> listLocations = new ArrayList<UnitLocationBean>();
-        for (GeoPoint location : catLocations) {
+        for (GeoPoint location : geoPoint) {
             listLocations.add(ConvertDomainBean.convertLocationToBean(location));
         }
     return listLocations;
 
     /**
      * Convert List of {@link GeoPointFolder}. to List of {@link UnitLocationFolder}.
-     * @param catLocationFolders {@link GeoPointFolder}.
+     * @param GeoPointFolders {@link GeoPointFolder}.
      * @return
      */
-    public static final List<UnitLocationFolder> convertListToUnitLocationFolderBean(final List<GeoPointFolder> catLocationFolders){
+    public static final List<UnitLocationFolder> convertListToUnitLocationFolderBean(final List<GeoPointFolder> geoPointFolders){
         final List<UnitLocationFolder> listFolders = new ArrayList<UnitLocationFolder>();
-        for (GeoPointFolder locationFolder : catLocationFolders) {
-            listFolders.add(ConvertDomainBean.convertCatLocationFolderDomainToBean(locationFolder));
+        for (GeoPointFolder locationFolder : geoPointFolders) {
+            listFolders.add(ConvertDomainBean.convertGeoPointFolderDomainToBean(locationFolder));
         }
     return listFolders;
     }
 
     /**
      * Convert {@link GeoPointFolder}. to {@link UnitLocationFolder}.
-     * @param catLocationFolder {@link GeoPointFolder}.
+     * @param geoPointFolder {@link GeoPointFolder}.
      * @return {@link UnitLocationFolder}.
      */
-    public static UnitLocationFolder convertCatLocationFolderDomainToBean(final GeoPointFolder catLocationFolder){
+    public static UnitLocationFolder convertGeoPointFolderDomainToBean(final GeoPointFolder geoPointFolder){
         final UnitLocationFolder locationFolder = new UnitLocationFolder();
-        locationFolder.setId(catLocationFolder.getLocationFolderId());
-        locationFolder.setName(catLocationFolder.getLocationFolderName());
-        locationFolder.setType(catLocationFolder.getFolderType().GROUPING.name());
+        locationFolder.setId(geoPointFolder.getLocationFolderId());
+        locationFolder.setName(geoPointFolder.getLocationFolderName());
+        locationFolder.setType(geoPointFolder.getFolderType().GROUPING.name());
         return locationFolder;
     }
 

encuestame-persistence/src/main/java/org/encuestame/persistence/dao/imp/EmailDao.java

      * @return
      */
     public EmailSubscribe getSubscribeAccount(final String code){
-           return (EmailSubscribe) getHibernateTemplate().findByNamedParam("FROM CatSubscribeEmails WHERE hashCode= :code", "code", code);
+           return (EmailSubscribe) getHibernateTemplate().findByNamedParam("FROM EmailSubscribe WHERE hashCode= :code", "code", code);
     }
 
 }

encuestame-persistence/src/main/java/org/encuestame/persistence/dao/imp/GeoPointDao.java

     @SuppressWarnings("unchecked")
     public List<GeoPoint> getLocationByFolder(final Long locationFolderId, final Long userId){
          final DetachedCriteria criteria = DetachedCriteria.forClass(GeoPoint.class);
-         criteria.add(Restrictions.eq("catLocationFolder.id", locationFolderId));
+         criteria.add(Restrictions.eq("geoPointFolder.id", locationFolderId));
          criteria.add(Restrictions.eq("account.uid", userId));
          return getHibernateTemplate().findByCriteria(criteria);
     }

encuestame-persistence/src/main/java/org/encuestame/persistence/dao/imp/GeoPointTypeDao.java

 @Repository("geoPointTypeDao")
 public class GeoPointTypeDao extends AbstractHibernateDaoSupport implements IGeoPointTypeDao {
 
-	@Autowired
-	public GeoPointTypeDao(SessionFactory sessionFactory) {
-	 		setSessionFactory(sessionFactory);
+    @Autowired
+    public GeoPointTypeDao(SessionFactory sessionFactory) {
+             setSessionFactory(sessionFactory);
     }
-	
+
     /**
      * Find All {@link GeoPointType}
      * @return List of {@link GeoPointType}
      */
     @SuppressWarnings("unchecked")
     public List<GeoPointType> findAll() throws HibernateException {
-        return getHibernateTemplate().find("from CatLocationType");
+        return getHibernateTemplate().find("from GeoPointType");
     }
 
     /**

encuestame-persistence/src/main/java/org/encuestame/persistence/domain/GeoPoint.java

 import org.encuestame.persistence.domain.security.Account;
 
 /**
- * CatLocation.
+ * GeoPoint.
  *
  * @author Picado, Juan juanATencuestame.org
  * @since October 17, 2009
     private Account account;
 
     /** Location Folder. **/
-    private GeoPointFolder catLocationFolder;
+    private GeoPointFolder geoPointFolder;
 
     /** Projects. **/
     private Set<Project> projects = new HashSet<Project>();
     }
 
     /**
-     * @return the catLocationFolder
+     * @return the geoPointFolder
      */
     @ManyToOne(cascade=CascadeType.MERGE)
-    public GeoPointFolder getCatLocationFolder() {
-        return catLocationFolder;
+    public GeoPointFolder getGeoPointFolder() {
+        return geoPointFolder;
     }
 
     /**
-     * @param catLocationFolder the catLocationFolder to set
+     * @param geoPointFolder the geoPointFolder to set
      */
-    public void setCatLocationFolder(GeoPointFolder catLocationFolder) {
-        this.catLocationFolder = catLocationFolder;
+    public void setGeoPointFolder(GeoPointFolder geoPointFolder) {
+        this.geoPointFolder = geoPointFolder;
     }
 
     /**

encuestame-persistence/src/main/java/org/encuestame/persistence/domain/GeoPointType.java

 import org.encuestame.persistence.domain.security.Account;
 
 /**
- * CatLocationType.
+ * GeoPointType.
  *
  * @author Picado, Juan juan@encuestame.org
  * @since October 17, 2009

encuestame-persistence/src/test/java/org/encuestame/test/config/AbstractBase.java

     }
 
     /**
-     * @return the catLocationTypeDao
+     * @return the geoPointTypeDao
      */
-    public IGeoPointTypeDao getCatLocationTypeDao() {
+    public IGeoPointTypeDao getGeoPointTypeDao() {
         return geoPointTypeDao;
     }
 
     /**
-     * @param catLocationTypeDao the catLocationTypeDao to set
+     * @param geoPointTypeDao the geoPointTypeDao to set
      */
-    public void setCatLocationTypeDao(IGeoPointTypeDao catLocationTypeDao) {
-        this.geoPointTypeDao = catLocationTypeDao;
+    public void setGeoPointTypeDao(IGeoPointTypeDao geoPointTypeDao) {
+        this.geoPointTypeDao = geoPointTypeDao;
     }
 
 
 
     /**
-     * @return catLocationDao
+     * @return geoPointDao
      */
-    public IGeoPoint getCatLocationDao() {
+    public IGeoPoint getGeoPointDao() {
         return geoPointDao;
     }
 
     /**
-     * @param catLocationDao catLocationDao
+     * @param geoPointDao geoPointDao
      */
-    public void setCatLocationDao(IGeoPoint catLocationDao) {
-        this.geoPointDao = catLocationDao;
+    public void setGeoPointDao(IGeoPoint geoPointDao) {
+        this.geoPointDao = geoPointDao;
     }
 
     /**
      * @return {@link GeoPoint}
      */
-    public IGeoPoint getCatLocation() {
+    public IGeoPoint getGeoPoint() {
         return geoPointDao;
     }
 
     /**
-     * @param catLocation {@link GeoPoint}
+     * @param geoPoint {@link GeoPoint}
      */
-    public void setCatLocation(final IGeoPoint catLocation) {
-        this.geoPointDao = catLocation;
+    public void setGeoPoint(final IGeoPoint geoPoint) {
+        this.geoPointDao = geoPoint;
     }
 
     /**
      * @return locationType
      */
 
-    public GeoPointType createCatLocationType(final String locationTypeName){
+    public GeoPointType createGeoPointType(final String locationTypeName){
         final GeoPointType catLocatType = new GeoPointType();
         catLocatType.setLocationTypeDescription(locationTypeName);
         catLocatType.setLocationTypeLevel(1);
         catLocatType.setUsers(createUser());
-        getCatLocationTypeDao().saveOrUpdate(catLocatType);
+        getGeoPointTypeDao().saveOrUpdate(catLocatType);
         return catLocatType;
     }
 
 
     /**
-     * Helper to create CatLocation.
+     * Helper to create GeoPoint.
      * @param locDescription locDescription
      * @param locTypeName locTypeName
      * @param Level Level
      * @return location {@link GeoPointFolder}.
      */
-    public GeoPoint createCatLocation(
+    public GeoPoint createGeoPoint(
                        final String locDescription,
                        final String locTypeName,
                        final Integer Level,
                        final Account secUsers,
-                       final GeoPointFolder catLocationFolder){
+                       final GeoPointFolder geoPointFolder){
         final GeoPoint location = new GeoPoint();
         location.setLocationStatus(Status.ACTIVE);
         location.setLocationDescription(locDescription);
         location.setLocationLatitude(2F);
         location.setAccount(secUsers);
-        location.setCatLocationFolder(catLocationFolder);
+        location.setGeoPointFolder(geoPointFolder);
         location.setLocationLongitude(3F);
-        location.setTidtype(createCatLocationType(locTypeName));
-        getCatLocationDao().saveOrUpdate(location);
+        location.setTidtype(createGeoPointType(locTypeName));
+        getGeoPointDao().saveOrUpdate(location);
       return location;
     }
 
      * @param secUsers {@link Account}.
      * @return
      */
-    public GeoPoint createCatLocation(
+    public GeoPoint createGeoPoint(
             final String locDescription,
             final String locTypeName,
             final Integer Level,
             final Account secUsers){
-    return this.createCatLocation(locDescription, locTypeName, Level, secUsers, null);
+    return this.createGeoPoint(locDescription, locTypeName, Level, secUsers, null);
     }
 
 
      * @param locationFolder
      * @return {@link GeoPointFolder}.
      */
-    public GeoPointFolder createCatLocationFolder(
+    public GeoPointFolder createGeoPointFolder(
             final GeoPointFolderType type,
             final Account secUsers,
             final String folderName,
             final GeoPointFolder locationFolder){
-        final GeoPointFolder catLocationFolder = new GeoPointFolder();
-        catLocationFolder.setFolderType(type);
-        catLocationFolder.setLocationFolderName(folderName);
-        catLocationFolder.setAccount(secUsers);
-        catLocationFolder.setSubLocationFolder(locationFolder);
-        getCatLocationDao().saveOrUpdate(catLocationFolder);
-        return catLocationFolder;
+        final GeoPointFolder geoPointFolder = new GeoPointFolder();
+        geoPointFolder.setFolderType(type);
+        geoPointFolder.setLocationFolderName(folderName);
+        geoPointFolder.setAccount(secUsers);
+        geoPointFolder.setSubLocationFolder(locationFolder);
+        getGeoPointDao().saveOrUpdate(geoPointFolder);
+        return geoPointFolder;
     }
 
     /**

encuestame-persistence/src/test/java/org/encuestame/test/persistence/dao/TestCatLocationsDaoImp.java

     @Before
     public void initService(){
         this.userPrimary = createUser();
-        this.defaultLocation = createCatLocation("Managua", "Capital", 1, this.userPrimary);
-        createCatLocation("Esteli", "Esteli", 2, this.userPrimary);
+        this.defaultLocation = createGeoPoint("Managua", "Capital", 1, this.userPrimary);
+        createGeoPoint("Esteli", "Esteli", 2, this.userPrimary);
     }
 
     /**
      */
     @Test
     public void testgetLocationByUser(){
-        final List<GeoPoint> catLocation = getCatLocation().getLocationByUser(this.userPrimary.getUid());
-        Assert.assertEquals(2, catLocation.size());
+        final List<GeoPoint> geoPoint = getGeoPoint().getLocationByUser(this.userPrimary.getUid());
+        Assert.assertEquals(2, geoPoint.size());
     }
 
     /**
      */
     @Test
     public void testFindAll(){
-        final List<GeoPoint> catLocations = getCatLocation().findAll();
-        assertEquals("Should be equals",2 , catLocations.size());
+        final List<GeoPoint> geoPoint = getGeoPoint().findAll();
+        assertEquals("Should be equals",2 , geoPoint.size());
     }
 
     /**
      */
     @Test
     public void testGetLocationById(){
-        final GeoPoint catLocation = getCatLocationDao().getLocationById(this.defaultLocation.getLocateId(),
+        final GeoPoint geoPoint = getGeoPointDao().getLocationById(this.defaultLocation.getLocateId(),
                                         this.userPrimary.getUid());
-        assertNotNull(catLocation);
-        assertEquals("Should be equals", this.defaultLocation.getLocateId() , catLocation.getLocateId());
+        assertNotNull(geoPoint);
+        assertEquals("Should be equals", this.defaultLocation.getLocateId() , geoPoint.getLocateId());
     }
 
     /**
      */
     @Test
     public void testGetLocationFolders(){
-        createCatLocationFolder(GeoPointFolderType.GROUPING, this.userPrimary, "Managua", null);
-        createCatLocationFolder(GeoPointFolderType.GROUPING, this.userPrimary, "Ocotal", null);
-        final List<GeoPointFolder> catLocationFolders = getCatLocationDao().getLocationFolders(this.userPrimary.getUid());
-        assertEquals("Should be equals",2 , catLocationFolders.size());
+        createGeoPointFolder(GeoPointFolderType.GROUPING, this.userPrimary, "Managua", null);
+        createGeoPointFolder(GeoPointFolderType.GROUPING, this.userPrimary, "Ocotal", null);
+        final List<GeoPointFolder> geoPointFolders = getGeoPointDao().getLocationFolders(this.userPrimary.getUid());
+        assertEquals("Should be equals",2 , geoPointFolders.size());
     }
 
     /**
      */
     @Test
     public void testGetLocationFoldersByLocationFolderId(){
-        final GeoPointFolder catLocationFolder = createCatLocationFolder(GeoPointFolderType.GROUPING, this.userPrimary, "Condega", null);
-        createCatLocationFolder(GeoPointFolderType.GROUPING, this.userPrimary, "Wiwili", catLocationFolder);
-        final List<GeoPointFolder> catLocationFolders = getCatLocationDao().getLocationFoldersByLocationFolderId(
-                                      catLocationFolder.getLocationFolderId(), this.userPrimary.getUid());
-        assertEquals("Should be equals",1 , catLocationFolders.size());
+        final GeoPointFolder geoPointFolder = createGeoPointFolder(GeoPointFolderType.GROUPING, this.userPrimary, "Condega", null);
+        createGeoPointFolder(GeoPointFolderType.GROUPING, this.userPrimary, "Wiwili", geoPointFolder);
+        final List<GeoPointFolder> geoPointFolders = getGeoPointDao().getLocationFoldersByLocationFolderId(
+                geoPointFolder.getLocationFolderId(), this.userPrimary.getUid());
+        assertEquals("Should be equals",1 , geoPointFolders.size());
     }
 
     /**
      */
     @Test
     public void testGetLocationByFolder(){
-        final GeoPointFolder catLocationFolder = createCatLocationFolder(GeoPointFolderType.GROUPING,
+        final GeoPointFolder geoPointFolder = createGeoPointFolder(GeoPointFolderType.GROUPING,
                                                     this.userPrimary, "Matagalpa", null);
-        createCatLocation("Location 1", "type", 1, this.userPrimary, catLocationFolder);
-        final List<GeoPoint> catLocations = getCatLocationDao().getLocationByFolder(catLocationFolder.getLocationFolderId(),
+        createGeoPoint("Location 1", "type", 1, this.userPrimary, geoPointFolder);
+        final List<GeoPoint> geoPoint = getGeoPointDao().getLocationByFolder(geoPointFolder.getLocationFolderId(),
                                          this.userPrimary.getUid());
-        assertEquals("Should be equals",1 , catLocations.size());
+        assertEquals("Should be equals",1 , geoPoint.size());
     }
 
     /**
      */
     @Test
     public void testGetLocationFolderByIdAndUserId(){
-        final GeoPointFolder catLocationFolder = createCatLocationFolder(GeoPointFolderType.GROUPING,
+        final GeoPointFolder geoPointFolder = createGeoPointFolder(GeoPointFolderType.GROUPING,
                 this.userPrimary, "Carazo", null);
-        final GeoPointFolder catLocationFolder2 = getCatLocationDao().getLocationFolderByIdAndUserId(catLocationFolder.getLocationFolderId(), this.userPrimary.getUid());
-        assertEquals("Should be equals", catLocationFolder.getLocationFolderId() , catLocationFolder2.getLocationFolderId());
+        final GeoPointFolder geoPointFolder2 = getGeoPointDao().getLocationFolderByIdAndUserId(geoPointFolder.getLocationFolderId(), this.userPrimary.getUid());
+        assertEquals("Should be equals", geoPointFolder.getLocationFolderId() , geoPointFolder2.getLocationFolderId());
     }
 
     /**
      **/
     @Test
     public void getLocationByTypeLocationId(){
-        final GeoPoint catLoc = createCatLocation("Managua","Departamento",1, this.userPrimary);
-        final List<GeoPoint> retrieveLocations = getCatLocationDao().getLocationByTypeLocationId(catLoc.getTidtype().getLocationTypeId());
+        final GeoPoint catLoc = createGeoPoint("Managua","Departamento",1, this.userPrimary);
+        final List<GeoPoint> retrieveLocations = getGeoPointDao().getLocationByTypeLocationId(catLoc.getTidtype().getLocationTypeId());
         assertEquals("Should be equals ",1 , retrieveLocations.size());
     }
 }

encuestame-persistence/src/test/java/org/encuestame/test/persistence/dao/TestProjectDaoImp.java

      * Test Add Locations to Project.
      */
     public void testGetProjectByLocationId(){
-        final GeoPoint loc1 = createCatLocation("managua", "mga", 1, this.user.getAccount());
-        final GeoPoint loc2 = createCatLocation("diriomo", "drm", 1, this.user.getAccount());
+        final GeoPoint loc1 = createGeoPoint("managua", "mga", 1, this.user.getAccount());
+        final GeoPoint loc2 = createGeoPoint("diriomo", "drm", 1, this.user.getAccount());
         project.getLocations().add(loc1);
         project.getLocations().add(loc2);
         getProjectDaoImp().saveOrUpdate(project);

encuestame-persistence/src/test/java/org/encuestame/test/persistence/domain/TestCatLocation.java

      * Test Catalag Location.
      */
     @Test
-    public void testCatLocation(){
+    public void testGeoPoint(){
         final GeoPoint catLoc = new GeoPoint();
         catLoc.setLocationStatus(Status.ACTIVE);
         catLoc.setLocationDescription("Managua");
         catLoc.setLocationLatitude(2F);
         catLoc.setLocationLongitude(3F);
-        catLoc.setTidtype(createCatLocationType("aldea"));
+        catLoc.setTidtype(createGeoPointType("aldea"));
         catLoc.getProjects().add(createProject("encuestame", "survey", "open source",  createUser()));
-        getCatLocationDao().saveOrUpdate(catLoc);
+        getGeoPointDao().saveOrUpdate(catLoc);
         assertNotNull(catLoc.getLocateId());
     }
 

encuestame-persistence/src/test/java/org/encuestame/test/persistence/domain/TestHibernateDomains.java

      * Test Catalog Location.
      */
     @Test
-    public void testCatLocation(){
+    public void testGeoPoint(){
         final GeoPoint catLoc = new GeoPoint();
         catLoc.setLocationStatus(Status.ACTIVE);
         catLoc.setLocationDescription("Managua");
         catLoc.setLocationLatitude(2F);
         catLoc.setLocationLongitude(3F);
-        catLoc.setTidtype(createCatLocationType("aldea"));
+        catLoc.setTidtype(createGeoPointType("aldea"));
         catLoc.getProjects().add(createProject("encuestame", "survey", "open source", createUser()));
-        getCatLocationDao().saveOrUpdate(catLoc);
+        getGeoPointDao().saveOrUpdate(catLoc);
         assertNotNull(catLoc.getLocateId());
     }
 
        final GeoPointType catLocType = new GeoPointType();
        catLocType.setLocationTypeDescription("Departamento");
        catLocType.setLocationTypeLevel(1);
-       getCatLocationTypeDao().saveOrUpdate(catLocType);
+       getGeoPointDao().saveOrUpdate(catLocType);
        assertNotNull(catLocType.getLocationTypeId());
    }
 
          project.getSurveyGroups().add(createSurveyGroup("Education"));
         project.getSecUserSecondaries().add(createSecondaryUser("Diana",createUser()));
         project.getGroups().add(createGroups("editor"));
-        project.getLocations().add(createCatLocation("Matagalpa","Matalgalpa Department",2, createUser()));
+        project.getLocations().add(createGeoPoint("Matagalpa","Matalgalpa Department",2, createUser()));
         getProjectDaoImp().saveOrUpdate(project);
         assertNotNull(project.getProyectId());
     }
      */
      @Test
      public void testLocationFolder(){
-         final GeoPointFolder catLocationFolder = new GeoPointFolder();
-         catLocationFolder.setFolderType(GeoPointFolderType.GROUPING);
-         catLocationFolder.setLocationFolderName("test folder");
-         catLocationFolder.setAccount(createUser());
-         getCatLocationDao().saveOrUpdate(catLocationFolder);
+         final GeoPointFolder geoPointFolder = new GeoPointFolder();
+         geoPointFolder.setFolderType(GeoPointFolderType.GROUPING);
+         geoPointFolder.setLocationFolderName("test folder");
+         geoPointFolder.setAccount(createUser());
+         getGeoPointDao().saveOrUpdate(geoPointFolder);
      }
 
      /**
       **/
      @Test
      public void testCatEmail(){
-         final Email catEmailList = new Email();
-         catEmailList.setEmail("paola@jotadeveloper.com");
-         catEmailList.setIdListEmail(createDefaultListEmail());
-         getCatEmailDao().saveOrUpdate(catEmailList);
-         assertNotNull(catEmailList.getIdEmail());
+         final Email email = new Email();
+         email.setEmail("paola@jotadeveloper.com");
+         email.setIdListEmail(createDefaultListEmail());
+         getCatEmailDao().saveOrUpdate(email);
+         assertNotNull(email.getIdEmail());
      }
 
      /**