ViewRiksdagenGovermentRoleMember.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.ministry.impl;


import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
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;


/**
 * <p>Java class for ViewRiksdagenGovermentRoleMember complex type.
 *
 * <p>The following schema fragment specifies the expected content contained within this class.
 *
 * <pre>
 * &lt;complexType name="ViewRiksdagenGovermentRoleMember"&gt;
 *   &lt;complexContent&gt;
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
 *       &lt;sequence&gt;
 *         &lt;element name="roleId" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
 *         &lt;element name="detail" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="role_code" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="first_name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="last_name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="from_date" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
 *         &lt;element name="to_date" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
 *         &lt;element name="person_id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="party" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="total_days_served" type="{http://www.w3.org/2001/XMLSchema}int"/&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 = "ViewRiksdagenGovermentRoleMember", propOrder = {
	    "roleId",
	    "detail",
	    "roleCode",
	    "firstName",
	    "lastName",
	    "fromDate",
	    "toDate",
	    "personId",
	    "party",
	    "totalDaysServed",
	    "active",
	    "totalDocuments",
	    "documentsLastYear",
	    "totalPropositions",
	    "totalGovernmentBills",
	    "activityLevel",
	    "roleType"
	})
@Entity(name = "ViewRiksdagenGovermentRoleMember")
@Table(name = "VIEW_RIKSDAGEN_GOVERMENT_ROLE_MEMBER")
@Inheritance(strategy = InheritanceType.JOINED)
public class ViewRiksdagenGovermentRoleMember
    implements ModelObject
{

    /** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;
	
	/** The role id. */
	protected long roleId;
    
    /** The detail. */
    @XmlElement(required = true)
    protected String detail;
    
    /** The role code. */
    @XmlElement(name = "role_code", required = true)
    protected String roleCode;
    
    /** The first name. */
    @XmlElement(name = "first_name", required = true)
    protected String firstName;
    
    /** The last name. */
    @XmlElement(name = "last_name", required = true)
    protected String lastName;
    
    /** The from date. */
    @XmlElement(name = "from_date", required = true, type = String.class)
    @XmlJavaTypeAdapter(XmlDateTypeAdapter.class)
    @XmlSchemaType(name = "date")
    protected Date fromDate;
    
    /** The to date. */
    @XmlElement(name = "to_date", required = true, type = String.class)
    @XmlJavaTypeAdapter(XmlDateTypeAdapter.class)
    @XmlSchemaType(name = "date")
    protected Date toDate;
    
    /** The person id. */
    @XmlElement(name = "person_id", required = true)
    protected String personId;
    
    /** The party. */
    @XmlElement(required = true)
    protected String party;
    
    /** The total days served. */
    @XmlElement(name = "total_days_served")
    protected int totalDaysServed;
    
    /** The active. */
    protected boolean active;

    /** The total documents. */
    protected long totalDocuments;
    
    /** The documents last year. */
    protected long documentsLastYear;
    
    /** The total propositions. */
    protected long totalPropositions;
    
    /** The total government bills. */
    protected long totalGovernmentBills;
    
    /** The activity level. */
    @XmlElement(required = true)
    protected String activityLevel;
    
    /** The role type. */
    @XmlElement(required = true)
    protected String roleType;

    /**
     * Gets the value of the roleId property.
     *
     * @return the role id
     */
    @Id
    @Column(name = "ROLE_ID")
    public long getRoleId() {
        return roleId;
    }

    /**
     * Sets the value of the roleId property.
     *
     * @param value the new role id
     */
    public void setRoleId(final long value) {
        this.roleId = value;
    }

    /**
     * Gets the value of the detail property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "DETAIL")
    public String getDetail() {
        return detail;
    }

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

    /**
     * Gets the value of the roleCode property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "ROLE_CODE")
    public String getRoleCode() {
        return roleCode;
    }

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

    /**
     * Gets the value of the firstName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "FIRST_NAME")
    public String getFirstName() {
        return firstName;
    }

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

    /**
     * Gets the value of the lastName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "LAST_NAME")
    public String getLastName() {
        return lastName;
    }

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

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

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

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

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

    /**
     * Gets the value of the personId property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "PERSON_ID")
    public String getPersonId() {
        return personId;
    }

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

    /**
     * Gets the value of the party property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "PARTY")
    public String getParty() {
        return party;
    }

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

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

    /**
     * Sets the value of the totalDaysServed property.
     *
     * @param value the new total days served
     */
    public void setTotalDaysServed(final int value) {
        this.totalDaysServed = 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 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 total propositions.
     *
     * @return the total propositions
     */
    @Basic
    @Column(name = "TOTAL_PROPOSITIONS", precision = 20)
    public long getTotalPropositions() {
        return totalPropositions;
    }

    /**
     * Sets the total propositions.
     *
     * @param value the new total propositions
     */
    public void setTotalPropositions(final long value) {
        this.totalPropositions = value;
    }

    /**
     * Gets the total government bills.
     *
     * @return the total government bills
     */
    @Basic
    @Column(name = "TOTAL_GOVERNMENT_BILLS", precision = 20)
    public long getTotalGovernmentBills() {
        return totalGovernmentBills;
    }

    /**
     * Sets the total government bills.
     *
     * @param value the new total government bills
     */
    public void setTotalGovernmentBills(final long value) {
        this.totalGovernmentBills = 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;
    }

    /**
     * Gets the role type.
     *
     * @return the role type
     */
    @Basic
    @Column(name = "ROLE_TYPE")
    public String getRoleType() {
        return roleType;
    }

    /**
     * Sets the role type.
     *
     * @param value the new role type
     */
    public void setRoleType(final String value) {
        this.roleType = value;
    }

    /**
     * With total documents.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    // New builder pattern methods
    public ViewRiksdagenGovermentRoleMember withTotalDocuments(final long value) {
        setTotalDocuments(value);
        return this;
    }

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

    /**
     * With total propositions.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withTotalPropositions(final long value) {
        setTotalPropositions(value);
        return this;
    }

    /**
     * With total government bills.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withTotalGovernmentBills(final long value) {
        setTotalGovernmentBills(value);
        return this;
    }

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

    /**
     * With role type.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withRoleType(final String value) {
        setRoleType(value);
        return this;
    }

    /**
     * With role id.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withRoleId(final long value) {
        setRoleId(value);
        return this;
    }

    /**
     * With detail.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withDetail(final String value) {
        setDetail(value);
        return this;
    }

    /**
     * With role code.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withRoleCode(final String value) {
        setRoleCode(value);
        return this;
    }

    /**
     * With first name.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withFirstName(final String value) {
        setFirstName(value);
        return this;
    }

    /**
     * With last name.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withLastName(final String value) {
        setLastName(value);
        return this;
    }

    /**
     * With from date.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withFromDate(final Date value) {
        setFromDate(value);
        return this;
    }

    /**
     * With to date.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withToDate(final Date value) {
        setToDate(value);
        return this;
    }

    /**
     * With person id.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withPersonId(final String value) {
        setPersonId(value);
        return this;
    }

    /**
     * With party.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withParty(final String value) {
        setParty(value);
        return this;
    }

    /**
     * With total days served.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember withTotalDaysServed(final int value) {
        setTotalDaysServed(value);
        return this;
    }

    /**
     * With active.
     *
     * @param value the value
     * @return the view riksdagen goverment role member
     */
    public ViewRiksdagenGovermentRoleMember 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);
	}

}