/*
 * 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 {
    int id;
    int tahun;
    int bulan;
    int status;
    int level;
    Date tglambil;
    Date startjob;
    Date endjob;
    int lingkup_id;
    String namalingkup;
    int sumber_id;
    int created_by;
    int updated_by;
    Date created_at;
    Date updated_at;
    int idjnslaporan;
    String namajnslaporan;
    
    String kodeperiode;
    String namaperiode;
    
    int idbas;
    String namabas;

    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) {
        if (idjns == 1 || idjns == 2 || idjns== 3  ) {
            return true;
        } else if( idjns==4 || idjns==5 || idjns==6) {
            return false;
        } else {
            return true;
        }

    }

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

    }

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

    }

    public boolean statusRawLpsal(int idjns) {
        if (idjns == 6) {
            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;
    }
        
        
        
        
}
