|
|
|
@ -13,6 +13,8 @@ import ru.ulstu.extractor.gitrepository.model.GitRepository;
|
|
|
|
|
|
|
|
|
|
import javax.persistence.CascadeType;
|
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
|
import javax.persistence.EnumType;
|
|
|
|
|
import javax.persistence.Enumerated;
|
|
|
|
|
import javax.persistence.FetchType;
|
|
|
|
|
import javax.persistence.JoinColumn;
|
|
|
|
|
import javax.persistence.ManyToOne;
|
|
|
|
@ -20,6 +22,8 @@ import javax.persistence.OneToMany;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import static ru.ulstu.extractor.branch.model.IndexingStatus.EMPTY;
|
|
|
|
|
|
|
|
|
|
@Entity
|
|
|
|
|
public class Branch extends BaseEntity {
|
|
|
|
|
private String name;
|
|
|
|
@ -32,6 +36,9 @@ public class Branch extends BaseEntity {
|
|
|
|
|
@Fetch(FetchMode.SUBSELECT)
|
|
|
|
|
private List<Commit> commits = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
@Enumerated(EnumType.STRING)
|
|
|
|
|
private IndexingStatus indexingStatus = EMPTY;
|
|
|
|
|
|
|
|
|
|
public Branch() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -67,4 +74,12 @@ public class Branch extends BaseEntity {
|
|
|
|
|
public void setCommits(List<Commit> commits) {
|
|
|
|
|
this.commits = commits;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IndexingStatus getIndexingStatus() {
|
|
|
|
|
return indexingStatus;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setIndexingStatus(IndexingStatus indexingStatus) {
|
|
|
|
|
this.indexingStatus = indexingStatus;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|