package com.tarena.oss.rights.pojo;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class Role implements Serializable ,Comparable<Role>{
	private Integer id;

	private String name;

	private Set<Rights> rights = new HashSet<Rights>();

	public Integer getId() {
		return id;
	}

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

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<Rights> getRights() {
		return rights;
	}

	public void setRights(Set<Rights> rights) {
		this.rights = rights;
	}

	public int compareTo(Role o) {
		return this.id.compareTo(o.id);
	}

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