package com.sap.pto.dao.entities;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import org.eclipse.persistence.annotations.Index;
@Table(name = "Competitions")
@Entity
public class Competition extends BasicEntity {
@Id
@GeneratedValue(strategy = GenerationType.TABLE)
private long id;
@Index
private String extId;
private String name;
private String code;
public Competition() {
// just needed for JPA
}
public Competition(String extId) {
this.extId = extId;
}
public String getExtId() {
return extId;
}
public void setExtId(String extId) {
this.extId = extId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public long getId() {
return id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
@Override
public String toString() {
return "Competition [extId=" + extId + ", name=" + name + "]";
}
}