package sikd.sikd5.sikd5bean.tabel.mgr;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author sora
 */
public class TUserGroup implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private long id;
    private String nama;
    private String deskripsi;
    private TUserGroup parentGroup;
    private List<TUserGroup> subGroups;
    private List<TGroupRight> rights;
    private TJenisMenu jenismenu;
    private TJenisAccess jenisaccess;

    public TUserGroup() {
    }

    public TUserGroup(long id) {
        this.id = id;
    }

    public TUserGroup(String nama, String deskripsi) {
        this.nama = nama;
        this.deskripsi = deskripsi;
    }

    public TUserGroup(long id, String nama, String deskripsi) {
        this.id = id;
        this.nama = nama;
        this.deskripsi = deskripsi;
    }

    public TUserGroup(long id, String nama, String deskripsi, TUserGroup parentGroup) {
        this.id = id;
        this.nama = nama;
        this.deskripsi = deskripsi;
        this.parentGroup = parentGroup;
    }

    public String getDeskripsi() {
        return deskripsi;
    }

    public void setDeskripsi(String deskripsi) {
        this.deskripsi = deskripsi;
    }

    public long getId() {
        return id;
    }

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

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public List<TUserGroup> getSubGroups() {
        return subGroups;
    }

    public void setSubGroups(List<TUserGroup> subGroups) {
        this.subGroups = subGroups;
    }

    public List<TGroupRight> getRights() {
        return rights;
    }

    public void setRights(List<TGroupRight> rights) {
        this.rights = rights;
    }

    public TUserGroup getParentGroup() {
        return parentGroup;
    }

    public void setParentGroup(TUserGroup parentGroup) {
        this.parentGroup = parentGroup;
    }

    @Override
    public String toString() {
        return nama;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 59 * hash + (int) (this.id ^ (this.id >>> 32));
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TUserGroup other = (TUserGroup) obj;
        if (this.id != other.id) {
            return false;
        }
        return true;
    }
 
    public TJenisMenu getJenismenu() {
        return jenismenu;
    }

    public void setJenismenu(TJenisMenu jenismenu) {
        this.jenismenu = jenismenu;
    }

}
