<?php
import("com.laurus.core.coreent.LCoreBean");
/**
 * Description of Address
 * @tableName tbl_address
 * @author Kunal Mestri <kunal@laurus-it.com>
 */
class Address extends LCoreBean{
    /**
    * @columnName ADD_ADDRESS_ID
    * @type int
    * @primary 
    */
    private $addressId;
    /**
    * @columnName ADD_ADDRESS_LINE_1
    * @type string
    */
    private $addressLine1;
    /**
    * @columnName ADD_ADDRESS_LINE_2
    * @type string
    */
    private $addressLine2;
    /**
    * @columnName ADD_CITY
    * @type string
    */
    private $city;
    /**
    * @columnName ADD_STATE
    * @type string
    */
    private $state;
    /**
    * @columnName ADD_COUNTRY
    * @type string
    */
    private $country;
    /**
    * @columnName ADD_PINCODE
    * @type string
    */
    private $pincode;
    /**
    * @columnName ADD_LAT
    * @type string
    */
    private $lat;
     /**
    * @columnName ADD_LONG
    * @type string
    */
    private $long;
     /**
    * @columnName ADD_DISTRICT
    * @type string
    */
    private $district;
    
    
    private $location;
    
    public function getAddressLine1() {
        return $this->addressLine1;
    }

    public function setAddressLine1($addressLine1) {
        $this->addressLine1 = $addressLine1;
    }

    public function getAddressLine2() {
        return $this->addressLine2;
    }

    public function setAddressLine2($addressLine2) {
        $this->addressLine2 = $addressLine2;
    }

        public function getDistrict() {
        return $this->district;
    }

    public function setDistrict($district) {
        $this->district = $district;
    }

        public function getAddressId() {
        return $this->addressId;
    }

    public function setAddressId($addressId) {
        $this->addressId = $addressId;
    }

    public function getLocation() {
        return $this->location;
    }

    public function setLocation($location) {
        $this->location = $location;
    }

    public function getState() {
        return $this->state;
    }

    public function setState($state) {
        $this->state = $state;
    }

    public function getCity() {
        return $this->city;
    }

    public function setCity($city) {
        $this->city = $city;
    }

    public function getCountry() {
        return $this->country;
    }

    public function setCountry($country) {
        $this->country = $country;
    }

    public function getPincode() {
        return $this->pincode;
    }

    public function setPincode($pincode) {
        $this->pincode = $pincode;
    }

    public function getLat() {
        return $this->lat;
    }

    public function setLat($lat) {
        $this->lat = $lat;
    }

    public function getLong() {
        return $this->long;
    }

    public function setLong($long) {
        $this->long = $long;
    }

    public function toJson() {
         $map=new Map();
         if($this->getAddressId()!=null)
         $map->put("addressId",  $this->getAddressId());
         if($this->getAddressLine1()!=null)
         $map->put("addressLine1",  $this->getAddressLine1());
         if($this->getAddressLine2()!=null)
         $map->put("addressLine2",  $this->getAddressLine2());
         if($this->getState()!=null)
         $map->put("state",$this->getState());
         if($this->getCity()!=null)
         $map->put("city",$this->getCity());
         if($this->getDistrict()!=null)
         $map->put("district",$this->getDistrict());
         if($this->getCountry()!=null)
         $map->put("country",$this->getCountry());
         if($this->getPincode()!=null)
         $map->put("pincode",$this->getPincode());
         if($this->getLat()!=null)
         $map->put("lat",$this->getLat());
         if($this->getLong()!=null)
         $map->put("long",$this->getLong());
         return $map->toJson();
     }
}

?>
