ViewRiksdagenCommittee.java

//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.02.25 at 12:05:09 AM CET
//


package com.hack23.cia.model.internal.application.data.committee.impl;


import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.hack23.cia.model.common.api.ModelObject;
import com.hack23.cia.model.common.impl.xml.XmlDateTypeAdapter;


// TODO: Auto-generated Javadoc
/**
 * <p>Java class for ViewRiksdagenCommittee complex type.
 *
 * <p>The following schema fragment specifies the expected content contained within this class.
 *
 * <pre>
 * &lt;complexType name="ViewRiksdagenCommittee"&gt;
 *   &lt;complexContent&gt;
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
 *       &lt;sequence&gt;
 *         &lt;element name="embeddedId" type="{http://committee.data.application.internal.model.cia.hack23.com/impl}RiksdagenCommitteeEmbeddedId"/&gt;
 *         &lt;element name="totalAssignments" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
 *         &lt;element name="firstAssignmentDate" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
 *         &lt;element name="lastAssignmentDate" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
 *         &lt;element name="totalDaysServed" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
 *         &lt;element name="currentMemberSize" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
 *         &lt;element name="active" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
 *       &lt;/sequence&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ViewRiksdagenCommittee", propOrder = {
    "embeddedId",
    "totalAssignments",
    "firstAssignmentDate",
    "lastAssignmentDate",
    "totalDaysServed",
    "currentMemberSize",
    "active",
    "totalLeadershipPositions",
    "currentLeadershipPositions",
    "totalSubstitutePositions",
    "currentSubstitutePositions",
    "currentRegularMembers",
    "totalDocuments",
    "documentsLastYear",
    "avgDocumentsPerMember",
    "totalCommitteeMotions",
    "totalFollowUpMotions",
    "activityLevel"
})
@Entity(name = "ViewRiksdagenCommittee")
@Table(name = "VIEW_RIKSDAGEN_COMMITTEE")
@Inheritance(strategy = InheritanceType.JOINED)
public class ViewRiksdagenCommittee
    implements ModelObject
{

    /** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;

	/** The embedded id. */
	@XmlElement(required = true)
    protected RiksdagenCommitteeEmbeddedId embeddedId;

    /** The total assignments. */
    protected long totalAssignments;

    /** The first assignment date. */
    @XmlElement(required = true, type = String.class)
    @XmlJavaTypeAdapter(XmlDateTypeAdapter.class)
    @XmlSchemaType(name = "date")
    protected Date firstAssignmentDate;

    /** The last assignment date. */
    @XmlElement(required = true, type = String.class)
    @XmlJavaTypeAdapter(XmlDateTypeAdapter.class)
    @XmlSchemaType(name = "date")
    protected Date lastAssignmentDate;

    /** The total days served. */
    protected long totalDaysServed;

    /** The current member size. */
    protected long currentMemberSize;

    /** The active. */
    protected boolean active;

    /** The total leadership positions. */
    protected long totalLeadershipPositions;

    /** The current leadership positions. */
    protected long currentLeadershipPositions;

    /** The total substitute positions. */
    protected long totalSubstitutePositions;

    /** The current substitute positions. */
    protected long currentSubstitutePositions;

    /** The current regular members. */
    protected long currentRegularMembers;

    /** The total documents. */
    protected long totalDocuments;

    /** The documents last year. */
    protected long documentsLastYear;

    /** The avg documents per member. */
    protected double avgDocumentsPerMember;

    /** The total committee motions. */
    protected long totalCommitteeMotions;

    /** The total follow up motions. */
    protected long totalFollowUpMotions;

    /** The activity level. */
    @XmlElement(required = true)
    protected String activityLevel;

    /**
     * Gets the value of the embeddedId property.
     *
     * @return
     *     possible object is
     *     {@link RiksdagenCommitteeEmbeddedId }
     *
     */
    @EmbeddedId
    @AttributeOverrides({
        @AttributeOverride(name = "detail", column = @Column(name = "EMBEDDED_ID_DETAIL")),
        @AttributeOverride(name = "orgCode", column = @Column(name = "EMBEDDED_ID_ORG_CODE"))
    })
    public RiksdagenCommitteeEmbeddedId getEmbeddedId() {
        return embeddedId;
    }

    /**
     * Sets the value of the embeddedId property.
     *
     * @param value
     *     allowed object is
     *     {@link RiksdagenCommitteeEmbeddedId }
     *
     */
    public void setEmbeddedId(final RiksdagenCommitteeEmbeddedId value) {
        this.embeddedId = value;
    }

    /**
     * Gets the value of the totalAssignments property.
     *
     * @return the total assignments
     */
    @Basic
    @Column(name = "TOTAL_ASSIGNMENTS", precision = 20)
    public long getTotalAssignments() {
        return totalAssignments;
    }

    /**
     * Sets the value of the totalAssignments property.
     *
     * @param value the new total assignments
     */
    public void setTotalAssignments(final long value) {
        this.totalAssignments = value;
    }

    /**
     * Gets the value of the firstAssignmentDate property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "FIRST_ASSIGNMENT_DATE")
    @Temporal(TemporalType.DATE)
    public Date getFirstAssignmentDate() {
        return firstAssignmentDate;
    }

    /**
     * Sets the value of the firstAssignmentDate property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setFirstAssignmentDate(final Date value) {
        this.firstAssignmentDate = value;
    }

    /**
     * Gets the value of the lastAssignmentDate property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "LAST_ASSIGNMENT_DATE")
    @Temporal(TemporalType.DATE)
    public Date getLastAssignmentDate() {
        return lastAssignmentDate;
    }

    /**
     * Sets the value of the lastAssignmentDate property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setLastAssignmentDate(final Date value) {
        this.lastAssignmentDate = value;
    }

    /**
     * Gets the value of the totalDaysServed property.
     *
     * @return the total days served
     */
    @Basic
    @Column(name = "TOTAL_DAYS_SERVED", precision = 20)
    public long getTotalDaysServed() {
        return totalDaysServed;
    }

    /**
     * Sets the value of the totalDaysServed property.
     *
     * @param value the new total days served
     */
    public void setTotalDaysServed(final long value) {
        this.totalDaysServed = value;
    }

    /**
     * Gets the value of the currentMemberSize property.
     *
     * @return the current member size
     */
    @Basic
    @Column(name = "CURRENT_MEMBER_SIZE", precision = 20)
    public long getCurrentMemberSize() {
        return currentMemberSize;
    }

    /**
     * Sets the value of the currentMemberSize property.
     *
     * @param value the new current member size
     */
    public void setCurrentMemberSize(final long value) {
        this.currentMemberSize = value;
    }

    /**
     * Gets the value of the active property.
     *
     * @return true, if is active
     */
    @Basic
    @Column(name = "ACTIVE")
    public boolean isActive() {
        return active;
    }

    /**
     * Sets the value of the active property.
     *
     * @param value the new active
     */
    public void setActive(final boolean value) {
        this.active = value;
    }

    /**
     * Gets the total leadership positions.
     *
     * @return the total leadership positions
     */
    @Basic
    @Column(name = "TOTAL_LEADERSHIP_POSITIONS", precision = 20)
    public long getTotalLeadershipPositions() {
        return totalLeadershipPositions;
    }

    /**
     * Sets the total leadership positions.
     *
     * @param value the new total leadership positions
     */
    public void setTotalLeadershipPositions(final long value) {
        this.totalLeadershipPositions = value;
    }

    /**
     * Gets the current leadership positions.
     *
     * @return the current leadership positions
     */
    @Basic
    @Column(name = "CURRENT_LEADERSHIP_POSITIONS", precision = 20)
    public long getCurrentLeadershipPositions() {
        return currentLeadershipPositions;
    }

    /**
     * Sets the current leadership positions.
     *
     * @param value the new current leadership positions
     */
    public void setCurrentLeadershipPositions(final long value) {
        this.currentLeadershipPositions = value;
    }

    /**
     * Gets the total substitute positions.
     *
     * @return the total substitute positions
     */
    @Basic
    @Column(name = "TOTAL_SUBSTITUTE_POSITIONS", precision = 20)
    public long getTotalSubstitutePositions() {
        return totalSubstitutePositions;
    }

    /**
     * Sets the total substitute positions.
     *
     * @param value the new total substitute positions
     */
    public void setTotalSubstitutePositions(final long value) {
        this.totalSubstitutePositions = value;
    }

    /**
     * Gets the current substitute positions.
     *
     * @return the current substitute positions
     */
    @Basic
    @Column(name = "CURRENT_SUBSTITUTE_POSITIONS", precision = 20)
    public long getCurrentSubstitutePositions() {
        return currentSubstitutePositions;
    }

    /**
     * Sets the current substitute positions.
     *
     * @param value the new current substitute positions
     */
    public void setCurrentSubstitutePositions(final long value) {
        this.currentSubstitutePositions = value;
    }

    /**
     * Gets the current regular members.
     *
     * @return the current regular members
     */
    @Basic
    @Column(name = "CURRENT_REGULAR_MEMBERS", precision = 20)
    public long getCurrentRegularMembers() {
        return currentRegularMembers;
    }

    /**
     * Sets the current regular members.
     *
     * @param value the new current regular members
     */
    public void setCurrentRegularMembers(final long value) {
        this.currentRegularMembers = value;
    }

    /**
     * Gets the total documents.
     *
     * @return the total documents
     */
    @Basic
    @Column(name = "TOTAL_DOCUMENTS", precision = 20)
    public long getTotalDocuments() {
        return totalDocuments;
    }

    /**
     * Sets the total documents.
     *
     * @param value the new total documents
     */
    public void setTotalDocuments(final long value) {
        this.totalDocuments = value;
    }

    /**
     * Gets the documents last year.
     *
     * @return the documents last year
     */
    @Basic
    @Column(name = "DOCUMENTS_LAST_YEAR", precision = 20)
    public long getDocumentsLastYear() {
        return documentsLastYear;
    }

    /**
     * Sets the documents last year.
     *
     * @param value the new documents last year
     */
    public void setDocumentsLastYear(final long value) {
        this.documentsLastYear = value;
    }

    /**
     * Gets the avg documents per member.
     *
     * @return the avg documents per member
     */
    @Basic
    @Column(name = "AVG_DOCUMENTS_PER_MEMBER", precision = 10, scale = 1)
    public double getAvgDocumentsPerMember() {
        return avgDocumentsPerMember;
    }

    /**
     * Sets the avg documents per member.
     *
     * @param value the new avg documents per member
     */
    public void setAvgDocumentsPerMember(final double value) {
        this.avgDocumentsPerMember = value;
    }

    /**
     * Gets the total committee motions.
     *
     * @return the total committee motions
     */
    @Basic
    @Column(name = "TOTAL_COMMITTEE_MOTIONS", precision = 20)
    public long getTotalCommitteeMotions() {
        return totalCommitteeMotions;
    }

    /**
     * Sets the total committee motions.
     *
     * @param value the new total committee motions
     */
    public void setTotalCommitteeMotions(final long value) {
        this.totalCommitteeMotions = value;
    }

    /**
     * Gets the total follow up motions.
     *
     * @return the total follow up motions
     */
    @Basic
    @Column(name = "TOTAL_FOLLOW_UP_MOTIONS", precision = 20)
    public long getTotalFollowUpMotions() {
        return totalFollowUpMotions;
    }

    /**
     * Sets the total follow up motions.
     *
     * @param value the new total follow up motions
     */
    public void setTotalFollowUpMotions(final long value) {
        this.totalFollowUpMotions = value;
    }

    /**
     * Gets the activity level.
     *
     * @return the activity level
     */
    @Basic
    @Column(name = "ACTIVITY_LEVEL")
    public String getActivityLevel() {
        return activityLevel;
    }

    /**
     * Sets the activity level.
     *
     * @param value the new activity level
     */
    public void setActivityLevel(final String value) {
        this.activityLevel = value;
    }

    /**
     * With total leadership positions.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    // Add new builder pattern methods
    public ViewRiksdagenCommittee withTotalLeadershipPositions(final long value) {
        setTotalLeadershipPositions(value);
        return this;
    }

    /**
     * With current leadership positions.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withCurrentLeadershipPositions(final long value) {
        setCurrentLeadershipPositions(value);
        return this;
    }

    /**
     * With total substitute positions.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withTotalSubstitutePositions(final long value) {
        setTotalSubstitutePositions(value);
        return this;
    }

    /**
     * With current substitute positions.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withCurrentSubstitutePositions(final long value) {
        setCurrentSubstitutePositions(value);
        return this;
    }

    /**
     * With current regular members.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withCurrentRegularMembers(final long value) {
        setCurrentRegularMembers(value);
        return this;
    }

    /**
     * With total documents.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withTotalDocuments(final long value) {
        setTotalDocuments(value);
        return this;
    }

    /**
     * With documents last year.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withDocumentsLastYear(final long value) {
        setDocumentsLastYear(value);
        return this;
    }

    /**
     * With avg documents per member.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withAvgDocumentsPerMember(final double value) {
        setAvgDocumentsPerMember(value);
        return this;
    }

    /**
     * With total committee motions.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withTotalCommitteeMotions(final long value) {
        setTotalCommitteeMotions(value);
        return this;
    }

    /**
     * With total follow up motions.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withTotalFollowUpMotions(final long value) {
        setTotalFollowUpMotions(value);
        return this;
    }

    /**
     * With activity level.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withActivityLevel(final String value) {
        setActivityLevel(value);
        return this;
    }

    /**
     * With embedded id.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withEmbeddedId(final RiksdagenCommitteeEmbeddedId value) {
        setEmbeddedId(value);
        return this;
    }

    /**
     * With total assignments.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withTotalAssignments(final long value) {
        setTotalAssignments(value);
        return this;
    }

    /**
     * With first assignment date.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withFirstAssignmentDate(final Date value) {
        setFirstAssignmentDate(value);
        return this;
    }

    /**
     * With last assignment date.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withLastAssignmentDate(final Date value) {
        setLastAssignmentDate(value);
        return this;
    }

    /**
     * With total days served.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withTotalDaysServed(final long value) {
        setTotalDaysServed(value);
        return this;
    }

    /**
     * With current member size.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withCurrentMemberSize(final long value) {
        setCurrentMemberSize(value);
        return this;
    }

    /**
     * With active.
     *
     * @param value the value
     * @return the view riksdagen committee
     */
    public ViewRiksdagenCommittee withActive(final boolean value) {
        setActive(value);
        return this;
    }

	/**
	 * To string.
	 *
	 * @return the string
	 */
	@Override
	public final String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}



	/**
	 * Equals.
	 *
	 * @param obj the obj
	 * @return true, if successful
	 */
	@Override
	public final boolean equals(final Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}


	/**
	 * Hash code.
	 *
	 * @return the int
	 */
	@Override
	public final int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

}