From 1b468746dae2f09b0e43570a3d0d9901220a5f89 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 12 Apr 2021 10:53:33 +0400 Subject: [PATCH] #12 -- Show mark if entity is present --- src/main/java/ru/ulstu/extractor/model/Commit.java | 9 +++++++++ src/main/resources/templates/filterCommits.html | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/src/main/java/ru/ulstu/extractor/model/Commit.java b/src/main/java/ru/ulstu/extractor/model/Commit.java index 1bbe22f..31c6eac 100644 --- a/src/main/java/ru/ulstu/extractor/model/Commit.java +++ b/src/main/java/ru/ulstu/extractor/model/Commit.java @@ -1,3 +1,8 @@ +/* + * Copyright (C) 2021 Anton Romanov - All Rights Reserved + * You may use, distribute and modify this code, please write to: romanov73@gmail.com. + */ + package ru.ulstu.extractor.model; import org.hibernate.annotations.Fetch; @@ -84,4 +89,8 @@ public class Commit extends BaseEntity { public void setBranch(Branch branch) { this.branch = branch; } + + public boolean containsEntity() { + return fileChanges.stream().anyMatch(FileChange::isContainsEntity); + } } diff --git a/src/main/resources/templates/filterCommits.html b/src/main/resources/templates/filterCommits.html index 2836270..0a44875 100644 --- a/src/main/resources/templates/filterCommits.html +++ b/src/main/resources/templates/filterCommits.html @@ -86,6 +86,7 @@ Автор Дата Сообщение + Содержит сущность @@ -93,6 +94,12 @@ + +
+ +
+