/*
 * Copyright (c) 2011, Patrik Dufresne. All rights reserved.
 * Patrik Dufresne PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.planimod.core;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

@Entity
public class Shift extends AbstractCalendarEvent {

	private static final long serialVersionUID = -6588149832619562142L;

	/**
	 * Team property
	 */
	public static final String TEAM = "team"; //$NON-NLS-1$

	private Team team;

	@ManyToOne(optional = false)
	public Team getTeam() {
		return this.team;
	}

	public void setTeam(Team team) {
		this.changeSupport.firePropertyChange(TEAM, this.team, //$NON-NLS-1$
				this.team = team);
	}

	@Override
	public String toString() {
		return "Shift [team=" + team + ", getEndDate()=" + getEndDate()
				+ ", getStartDate()=" + getStartDate() + "]";
	}
}
