package com.planimod.core;

import javax.persistence.Entity;

import com.patrikdufresne.managers.ArchivableObject;

/**
 * The Shift class represent a set of schedule.
 */
@Entity
public class Team extends ArchivableObject {

	/**
	 * Color property
	 */
	public static final String COLOR = "color"; //$NON-NLS-1$

	/**
	 * Name property
	 */
	public static final String NAME = "name"; //$NON-NLS-1$
	private static final long serialVersionUID = -6572695008297379911L;
	private String color;

	/**
	 * Define a display name for the shift.
	 * 
	 * @uml.property name="name"
	 */
	private String name;

	public String getColor() {
		return this.color;
	}

	/**
	 * Getter of the property <tt>name</tt>
	 * 
	 * @return Returns the name.
	 * @uml.property name="name"
	 */
	public String getName() {
		return this.name;
	}

	public void setColor(String color) {
		this.changeSupport.firePropertyChange(COLOR, this.color,
				this.color = color);
	}

	/**
	 * Setter of the property <tt>name</tt>
	 * 
	 * @param name
	 *            The name to set.
	 * @uml.property name="name"
	 */
	public void setName(String name) {
		this.changeSupport
				.firePropertyChange(NAME, this.name, this.name = name);
	}

	@Override
	public String toString() {
		return "Team [id=" + this.id + ", name=" + this.name + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
	}

}
