package com.athena.meerkat.controller.web.user;

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

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;

@Entity
@Table(name = "user_role")
public class UserRole implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name = "Id")
	@Id
	private int Id;
	@Column(name = "name")
	private String name;
	@OneToMany(mappedBy = "userRole", fetch = FetchType.LAZY)
	@JsonBackReference
	private List<User> users;

	public int getId() {
		return Id;
	}

	public void setId(int id) {
		Id = id;
	}

	public String getName() {
		return name;
	}

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

	public Collection<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

}

@@ -1166,11 +1166,76 @@
 %0D%0A%09%7D%0D%0A%0D%0A
+%09public int getUserCount() %7B%0D%0A%09%09return this.users.size();%0D%0A%09%7D%0D%0A%0D%0A
 %7D%0D%0A

Add more property to display on UI