-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPatternSchema.java
More file actions
42 lines (34 loc) · 959 Bytes
/
PatternSchema.java
File metadata and controls
42 lines (34 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package io.github.patternatlas.api.entities;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.MapsId;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.OrderBy;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
@Entity
@Data
@NoArgsConstructor
public class PatternSchema {
@Id
private UUID id;
@OneToMany(mappedBy = "patternSchema", cascade = CascadeType.ALL)
@OrderBy("position ASC")
private List<PatternSectionSchema> patternSectionSchemas;
@JsonIgnore
@ToString.Exclude
@OneToOne
@MapsId
private PatternLanguage patternLanguage;
@Override
public int hashCode() {
return Objects.hash(id, patternSectionSchemas);
}
}