90 lines
1.3 KiB
Java
90 lines
1.3 KiB
Java
/**
|
|
*
|
|
*/
|
|
package de.bstly.board.model;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.Id;
|
|
import jakarta.persistence.IdClass;
|
|
import jakarta.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;
|
|
}
|
|
|
|
}
|