Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.trails.demo;
  
  
A Coach belongs to an organization and has a team

Author(s):
kenneth.colassi nhhockeyplayer@hotmail.com
 
 @RemoveRequiresRole({"ROLE_ADMIN""ROLE_MANAGER"})
 @UpdateRequiresRole({"ROLE_ADMIN""ROLE_MANAGER"})
 @ViewRequiresRole({"ROLE_ADMIN""ROLE_MANAGER""ROLE_USER"})
 @ClassDescriptor(hasCyclicRelationships = true, hidden = true)
 public class Coach extends Person
 {
 	private static final Log log = LogFactory.getLog(Coach.class);
 
 	protected enum ETeamRole
 	{
 		HEADCOACH, ASSISTANTCOACH, MANAGER, EQUIPMENTMGR, OPERATIONS, TRAINER
 	}
 
 	private ETeamRole eTeamRole;
 
 	private Team team = null;
 
 	private Organization organization = null;

CTOR
 
 	public Coach(Coach dto)
 	{
 		super(dto);
 
 		try
 		{
 			BeanUtils.copyProperties(thisdto);
 		} catch (Exception e)
 		{
 		}
 	}
 
 	public Coach()
 	{
 	}
 
 	@PropertyDescriptor(summary = true)
 	{
 		return ;
 	}
 
 	@JoinColumn(name = "team_id")
 	@PropertyDescriptor(searchable = true, index = 1)
 	public Team getTeam()
 	{
 		return ;
 	}
 
 	@JoinColumn(name = "coach_organization_fk", insertable = false, updatable = true, nullable = true)
 	{
 		return ;
 	}
 
 	public void setETeamRole(ETeamRole role)
 	{
 		this. = role;
 	}
 
 	public void setTeam(Team team)
 	{
 		this. = team;
 	}
 
 	public void setOrganization(Organization organization)
 	{
 		this. = organization;
	}
	public Coach clone()
	{
		return new Coach(this);
	}
	public int hashCode()
	{
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((getId() == null) ? 0 : getId().hashCode());
		return result;
	}
	public boolean equals(Object rhs)
	{
		if (this == rhs)
			return true;
		if (rhs == null)
			return false;
		if (!(rhs instanceof Coach))
			return false;
		final Coach castedObject = (Coachrhs;
		if (getId() == null)
		{
			if (castedObject.getId() != null)
				return false;
else if (!getId().equals(castedObject.getId()))
			return false;
		return true;
	}
New to GrepCode? Check out our FAQ X