Skip to content

Commit

Permalink
Enhance committee, government, and party role views for deeper politi…
Browse files Browse the repository at this point in the history
…cal (#6895)

* Enhance committee, government, and party role views for deeper political
analysis:

- Add new document statistics (reports, statements, initiatives) to
track member activity.
- Introduce role classification and committee type for more granular
insight into responsibilities.
- Improve sorting logic and activity-level categorization for
streamlined performance review.
- Enable analysts to better interpret political engagement trends and
leadership dynamics.

* fix test
  • Loading branch information
pethers authored Dec 24, 2024
1 parent a3da07d commit 5c56de7
Show file tree
Hide file tree
Showing 11 changed files with 2,194 additions and 83 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,26 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ViewRiksdagenCommitteeRoleMember", propOrder = {
"roleId",
"detail",
"roleCode",
"firstName",
"lastName",
"fromDate",
"toDate",
"personId",
"party",
"totalDaysServed",
"active"
})
"roleId",
"detail",
"roleCode",
"firstName",
"lastName",
"fromDate",
"toDate",
"personId",
"party",
"totalDaysServed",
"active",
"totalDocuments",
"documentsLastYear",
"totalCommitteeReports",
"totalStatements",
"totalInitiatives",
"activityLevel",
"roleType",
"committeeType"
})
@Entity(name = "ViewRiksdagenCommitteeRoleMember")
@Table(name = "VIEW_RIKSDAGEN_COMMITTEE_ROLE_MEMBER")
@Inheritance(strategy = InheritanceType.JOINED)
Expand Down Expand Up @@ -115,6 +123,18 @@ public class ViewRiksdagenCommitteeRoleMember
protected int totalDaysServed;
protected boolean active;

protected long totalDocuments;
protected long documentsLastYear;
protected long totalCommitteeReports;
protected long totalStatements;
protected long totalInitiatives;
@XmlElement(required = true)
protected String activityLevel;
@XmlElement(required = true)
protected String roleType;
@XmlElement(required = true)
protected String committeeType;

/**
* Gets the value of the roleId property.
*
Expand Down Expand Up @@ -434,19 +454,139 @@ public ViewRiksdagenCommitteeRoleMember withActive(final boolean value) {
return this;
}

@Override
public final String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
@Basic
@Column(name = "TOTAL_DOCUMENTS", precision = 20)
public long getTotalDocuments() {
return totalDocuments;
}

public void setTotalDocuments(final long value) {
this.totalDocuments = value;
}

@Basic
@Column(name = "DOCUMENTS_LAST_YEAR", precision = 20)
public long getDocumentsLastYear() {
return documentsLastYear;
}

public void setDocumentsLastYear(final long value) {
this.documentsLastYear = value;
}

@Basic
@Column(name = "TOTAL_COMMITTEE_REPORTS", precision = 20)
public long getTotalCommitteeReports() {
return totalCommitteeReports;
}

public void setTotalCommitteeReports(final long value) {
this.totalCommitteeReports = value;
}

@Basic
@Column(name = "TOTAL_STATEMENTS", precision = 20)
public long getTotalStatements() {
return totalStatements;
}

public void setTotalStatements(final long value) {
this.totalStatements = value;
}

@Basic
@Column(name = "TOTAL_INITIATIVES", precision = 20)
public long getTotalInitiatives() {
return totalInitiatives;
}

public void setTotalInitiatives(final long value) {
this.totalInitiatives = value;
}

@Basic
@Column(name = "ACTIVITY_LEVEL")
public String getActivityLevel() {
return activityLevel;
}

public void setActivityLevel(final String value) {
this.activityLevel = value;
}

@Basic
@Column(name = "ROLE_TYPE")
public String getRoleType() {
return roleType;
}

public void setRoleType(final String value) {
this.roleType = value;
}

@Basic
@Column(name = "COMMITTEE_TYPE")
public String getCommitteeType() {
return committeeType;
}

public void setCommitteeType(final String value) {
this.committeeType = value;
}

// Additional builder pattern methods for new fields
public ViewRiksdagenCommitteeRoleMember withTotalDocuments(final long value) {
setTotalDocuments(value);
return this;
}

public ViewRiksdagenCommitteeRoleMember withDocumentsLastYear(final long value) {
setDocumentsLastYear(value);
return this;
}

@Override
public final boolean equals(final Object obj) {
return EqualsBuilder.reflectionEquals(this, obj);
}
public ViewRiksdagenCommitteeRoleMember withTotalCommitteeReports(final long value) {
setTotalCommitteeReports(value);
return this;
}

@Override
public final int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
public ViewRiksdagenCommitteeRoleMember withTotalStatements(final long value) {
setTotalStatements(value);
return this;
}

}
public ViewRiksdagenCommitteeRoleMember withTotalInitiatives(final long value) {
setTotalInitiatives(value);
return this;
}

public ViewRiksdagenCommitteeRoleMember withActivityLevel(final String value) {
setActivityLevel(value);
return this;
}

public ViewRiksdagenCommitteeRoleMember withRoleType(final String value) {
setRoleType(value);
return this;
}

public ViewRiksdagenCommitteeRoleMember withCommitteeType(final String value) {
setCommitteeType(value);
return this;
}

@Override
public final String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}

@Override
public final boolean equals(final Object obj) {
return EqualsBuilder.reflectionEquals(this, obj);
}

@Override
public final int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
}
Loading

0 comments on commit 5c56de7

Please sign in to comment.