async indexing #88
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
package ru.ulstu.extractor.branch.model;
|
||||
|
||||
public enum IndexingStatus {
|
||||
EMPTY, INDEXING, FINISHED
|
||||
}
|
@ -99,4 +99,12 @@
|
||||
OR branch_id is null;
|
||||
</sql>
|
||||
</changeSet>
|
||||
<changeSet author="orion" id="20230207-220000-1">
|
||||
<addColumn tableName="branch">
|
||||
<column name="indexing_status" type="varchar(100)"/>
|
||||
</addColumn>
|
||||
<update tableName="branch">
|
||||
<column name="indexing_status" value="FINISHED"/>
|
||||
</update>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
Loading…
Reference in New Issue
Block a user