package easydo.technology.core;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import java.util.UUID;

import zmo.technology.lite.core.ZeroCoreStructs;

public class FactoryProjectInfo extends ZeroCoreStructs {
    
    public static final String PROJECT_META_TYPE_CORE = "PROJECT_META_TYPE_CORE";
    public static final String PROJECT_META_TYPE_GENERAL = "PROJECT_META_TYPE_GENERAL";

    private long fpiID;
    private String status;
    private String projectNoFpi;
    private String projectName;
    private String projectAddr;
    private Date startTime;
    private Date endTime;
    private String resPersonName;
    private String resPersonNo;
    private String resPersonComp;
    private String projectAliasName;
    private String projectFirmName;
    private String projectCoordinates;
    private String projectType;
    private String projectStatus;
    private String projectScale;
    private String projectMoney;
    private String projectBackupsNumber;
    private String projectLogo;
    private String metatype;

    private FactoryProjectInfoPosition position;

    public FactoryProjectInfo() {
        super();
    }

    public FactoryProjectInfo(ResultSet set) throws SQLException {
        super();
        if (ZeroCoreStructs.inResultSet(set, "FPI_ID"))
            fpiID = set.getLong("FPI_ID");

        if (ZeroCoreStructs.inResultSet(set, "STATUS"))
            status = set.getString("STATUS");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_NO_FPI"))
            projectNoFpi = set.getString("PROJECT_NO_FPI");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_NAME"))
            projectName = set.getString("PROJECT_NAME");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_ADDR"))
            projectAddr = set.getString("PROJECT_ADDR");

        if (ZeroCoreStructs.inResultSet(set, "START_TIME") && set.getTimestamp("START_TIME") != null)
            startTime = new Date(set.getTimestamp("START_TIME").getTime());

        if (ZeroCoreStructs.inResultSet(set, "END_TIME") && set.getTimestamp("END_TIME") != null)
            endTime = new Date(set.getTimestamp("END_TIME").getTime());

        if (ZeroCoreStructs.inResultSet(set, "RES_PERSON_NAME"))
            resPersonName = set.getString("RES_PERSON_NAME");

        if (ZeroCoreStructs.inResultSet(set, "RES_PERSON_NO"))
            resPersonNo = set.getString("RES_PERSON_NO");

        if (ZeroCoreStructs.inResultSet(set, "RES_PERSON_COMP"))
            resPersonComp = set.getString("RES_PERSON_COMP");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_ALIAS_NAME"))
            projectAliasName = set.getString("PROJECT_ALIAS_NAME");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_FIRM_NAME"))
            projectFirmName = set.getString("PROJECT_FIRM_NAME");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_COORDINATES"))
            projectCoordinates = set.getString("PROJECT_COORDINATES");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_TYPE"))
            projectType = set.getString("PROJECT_TYPE");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_STATUS"))
            projectStatus = set.getString("PROJECT_STATUS");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_SCALE"))
            projectScale = set.getString("PROJECT_SCALE");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_MONEY"))
            projectMoney = set.getString("PROJECT_MONEY");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_BACKUPS_NUMBER"))
            projectBackupsNumber = set.getString("PROJECT_BACKUPS_NUMBER");

        if (ZeroCoreStructs.inResultSet(set, "PROJECT_LOGO"))
            projectLogo = set.getString("PROJECT_LOGO");

        if (ZeroCoreStructs.inResultSet(set, "METATYPE"))
            metatype = set.getString("METATYPE");

    }

    @Override
    public final void setId(UUID id) {
    }

    @Override
    public UUID getId() {
        return null;
    }

    @Override
    public String uuIDString() {
        return null;
    }

    @Override
    public void setCreateTime(Date createTime) {
    }

    @Override
    public Date getCreateTime() {
        return null;
    }

    @Override
    public void setUpdateTime(Date updateTime) {
    }

    @Override
    public Date getUpdateTime() {
        return null;
    }

    public long getFpiID() {
        return fpiID;
    }

    public void setFpiID(long fpiID) {
        this.fpiID = fpiID;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getProjectNoFpi() {
        return projectNoFpi;
    }

    public void setProjectNoFpi(String projectNoFpi) {
        this.projectNoFpi = projectNoFpi;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectAddr() {
        return projectAddr;
    }

    public void setProjectAddr(String projectAddr) {
        this.projectAddr = projectAddr;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getResPersonName() {
        return resPersonName;
    }

    public void setResPersonName(String resPersonName) {
        this.resPersonName = resPersonName;
    }

    public String getResPersonNo() {
        return resPersonNo;
    }

    public void setResPersonNo(String resPersonNo) {
        this.resPersonNo = resPersonNo;
    }

    public String getResPersonComp() {
        return resPersonComp;
    }

    public void setResPersonComp(String resPersonComp) {
        this.resPersonComp = resPersonComp;
    }

    public String getProjectAliasName() {
        return projectAliasName;
    }

    public void setProjectAliasName(String projectAliasName) {
        this.projectAliasName = projectAliasName;
    }

    public String getProjectFirmName() {
        return projectFirmName;
    }

    public void setProjectFirmName(String projectFirmName) {
        this.projectFirmName = projectFirmName;
    }

    public String getProjectCoordinates() {
        return projectCoordinates;
    }

    public void setProjectCoordinates(String projectCoordinates) {
        this.projectCoordinates = projectCoordinates;
    }

    public String getProjectType() {
        return projectType;
    }

    public void setProjectType(String projectType) {
        this.projectType = projectType;
    }

    public String getProjectStatus() {
        return projectStatus;
    }

    public void setProjectStatus(String projectStatus) {
        this.projectStatus = projectStatus;
    }

    public String getProjectScale() {
        return projectScale;
    }

    public void setProjectScale(String projectScale) {
        this.projectScale = projectScale;
    }

    public String getProjectMoney() {
        return projectMoney;
    }

    public void setProjectMoney(String projectMoney) {
        this.projectMoney = projectMoney;
    }

    public String getProjectBackupsNumber() {
        return projectBackupsNumber;
    }

    public void setProjectBackupsNumber(String projectBackupsNumber) {
        this.projectBackupsNumber = projectBackupsNumber;
    }

    public String getProjectLogo() {
        return projectLogo;
    }

    public void setProjectLogo(String projectLogo) {
        this.projectLogo = projectLogo;
    }

    public FactoryProjectInfoPosition getPosition() {
        return position;
    }

    public void setPosition(FactoryProjectInfoPosition position) {
        this.position = position;
    }

    public String getMetatype() {
        return metatype;
    }

    public void setMetatype(String metatype) {
        this.metatype = metatype;
    }
}
