package easydo.technology.core;

import java.sql.ResultSet;
import java.sql.SQLException;

import zmo.technology.lite.core.ZeroCoreStructs;

public class FactoryProjectInfoPosition extends ZeroCoreStructs {

    private FactoryProjectInfo projectInfo;
    private String province;
    private String city;
    private String region;
    private String street;
    private String address;

    private long longitude;
    private long latitude;

    public FactoryProjectInfoPosition() {
        super();
    }

    public FactoryProjectInfoPosition(ResultSet set) throws SQLException {
        super();
        if (ZeroCoreStructs.inResultSet(set, "PROJECT_ID")) {
            projectInfo = new FactoryProjectInfo();
            projectInfo.setFpiID(set.getLong("PROJECT_ID"));
        }

        if (ZeroCoreStructs.inResultSet(set, "PROVINCE"))
            province = set.getString("PROVINCE");

        if (ZeroCoreStructs.inResultSet(set, "CITY"))
            city = set.getString("CITY");

        if (ZeroCoreStructs.inResultSet(set, "REGION"))
            region = set.getString("REGION");

        if (ZeroCoreStructs.inResultSet(set, "STREET"))
            street = set.getString("STREET");

        if (ZeroCoreStructs.inResultSet(set, "ADDRESS"))
            address = set.getString("ADDRESS");

        if (ZeroCoreStructs.inResultSet(set, "LONGITUDE"))
            longitude = set.getLong("LONGITUDE");

        if (ZeroCoreStructs.inResultSet(set, "LATITUDE"))
            latitude = set.getLong("LATITUDE");
    }

    public FactoryProjectInfo getProjectInfo() {
        return projectInfo;
    }

    public void setProjectInfo(FactoryProjectInfo projectInfo) {
        this.projectInfo = projectInfo;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public long getLongitude() {
        return longitude;
    }

    public void setLongitude(long longitude) {
        this.longitude = longitude;
    }

    public long getLatitude() {
        return latitude;
    }

    public void setLatitude(long latitude) {
        this.latitude = latitude;
    }

}
