Код: Выделить всё
@Entity
@Table(name = "PROJECT_INDICATOR")
public class Project_Indicator {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@NotNull
@ManyToOne
private Indicator indicator;
@NotNull
@ManyToOne
private Project project;
@NotNull
private int year;
// here I want create List (HashSet) with enumeration of months
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Indicator getIndicator() {
return indicator;
}
public void setIndicator(Indicator indicator) {
this.indicator = indicator;
}
public Project getProject() {
return project;
}
public void setProject(Project project) {
this.project = project;
}
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
}
Код: Выделить всё
int value=mySet.get("July");
Спасибо.< /п>
Подробнее здесь: https://stackoverflow.com/questions/229 ... numeration