package sikd.sikd5.sikd5bean.tabel.mgr;

import java.io.Serializable;
import java.util.Objects;

/**
 *
 * @author sora
 */
public class TGroupRight implements Serializable{
//    private long id;
    private MasterMenu menu;
    private boolean reads;
    private boolean writes;
    private boolean writeRender;
    

    public TGroupRight() {
    }

    public TGroupRight(MasterMenu menu, boolean reads, boolean writes) {
        this.menu = menu;
        this.reads = reads;
        this.writes = writes;
    }

//    public TGroupRight(MasterMenu menu, boolean reads, boolean writes) {
//        this.id = id;
//        this.menu = menu;
//        this.reads = reads;
//        this.writes = writes;
//    }

    public boolean isWrites() {
        return writes;
    }

    public void setWrites(boolean writes) {
        this.writes = writes;
    }

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

    public MasterMenu getMenu() {
        return menu;
    }

    public void setMenu(MasterMenu menu) {
        this.menu = menu;
    }

    public boolean isReads() {
        return reads;
    }

    public void setReads(boolean reads) {
        this.reads = reads;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 79 * hash + Objects.hashCode(this.menu);
        hash = 79 * hash + (this.reads ? 1 : 0);
        hash = 79 * hash + (this.writes ? 1 : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TGroupRight other = (TGroupRight) obj;
        if (!Objects.equals(this.menu, other.menu)) {
            return false;
        }
        return true;
    }

    public boolean isWriteRender() {
        return writeRender;
    }

    public void setWriteRender(boolean writeRender) {
        this.writeRender = writeRender;
    }
    
    
}
