Resolve "Структура классов для эвристических методов поиска определенных типов классов проекта" #37
@ -91,6 +91,10 @@ public class Commit extends BaseEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean containsEntity() {
|
public boolean containsEntity() {
|
||||||
return fileChanges.stream().anyMatch(FileChange::isContainsEntity);
|
return fileChanges != null && fileChanges.stream().anyMatch(
|
||||||
|
fileChange -> fileChange != null
|
||||||
|
&& fileChange.isContainsEntity() != null
|
||||||
|
&& fileChange.isContainsEntity()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ public class FileChange extends BaseEntity {
|
|||||||
@Transient
|
@Transient
|
||||||
private boolean added;
|
private boolean added;
|
||||||
|
|
||||||
private boolean containsEntity;
|
private Boolean containsEntity;
|
||||||
|
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "file_change_id", unique = true)
|
@JoinColumn(name = "file_change_id", unique = true)
|
||||||
@ -79,7 +79,7 @@ public class FileChange extends BaseEntity {
|
|||||||
return added;
|
return added;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isContainsEntity() {
|
public Boolean isContainsEntity() {
|
||||||
return containsEntity;
|
return containsEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user