|
|
@ -1,6 +1,8 @@
|
|
|
|
package info.bukova.isspst.data;
|
|
|
|
package info.bukova.isspst.data;
|
|
|
|
|
|
|
|
|
|
|
|
import info.bukova.isspst.Constants;
|
|
|
|
import info.bukova.isspst.Constants;
|
|
|
|
|
|
|
|
import org.hibernate.annotations.Cache;
|
|
|
|
|
|
|
|
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
|
|
|
import org.hibernate.annotations.LazyCollection;
|
|
|
|
import org.hibernate.annotations.LazyCollection;
|
|
|
|
import org.hibernate.annotations.LazyCollectionOption;
|
|
|
|
import org.hibernate.annotations.LazyCollectionOption;
|
|
|
|
import org.hibernate.search.annotations.Analyze;
|
|
|
|
import org.hibernate.search.annotations.Analyze;
|
|
|
@ -24,6 +26,7 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
@MappedSuperclass
|
|
|
|
@MappedSuperclass
|
|
|
|
@Indexed
|
|
|
|
@Indexed
|
|
|
|
|
|
|
|
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
|
|
|
public class RequirementBase extends BaseData implements FilterableRequirement, SeasonsAware {
|
|
|
|
public class RequirementBase extends BaseData implements FilterableRequirement, SeasonsAware {
|
|
|
|
|
|
|
|
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
|
@ -43,9 +46,11 @@ public class RequirementBase extends BaseData implements FilterableRequirement,
|
|
|
|
private String description;
|
|
|
|
private String description;
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
|
|
@JoinColumn(name = "CENTRE_ID")
|
|
|
|
@JoinColumn(name = "CENTRE_ID")
|
|
|
|
|
|
|
|
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
|
|
|
private Workgroup centre;
|
|
|
|
private Workgroup centre;
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
|
|
@JoinColumn(name = "WORKGROUP_ID")
|
|
|
|
@JoinColumn(name = "WORKGROUP_ID")
|
|
|
|
|
|
|
|
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
|
|
|
private Workgroup workgroup;
|
|
|
|
private Workgroup workgroup;
|
|
|
|
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
|
|
|
|
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
|
|
|
|
@LazyCollection(LazyCollectionOption.TRUE)
|
|
|
|
@LazyCollection(LazyCollectionOption.TRUE)
|
|
|
@ -56,6 +61,7 @@ public class RequirementBase extends BaseData implements FilterableRequirement,
|
|
|
|
private RequirementState state;
|
|
|
|
private RequirementState state;
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
|
|
@JoinColumn(name = "SEASON_ID")
|
|
|
|
@JoinColumn(name = "SEASON_ID")
|
|
|
|
|
|
|
|
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
|
|
|
private Season season;
|
|
|
|
private Season season;
|
|
|
|
|
|
|
|
|
|
|
|
public RequirementBase() {
|
|
|
|
public RequirementBase() {
|
|
|
|