Removed getter method when there is no setter one.

This commit is contained in:
Christian P. MOMON 2020-01-05 18:31:03 +01:00
parent a9d93a5afd
commit e95c7459bd
4 changed files with 137 additions and 108 deletions

View File

@ -89,15 +89,39 @@ public class AgirStatool
result = new StringList();
Projects projects = listProjectsWithRawStats().sortByName();
String header = String.format("%3s %-30s %-30s %s %s %6s %6s %7s %7s %7s %7s %9s %7s", "ID", "Identifier", "Name", "ParentId", "Child", "Count", "New", "Ongoing",
"Resolved", "Closed", "Rejected", "Confirmed", "Maybe", "Waiting");
String header = String.format("%3s %-30s %-30s %s %s %6s %6s %7s %7s %7s %7s %9s %7s %7s",
"ID",
"Identifier",
"Name",
"ParentId",
"Child",
"Count",
"New",
"Ongoing",
"Resolved",
"Closed",
"Rejected",
"Confirmed",
"Maybe",
"Waiting");
result.appendln(header);
for (Project project : projects)
{
String line = String.format("%3d %-30s %-30s %4d %4d %7d %7d %7d %7d %7d %7d %9d %7d", project.getId(), project.getIdentifier(), project.getName(),
project.getParentId(), project.getChildCount(), project.getIssueStats().getCount(), project.getIssueStats().getCount(), project.getIssueStats().getNewCount(),
project.getIssueStats().getOngoingCount(), project.getIssueStats().getResolvedCount(), project.getIssueStats().getClosedCount(), project.getIssueStats().getRejectedCount(),
project.getIssueStats().getConfirmedCount(), project.getIssueStats().getMaybeCount(), project.getIssueStats().getWaitingCount());
String line = String.format("%3d %-30s %-30s %4d %4d %7d %7d %7d %7d %7d %7d %9d %7d %7s",
project.getId(),
project.getIdentifier(),
project.getName(),
project.getParentId(),
project.getChildCount(),
project.issueStats().getCount(),
project.issueStats().getNewCount(),
project.issueStats().getOngoingCount(),
project.issueStats().getResolvedCount(),
project.issueStats().getClosedCount(),
project.issueStats().getRejectedCount(),
project.issueStats().getConfirmedCount(),
project.issueStats().getMaybeCount(),
project.issueStats().getWaitingCount());
result.appendln(line);
}
@ -121,7 +145,12 @@ public class AgirStatool
result.appendln(header);
for (Project project : projects)
{
String line = String.format("%3d %-30s %-30s %4d %4d", project.getId(), project.getIdentifier(), project.getName(), project.getParentId(), project.getChildCount());
String line = String.format("%3d %-30s %-30s %4d %4d",
project.getId(),
project.getIdentifier(),
project.getName(),
project.getParentId(),
project.getChildCount());
result.appendln(line);
}
@ -258,16 +287,16 @@ public class AgirStatool
result = new Project(id, identifier, name, parentId);
result.setChildCount(resultSet.getLong(5));
result.setLastUpdate(AgirStatoolUtils.toLocaleDateTime(resultSet.getTimestamp(6)));
result.getIssueStats().setCount(resultSet.getLong(7));
result.getIssueStats().setNewCount(resultSet.getLong(8));
result.getIssueStats().setOngoingCount(resultSet.getLong(9));
result.getIssueStats().setResolvedCount(resultSet.getLong(10));
result.getIssueStats().setClosedCount(resultSet.getLong(11));
result.getIssueStats().setRejectedCount(resultSet.getLong(12));
result.getIssueStats().setConfirmedCount(resultSet.getLong(13));
result.getIssueStats().setMaybeCount(resultSet.getLong(14));
result.getIssueStats().setWaitingCount(resultSet.getLong(15));
result.getIssueStats().setLastUpdate(AgirStatoolUtils.toLocaleDateTime(resultSet.getTimestamp(16)));
result.issueStats().setCount(resultSet.getLong(7));
result.issueStats().setNewCount(resultSet.getLong(8));
result.issueStats().setOngoingCount(resultSet.getLong(9));
result.issueStats().setResolvedCount(resultSet.getLong(10));
result.issueStats().setClosedCount(resultSet.getLong(11));
result.issueStats().setRejectedCount(resultSet.getLong(12));
result.issueStats().setConfirmedCount(resultSet.getLong(13));
result.issueStats().setMaybeCount(resultSet.getLong(14));
result.issueStats().setWaitingCount(resultSet.getLong(15));
result.issueStats().setLastUpdate(AgirStatoolUtils.toLocaleDateTime(resultSet.getTimestamp(16)));
}
}
catch (SQLException exception)
@ -468,27 +497,27 @@ public class AgirStatool
project.setChildCount(resultSet.getLong(5));
project.setLastUpdate(AgirStatoolUtils.toLocaleDateTime(resultSet.getTimestamp(6)));
project.getIssueStats().setCount(resultSet.getLong(7));
project.getIssueStats().setNewCount(resultSet.getLong(8));
project.getIssueStats().setOngoingCount(resultSet.getLong(9));
project.getIssueStats().setResolvedCount(resultSet.getLong(10));
project.getIssueStats().setClosedCount(resultSet.getLong(11));
project.getIssueStats().setRejectedCount(resultSet.getLong(12));
project.getIssueStats().setConfirmedCount(resultSet.getLong(13));
project.getIssueStats().setMaybeCount(resultSet.getLong(14));
project.getIssueStats().setWaitingCount(resultSet.getLong(15));
project.issueStats().setCount(resultSet.getLong(7));
project.issueStats().setNewCount(resultSet.getLong(8));
project.issueStats().setOngoingCount(resultSet.getLong(9));
project.issueStats().setResolvedCount(resultSet.getLong(10));
project.issueStats().setClosedCount(resultSet.getLong(11));
project.issueStats().setRejectedCount(resultSet.getLong(12));
project.issueStats().setConfirmedCount(resultSet.getLong(13));
project.issueStats().setMaybeCount(resultSet.getLong(14));
project.issueStats().setWaitingCount(resultSet.getLong(15));
project.getIssueStats().setUnassignedCount(resultSet.getLong(16));
project.getIssueStats().setUnassignedNewCount(resultSet.getLong(17));
project.getIssueStats().setUnassignedOngoingCount(resultSet.getLong(18));
project.getIssueStats().setUnassignedResolvedCount(resultSet.getLong(19));
project.getIssueStats().setUnassignedClosedCount(resultSet.getLong(20));
project.getIssueStats().setUnassignedRejectedCount(resultSet.getLong(21));
project.getIssueStats().setUnassignedConfirmedCount(resultSet.getLong(22));
project.getIssueStats().setUnassignedMaybeCount(resultSet.getLong(23));
project.getIssueStats().setUnassignedWaitingCount(resultSet.getLong(24));
project.issueStats().setUnassignedCount(resultSet.getLong(16));
project.issueStats().setUnassignedNewCount(resultSet.getLong(17));
project.issueStats().setUnassignedOngoingCount(resultSet.getLong(18));
project.issueStats().setUnassignedResolvedCount(resultSet.getLong(19));
project.issueStats().setUnassignedClosedCount(resultSet.getLong(20));
project.issueStats().setUnassignedRejectedCount(resultSet.getLong(21));
project.issueStats().setUnassignedConfirmedCount(resultSet.getLong(22));
project.issueStats().setUnassignedMaybeCount(resultSet.getLong(23));
project.issueStats().setUnassignedWaitingCount(resultSet.getLong(24));
project.getIssueStats().setLastUpdate(AgirStatoolUtils.toLocaleDateTime(resultSet.getTimestamp(25)));
project.issueStats().setLastUpdate(AgirStatoolUtils.toLocaleDateTime(resultSet.getTimestamp(25)));
result.add(project);
}

