package sikd.sikd5.sikd5bean.ws.simpatik;

import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import sikd.sikd5.sikd5bean.fault.SIKDServiceException;

@XmlRootElement
@XmlType(name = "posisiKasAkunWS", propOrder = {
    "kdAkun",
    "nilai",
    "posisiKasAkunRincis"

})
public class PosisiKasAkun_WS implements Serializable {

    private String kdAkun;
    private Double nilai;
    private List<PosisiKasAkunRinci_WS> posisiKasAkunRincis;

    public PosisiKasAkun_WS() {
    }

    public PosisiKasAkun_WS(String kdAkun, Double nilai, List<PosisiKasAkunRinci_WS> posisiKasAkunRincis) {
        this.kdAkun = kdAkun;
        this.nilai = nilai;
        this.posisiKasAkunRincis = posisiKasAkunRincis;
    }

    public String getKdAkun() throws SIKDServiceException {
    	 if (this.kdAkun == null || this.kdAkun.trim().equals("")) {
             throw new SIKDServiceException("Kode Data/Akun Kosong");
         }
        return kdAkun;
    }

    public void setKdAkun(String kdAkun) throws SIKDServiceException{
    	 if (kdAkun == null || kdAkun.trim().equals("")) {
             throw new SIKDServiceException("Silahkan isi Kode Data/Akun");
         }
        this.kdAkun = kdAkun;
    }

    public Double getNilai() {
        return nilai;
    }

    public void setNilai(Double nilai) {
        this.nilai = nilai;
    }

    public List<PosisiKasAkunRinci_WS> getPosisiKasAkunRincis() {
        return posisiKasAkunRincis;
    }

    public void setPosisiKasAkunRincis(List<PosisiKasAkunRinci_WS> posisiKasAkunRincis) {
        this.posisiKasAkunRincis = posisiKasAkunRincis;
    }

}
