/*
 * 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.sikd5.sikd5bean.tabel;

import java.util.Date;

/**
 * @author Agus S
 * @Tanggal Feb 27, 2017
 */
public class VersiAplikasi {

    private Integer versiIndex;
    private String namaAplikasi;
    private String versi;
    private Date tanggalRelease;
    private String ket;
    private Boolean statusBerlaku;

    public Integer getVersiIndex() {
        return versiIndex;
    }

    public void setVersiIndex(Integer versiIndex) {
        this.versiIndex = versiIndex;
    }

    public String getNamaAplikasi() {
        return namaAplikasi;
    }

    public void setNamaAplikasi(String namaAplikasi) {
        this.namaAplikasi = namaAplikasi;
    }

    public String getVersi() {
        return versi;
    }

    public void setVersi(String versi) {
        this.versi = versi;
    }

    public Date getTanggalReleaase() {
        return tanggalRelease;
    }

    public void setTanggalRelease(Date tanggalRelease) {
        this.tanggalRelease = tanggalRelease;
    }

    public String getKet() {
        return ket;
    }

    public void setKet(String ket) {
        this.ket = ket;
    }

    public Integer getVersiInt() {
        Integer persi = 0;
        Integer int1 = 0;
        Integer int2 = 0;
        Integer int3 = 0;
        if (getVersi() != null && getVersi().trim() != "") {
            String[] parts = getVersi().split("\\.");
            if (parts.length > 0) {
                int1 = Integer.valueOf(parts[0]);
            }
            if (parts.length > 1) {
                int2 = Integer.valueOf(parts[1]);
            }
            if (parts.length > 2) {
                int3 = Integer.valueOf(parts[2]);
            }
        }
        persi = (int1 * 1000000) + (int2 * 1000) + int3;
        return persi;
    }

    public Boolean getStatusBerlaku() {
        return statusBerlaku;
    }

    public void setStatusBerlaku(Boolean statusBerlaku) {
        this.statusBerlaku = statusBerlaku;
    }

}