View File

@ -65,11 +65,6 @@ public class Project
return this.identifier;
}
public IssueStats getIssueStats()
{
return this.stats;
}
public LocalDateTime getLastUpdate()
{
return this.lastUpdate;
@ -90,11 +85,6 @@ public class Project
return this.path;
}
public Projects getSubProjects()
{
return this.subProjects;
}
/**
* Checks for child.
*
@ -117,6 +107,11 @@ public class Project
return result;
}
public IssueStats issueStats()
{
return this.stats;
}
public void setChildCount(final long childCount)
{
this.childCount = childCount;
@ -146,4 +141,9 @@ public class Project
{
this.parentId = parentId;
}
public Projects subProjects()
{
return this.subProjects;
}
}

View File

@ -68,16 +68,16 @@ public class ProjectsGroupedPageBuilder
data.setAttribute("projectLine", index, "projectNameLink", "href", project.getPath());
data.setContent("projectLine", index, "projectNameLink", StringEscapeUtils.escapeXml(project.getName()));
data.setContent("projectLine", index, "childCount", project.getChildCount());
data.setContent("projectLine", index, "issueCount", project.getIssueStats().getCount());
data.setContent("projectLine", index, "activeIssueCount", project.getIssueStats().getActiveCount());
data.setContent("projectLine", index, "maybeIssueCount", project.getIssueStats().getMaybeCount());
data.setContent("projectLine", index, "resolvedIssueCount", project.getIssueStats().getResolvedCount());
data.setContent("projectLine", index, "concludedIssueCount", project.getIssueStats().getConcludedCount());
data.setContent("projectLine", index, "unassignedIssueCount", project.getIssueStats().getUnassignedCount());
data.setContent("projectLine", index, "unassignedNewIssueCount", project.getIssueStats().getUnassignedNewCount());
data.setContent("projectLine", index, "unassignedStartedIssueCount", project.getIssueStats().getUnassignedStartedCount());
data.setContent("projectLine", index, "unassignedResolvedIssueCount", project.getIssueStats().getUnassignedResolvedCount());
data.setContent("projectLine", index, "unassignedConcludedIssueCount", project.getIssueStats().getUnassignedConcludedCount());
data.setContent("projectLine", index, "issueCount", project.issueStats().getCount());
data.setContent("projectLine", index, "activeIssueCount", project.issueStats().getActiveCount());
data.setContent("projectLine", index, "maybeIssueCount", project.issueStats().getMaybeCount());
data.setContent("projectLine", index, "resolvedIssueCount", project.issueStats().getResolvedCount());
data.setContent("projectLine", index, "concludedIssueCount", project.issueStats().getConcludedCount());
data.setContent("projectLine", index, "unassignedIssueCount", project.issueStats().getUnassignedCount());
data.setContent("projectLine", index, "unassignedNewIssueCount", project.issueStats().getUnassignedNewCount());
data.setContent("projectLine", index, "unassignedStartedIssueCount", project.issueStats().getUnassignedStartedCount());
data.setContent("projectLine", index, "unassignedResolvedIssueCount", project.issueStats().getUnassignedResolvedCount());
data.setContent("projectLine", index, "unassignedConcludedIssueCount", project.issueStats().getUnassignedConcludedCount());
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(project.getLastUpdate(), "n/a"));
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(project.getLastUpdate(), "n/a"));
index += 1;
@ -92,18 +92,18 @@ public class ProjectsGroupedPageBuilder
data.setAttribute("projectLine", index, "projectNameLink", "href", subProject.getPath());
data.setContent("projectLine", index, "projectNameLink", StringEscapeUtils.escapeXml(subProject.getName()));
data.setContent("projectLine", index, "childCount", subProject.getChildCount());
data.setContent("projectLine", index, "issueCount", subProject.getIssueStats().getCount());
data.setContent("projectLine", index, "activeIssueCount", subProject.getIssueStats().getActiveCount());
data.setContent("projectLine", index, "maybeIssueCount", subProject.getIssueStats().getMaybeCount());
data.setContent("projectLine", index, "resolvedIssueCount", subProject.getIssueStats().getResolvedCount());
data.setContent("projectLine", index, "concludedIssueCount", subProject.getIssueStats().getConcludedCount());
data.setContent("projectLine", index, "unassignedIssueCount", subProject.getIssueStats().getUnassignedCount());
data.setContent("projectLine", index, "unassignedNewIssueCount", subProject.getIssueStats().getUnassignedNewCount());
data.setContent("projectLine", index, "unassignedStartedIssueCount", subProject.getIssueStats().getUnassignedStartedCount());
data.setContent("projectLine", index, "unassignedResolvedIssueCount", subProject.getIssueStats().getUnassignedResolvedCount());
data.setContent("projectLine", index, "unassignedConcludedIssueCount", subProject.getIssueStats().getUnassignedConcludedCount());
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(subProject.getIssueStats().getLastUpdate(), "n/a"));
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(subProject.getIssueStats().getLastUpdate(), "n/a"));
data.setContent("projectLine", index, "issueCount", subProject.issueStats().getCount());
data.setContent("projectLine", index, "activeIssueCount", subProject.issueStats().getActiveCount());
data.setContent("projectLine", index, "maybeIssueCount", subProject.issueStats().getMaybeCount());
data.setContent("projectLine", index, "resolvedIssueCount", subProject.issueStats().getResolvedCount());
data.setContent("projectLine", index, "concludedIssueCount", subProject.issueStats().getConcludedCount());
data.setContent("projectLine", index, "unassignedIssueCount", subProject.issueStats().getUnassignedCount());
data.setContent("projectLine", index, "unassignedNewIssueCount", subProject.issueStats().getUnassignedNewCount());
data.setContent("projectLine", index, "unassignedStartedIssueCount", subProject.issueStats().getUnassignedStartedCount());
data.setContent("projectLine", index, "unassignedResolvedIssueCount", subProject.issueStats().getUnassignedResolvedCount());
data.setContent("projectLine", index, "unassignedConcludedIssueCount", subProject.issueStats().getUnassignedConcludedCount());
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(subProject.issueStats().getLastUpdate(), "n/a"));
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(subProject.issueStats().getLastUpdate(), "n/a"));
index += 1;
}
}

View File

@ -66,26 +66,26 @@ public class ProjectsRawPageBuilder
data.setAttribute("projectLine", index, "projectNameLink", "href", project.getPath());
data.setContent("projectLine", index, "projectNameLink", StringEscapeUtils.escapeXml(project.getName()));
data.setContent("projectLine", index, "childCount", project.getChildCount());
data.setContent("projectLine", index, "issueCount", project.getIssueStats().getCount());
data.setContent("projectLine", index, "newIssueCount", project.getIssueStats().getNewCount());
data.setContent("projectLine", index, "confirmedIssueCount", project.getIssueStats().getConfirmedCount());
data.setContent("projectLine", index, "ongoingIssueCount", project.getIssueStats().getOngoingCount());
data.setContent("projectLine", index, "waitingIssueCount", project.getIssueStats().getWaitingCount());
data.setContent("projectLine", index, "maybeIssueCount", project.getIssueStats().getMaybeCount());
data.setContent("projectLine", index, "resolvedIssueCount", project.getIssueStats().getResolvedCount());
data.setContent("projectLine", index, "rejectedIssueCount", project.getIssueStats().getRejectedCount());
data.setContent("projectLine", index, "closedIssueCount", project.getIssueStats().getClosedCount());
data.setContent("projectLine", index, "unassignedIssueCount", project.getIssueStats().getUnassignedCount());
data.setContent("projectLine", index, "unassignedNewIssueCount", project.getIssueStats().getUnassignedNewCount());
data.setContent("projectLine", index, "unassignedConfirmedIssueCount", project.getIssueStats().getUnassignedConfirmedCount());
data.setContent("projectLine", index, "unassignedOngoingIssueCount", project.getIssueStats().getUnassignedOngoingCount());
data.setContent("projectLine", index, "unassignedWaitingIssueCount", project.getIssueStats().getUnassignedWaitingCount());
data.setContent("projectLine", index, "unassignedMaybeIssueCount", project.getIssueStats().getUnassignedMaybeCount());
data.setContent("projectLine", index, "unassignedResolvedIssueCount", project.getIssueStats().getUnassignedResolvedCount());
data.setContent("projectLine", index, "unassignedRejectedIssueCount", project.getIssueStats().getUnassignedRejectedCount());
data.setContent("projectLine", index, "unassignedClosedIssueCount", project.getIssueStats().getUnassignedClosedCount());
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(project.getIssueStats().getLastUpdate(), "n/a"));
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(project.getIssueStats().getLastUpdate(), "n/a"));
data.setContent("projectLine", index, "issueCount", project.issueStats().getCount());
data.setContent("projectLine", index, "newIssueCount", project.issueStats().getNewCount());
data.setContent("projectLine", index, "confirmedIssueCount", project.issueStats().getConfirmedCount());
data.setContent("projectLine", index, "ongoingIssueCount", project.issueStats().getOngoingCount());
data.setContent("projectLine", index, "waitingIssueCount", project.issueStats().getWaitingCount());
data.setContent("projectLine", index, "maybeIssueCount", project.issueStats().getMaybeCount());
data.setContent("projectLine", index, "resolvedIssueCount", project.issueStats().getResolvedCount());
data.setContent("projectLine", index, "rejectedIssueCount", project.issueStats().getRejectedCount());
data.setContent("projectLine", index, "closedIssueCount", project.issueStats().getClosedCount());
data.setContent("projectLine", index, "unassignedIssueCount", project.issueStats().getUnassignedCount());
data.setContent("projectLine", index, "unassignedNewIssueCount", project.issueStats().getUnassignedNewCount());
data.setContent("projectLine", index, "unassignedConfirmedIssueCount", project.issueStats().getUnassignedConfirmedCount());
data.setContent("projectLine", index, "unassignedOngoingIssueCount", project.issueStats().getUnassignedOngoingCount());
data.setContent("projectLine", index, "unassignedWaitingIssueCount", project.issueStats().getUnassignedWaitingCount());
data.setContent("projectLine", index, "unassignedMaybeIssueCount", project.issueStats().getUnassignedMaybeCount());
data.setContent("projectLine", index, "unassignedResolvedIssueCount", project.issueStats().getUnassignedResolvedCount());
data.setContent("projectLine", index, "unassignedRejectedIssueCount", project.issueStats().getUnassignedRejectedCount());
data.setContent("projectLine", index, "unassignedClosedIssueCount", project.issueStats().getUnassignedClosedCount());
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(project.issueStats().getLastUpdate(), "n/a"));
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(project.issueStats().getLastUpdate(), "n/a"));
index += 1;
}
@ -98,26 +98,26 @@ public class ProjectsRawPageBuilder
data.setAttribute("projectLine", index, "projectNameLink", "href", subProject.getPath());
data.setContent("projectLine", index, "projectNameLink", StringEscapeUtils.escapeXml(subProject.getName()));
data.setContent("projectLine", index, "childCount", subProject.getChildCount());
data.setContent("projectLine", index, "issueCount", subProject.getIssueStats().getCount());
data.setContent("projectLine", index, "newIssueCount", subProject.getIssueStats().getNewCount());
data.setContent("projectLine", index, "confirmedIssueCount", subProject.getIssueStats().getConfirmedCount());
data.setContent("projectLine", index, "ongoingIssueCount", subProject.getIssueStats().getOngoingCount());
data.setContent("projectLine", index, "waitingIssueCount", subProject.getIssueStats().getWaitingCount());
data.setContent("projectLine", index, "maybeIssueCount", subProject.getIssueStats().getMaybeCount());
data.setContent("projectLine", index, "resolvedIssueCount", subProject.getIssueStats().getResolvedCount());
data.setContent("projectLine", index, "rejectedIssueCount", subProject.getIssueStats().getRejectedCount());
data.setContent("projectLine", index, "closedIssueCount", subProject.getIssueStats().getClosedCount());
data.setContent("projectLine", index, "unassignedIssueCount", subProject.getIssueStats().getUnassignedCount());
data.setContent("projectLine", index, "unassignedNewIssueCount", subProject.getIssueStats().getUnassignedNewCount());
data.setContent("projectLine", index, "unassignedConfirmedIssueCount", subProject.getIssueStats().getUnassignedConfirmedCount());
data.setContent("projectLine", index, "unassignedOngoingIssueCount", subProject.getIssueStats().getUnassignedOngoingCount());
data.setContent("projectLine", index, "unassignedWaitingIssueCount", subProject.getIssueStats().getUnassignedWaitingCount());
data.setContent("projectLine", index, "unassignedMaybeIssueCount", subProject.getIssueStats().getUnassignedMaybeCount());
data.setContent("projectLine", index, "unassignedResolvedIssueCount", subProject.getIssueStats().getUnassignedResolvedCount());
data.setContent("projectLine", index, "unassignedRejectedIssueCount", subProject.getIssueStats().getUnassignedRejectedCount());
data.setContent("projectLine", index, "unassignedClosedIssueCount", subProject.getIssueStats().getUnassignedClosedCount());
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(subProject.getIssueStats().getLastUpdate(), "n/a"));
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(subProject.getIssueStats().getLastUpdate(), "n/a"));
data.setContent("projectLine", index, "issueCount", subProject.issueStats().getCount());
data.setContent("projectLine", index, "newIssueCount", subProject.issueStats().getNewCount());
data.setContent("projectLine", index, "confirmedIssueCount", subProject.issueStats().getConfirmedCount());
data.setContent("projectLine", index, "ongoingIssueCount", subProject.issueStats().getOngoingCount());
data.setContent("projectLine", index, "waitingIssueCount", subProject.issueStats().getWaitingCount());
data.setContent("projectLine", index, "maybeIssueCount", subProject.issueStats().getMaybeCount());
data.setContent("projectLine", index, "resolvedIssueCount", subProject.issueStats().getResolvedCount());
data.setContent("projectLine", index, "rejectedIssueCount", subProject.issueStats().getRejectedCount());
data.setContent("projectLine", index, "closedIssueCount", subProject.issueStats().getClosedCount());
data.setContent("projectLine", index, "unassignedIssueCount", subProject.issueStats().getUnassignedCount());
data.setContent("projectLine", index, "unassignedNewIssueCount", subProject.issueStats().getUnassignedNewCount());
data.setContent("projectLine", index, "unassignedConfirmedIssueCount", subProject.issueStats().getUnassignedConfirmedCount());
data.setContent("projectLine", index, "unassignedOngoingIssueCount", subProject.issueStats().getUnassignedOngoingCount());
data.setContent("projectLine", index, "unassignedWaitingIssueCount", subProject.issueStats().getUnassignedWaitingCount());
data.setContent("projectLine", index, "unassignedMaybeIssueCount", subProject.issueStats().getUnassignedMaybeCount());
data.setContent("projectLine", index, "unassignedResolvedIssueCount", subProject.issueStats().getUnassignedResolvedCount());
data.setContent("projectLine", index, "unassignedRejectedIssueCount", subProject.issueStats().getUnassignedRejectedCount());
data.setContent("projectLine", index, "unassignedClosedIssueCount", subProject.issueStats().getUnassignedClosedCount());
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(subProject.issueStats().getLastUpdate(), "n/a"));
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(subProject.issueStats().getLastUpdate(), "n/a"));
index += 1;
}
}