/**
 * 
 */
package de.bstly.board.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

/**
 * The Class Tag.
 */
@Entity
@Table(name = "tags")
@IdClass(Tag.class)
public class Tag implements Serializable {

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

	@Id
	@Column(name = "tag", nullable = false)
	private String tag;
	@Id
	@Column(name = "target", nullable = false)
	private Long target;

	/**
	 * Instantiates a new tag.
	 */
	public Tag() {
		super();
	}

	/**
	 * Instantiates a new tag.
	 *
	 * @param tag the tag
	 * @param target the target
	 */
	public Tag(String tag, Long target) {
		super();
		this.tag = tag;
		this.target = target;
	}

	/**
	 * Gets the tag.
	 *
	 * @return the tag
	 */
	public String getTag() {
		return tag;
	}

	/**
	 * Sets the tag.
	 *
	 * @param tag the new tag
	 */
	public void setTag(String tag) {
		this.tag = tag;
	}

	/**
	 * Gets the target.
	 *
	 * @return the target
	 */
	public Long getTarget() {
		return target;
	}

	/**
	 * Sets the target.
	 *
	 * @param target the new target
	 */
	public void setTarget(Long target) {
		this.target = target;
	}

}
