/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sikd.ikonsol.model;

import java.io.Serializable;
import java.sql.Date;

/**
 *
 * @author Imam Bhoim
 */
public class HeaderDataKonsolidasi implements Serializable {
   private int id;
   private int tahun;
   private int bulan;
   private int status;
   private int level;
   private Date tglambil;
   private Date startjob;
   private Date endjob;
   private int lingkup_id;
   private String namalingkup;
   private int sumber_id;
   private int created_by;
   private int updated_by;
   private Date created_at;
   private Date updated_at;
   private int idjnslaporan;
   private String namajnslaporan;
    
   private String kodeperiode;
   private String namaperiode;
    
   private int idbas;
   private String namabas;
    
    
   private String namaDb;
   private String serverDb;
   private String userName;
   private String passDb;
   private String portDb;
   private String vendorDb;
   private String nametblDb;
   private String prov;
   

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getTahun() {
        return tahun;
    }

    public void setTahun(int tahun) {
        this.tahun = tahun;
    }

    public int getBulan() {
        return bulan;
    }

    public void setBulan(int bulan) {
        this.bulan = bulan;
    }

    public int getStatus() {
        return status;
    }

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

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public Date getTglambil() {
        return tglambil;
    }

    public void setTglambil(Date tglambil) {
        this.tglambil = tglambil;
    }

    public Date getStartjob() {
        return startjob;
    }

    public void setStartjob(Date startjob) {
        this.startjob = startjob;
    }

    public Date getEndjob() {
        return endjob;
    }

    public void setEndjob(Date endjob) {
        this.endjob = endjob;
    }

    public int getLingkup_id() {
        return lingkup_id;
    }

    public void setLingkup_id(int lingkup_id) {
        this.lingkup_id = lingkup_id;
    }

    public int getSumber_id() {
        return sumber_id;
    }

    public void setSumber_id(int sumber_id) {
        this.sumber_id = sumber_id;
    }

    public int getCreated_by() {
        return created_by;
    }

    public void setCreated_by(int created_by) {
        this.created_by = created_by;
    }

    public int getUpdated_by() {
        return updated_by;
    }

    public void setUpdated_by(int updated_by) {
        this.updated_by = updated_by;
    }

    public Date getCreated_at() {
        return created_at;
    }

    public void setCreated_at(Date created_at) {
        this.created_at = created_at;
    }

    public Date getUpdated_at() {
        return updated_at;
    }

    public void setUpdated_at(Date updated_at) {
        this.updated_at = updated_at;
    }

    public String getNamalingkup() {
        return namalingkup;
    }

    public void setNamalingkup(String namalingkup) {
        this.namalingkup = namalingkup;
    }

   

    public int getIdjnslaporan() {
        return idjnslaporan;
    }

    public void setIdjnslaporan(int idjnslaporan) {
        this.idjnslaporan = idjnslaporan;
    }

    public String getNamajnslaporan() {
        return namajnslaporan;
    }

    public void setNamajnslaporan(String namajnslaporan) {
        this.namajnslaporan = namajnslaporan;
    }
    
     public String namaSumberData(){
       if (this.sumber_id == 1) {
            return "db";
        } else if (this.sumber_id== 2) {
            return "csv";
        } else {
            //obj.setNamahubungan("-");
        }
        return null;
    }
     
      public boolean statusFileDB(){
        if (this.sumber_id==1) {
            return true;
        } else {
            return false;
        }

    }
      
       public boolean statusFileCSV(){
        if (this.sumber_id==2) {
            return true;
        } else {
            return false;
        }

    }
       
        public boolean statusAktif(){
        if (this.getStatus() == 0) {
            return false;
        } else {
            return true;
        }

    }
      
    public boolean statusRaw(int idjns, int sumber) {
        if (idjns == 1 && sumber == 2 ) {
            return true;
        }else {
            return false;
        }

    }
    
    public boolean statusRawNeraca(int idjns, int sumber) {
        if (idjns == 2 && sumber == 2) {
            return true;
        } else {
            return false;
        }

    }
    
    public boolean statusRawLo(int idjns, int sumber) {
        if (idjns == 3 && sumber == 2) {
            return true;
        } else {
            return false;
        }

    }

    public boolean statusRawLak(int idjns, int sumber) {
        if (idjns == 4 && sumber == 2){
            return true;
        } else {
            return false;
        }

    }

    public boolean statusRawLpe(int idjns, int sumber) {
        if (idjns == 5 && sumber == 2) {
            return true;
        } else {
            return false;
        }

    }

    public boolean statusRawLpsal(int idjns, int sumber) {
        if (idjns == 6 && sumber == 2) {
            return true;
        } else {
            return false;
        }

    }
    
     public boolean statusRawDB(int idjns, int sumber) {
        if (idjns == 1  && sumber == 1) {
            return true;
        }else {
            return false;
        }

    }
    
    public boolean statusRawNeracaDB(int idjns, int sumber) {
        if (idjns == 2 && sumber == 1) {
            return true;
        } else {
            return false;
        }

    }
    
    public boolean statusRawLoDB(int idjns, int sumber) {
        if (idjns == 3 && sumber == 1) {
            return true;
        } else {
            return false;
        }

    }

    public boolean statusRawLakDB(int idjns, int sumber) {
        if (idjns == 4 && sumber == 1){
            return true;
        } else {
            return false;
        }

    }

    public boolean statusRawLpeDB(int idjns, int sumber) {
        if (idjns == 5 && sumber == 1) {
            return true;
        } else {
            return false;
        }

    }

    public boolean statusRawLpsalDB(int idjns, int sumber) {
        if (idjns == 6 && sumber == 1) {
            return true;
        } else {
            return false;
        }

    }


    public String getKodeperiode() {
        return kodeperiode;
    }

    public void setKodeperiode(String kodeperiode) {
        this.kodeperiode = kodeperiode;
    }

    public String getNamaperiode() {
        return namaperiode;
    }

    public void setNamaperiode(String namaperiode) {
        this.namaperiode = namaperiode;
    }

    public int getIdbas() {
        return idbas;
    }

    public void setIdbas(int idbas) {
        this.idbas = idbas;
    }

    public String getNamabas() {
        return namabas;
    }

    public void setNamabas(String namabas) {
        this.namabas = namabas;
    }

    public String getNamaDb() {
        return namaDb;
    }

    public void setNamaDb(String namaDb) {
        this.namaDb = namaDb;
    }

    public String getServerDb() {
        return serverDb;
    }

    public void setServerDb(String serverDb) {
        this.serverDb = serverDb;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassDb() {
        return passDb;
    }

    public void setPassDb(String passDb) {
        this.passDb = passDb;
    }

    public String getPortDb() {
        return portDb;
    }

    public void setPortDb(String portDb) {
        this.portDb = portDb;
    }

    public String getVendorDb() {
        return vendorDb;
    }

    public void setVendorDb(String vendorDb) {
        this.vendorDb = vendorDb;
    }

    public String getNametblDb() {
        return nametblDb;
    }

    public void setNametblDb(String nametblDb) {
        this.nametblDb = nametblDb;
    }

    public String getProv() {
        return prov;
    }

    public void setProv(String prov) {
        this.prov = prov;
    }
        
        
        
        
}
