/**
 * encuestame: system online surveys Copyright (C) 2009 encuestame Development
 * Team
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of version 3 of the GNU General Public License as published by the
 * Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Suite 330, Boston, MA 02111-1307 USA
 */

package org.encuestame.core.persistence.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * CatLocation.
 *
 * @author Picado, Juan juan@encuestame.org
 * @since October 17, 2009
 */
@Entity
@Table(name = "cat_location")
public class CatLocation {

    private Long locateId;
    private String tidtype;
    private String locationDescription;
    private Integer locationLevel;
    private String locationActive;
    private Float locationLatitude;
    private Float locationLongitude;

    /**
     * @return locateId
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "locate_id", unique = true, nullable = false)
    public Long getLocateId() {
        return this.locateId;
    }

    /**
     * @param locateId locateId
     */
    public void setLocateId(Long locateId) {
        this.locateId = locateId;
    }

    /**
     * @return tidtype
     */
    @Column(name = "tidtype", nullable = true, length = 10)
    public String getTidtype() {
        return this.tidtype;
    }

    /**
     * @param tidtype tidtype
     */
    public void setTidtype(String tidtype) {
        this.tidtype = tidtype;
    }

    /**
     * @return locationDescription
     */
    @Column(name = "description", nullable = false)
    public String getLocationDescription() {
        return this.locationDescription;
    }

    /**
     * @param locationDescription locationDescription
     */
    public void setlocationDescription(final String locationDescription) {
        this.locationDescription = locationDescription;
    }

    /**
     * @return locationLevel
     */
    @Column(name = "level", nullable = false)
    public int getLocationLevel() {
        return this.locationLevel;
    }

    /**
     * @param locationLevel locationLevel
     */
    public void setLocationLevel(final  int locationLevel) {
        this.locationLevel = locationLevel;
    }

    /**
     * @return locationActive
     */
    @Column(name = "active", length = 2)
    public String getLocationActive() {
        return this.locationActive;
    }

    /**
     * @param locationActive locationActive
     */
    public void setLocationActive(final String locationActive) {
        this.locationActive = locationActive;
    }

    /**
     * @return locationLatitude
     */
    @Column(name = "lat", precision = 10, scale = 6)
    public Float getLocationLatitude() {
        return this.locationLatitude;
    }

    /**
     * @param locationLatitude locationLatitude
     */
    public void setLocationLatitude(final Float locationLatitude) {
        this.locationLatitude = locationLatitude;
    }

    /**
     * @return locationLongitude
     */
    @Column(name = "lng", precision = 10, scale = 6)
    public Float getLocationLongitude() {
        return this.locationLongitude;
    }

    /**
     * @param locationLongitude locationLongitude
     */
    public void setLocationLongitude(final Float locationLongitude) {
        this.locationLongitude = locationLongitude;
    }
}

@@ -964,16 +964,89 @@
 nce.Id;%0A
+import javax.persistence.JoinColumn;%0Aimport javax.persistence.ManyToOne;%0A
 import j
@@ -1273,22 +1273,31 @@
 private 
-String
+CatLocationType
  tidtype
@@ -1886,32 +1886,53 @@
 pe%0A     */%0A    @
+ManyToOne()%0A    @Join
 Column(name = %22t
@@ -1930,19 +1930,23 @@
 name = %22
-t
+loc_
 id
+_
 type%22, n
@@ -1959,44 +1959,41 @@
 e = 
-true, length = 10)%0A    public String
+false)%0A    public CatLocationType
  get
@@ -2113,22 +2113,31 @@
 Tidtype(
-String
+CatLocationType
  tidtype

Add relantionship catlocation with catlocationtype