SwedenParliamentElectoralRegion.java

/*
 * Copyright 2010 James Pether Sörling
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *	$Id$
 *  $HeadURL$
*/
// 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.24 at 11:39:49 PM CET 
//


package com.hack23.cia.model.external.val.riksdagsvalkrets.impl;

import java.math.BigInteger;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

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

import com.hack23.cia.model.common.api.ModelObject;


/**
 * The Class SwedenParliamentElectoralRegion.
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SwedenParliamentElectoralRegion", propOrder = {
    "electionRegionName",
    "numberOfVoters",
    "firstRound",
    "rest",
    "secondRound",
    "numberOfSeats"
})
@Entity(name = "SwedenParliamentElectoralRegion")
@Table(name = "SWEDEN_PARLIAMENT_ELECTORAL__1")
@Inheritance(strategy = InheritanceType.JOINED)
public class SwedenParliamentElectoralRegion
    implements ModelObject
{

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/** The election region name. */
    @XmlElement(name = "valkretsnamn", required = true)
    protected String electionRegionName;
    
    /** The number of voters. */
    @XmlElement(name = "r\u00f6stber\u00e4ttigade", required = true)
    protected BigInteger numberOfVoters;
    
    /** The first round. */
    @XmlElement(name = "omg\u00e5ng1", required = true)
    protected BigInteger firstRound;
    
    /** The rest. */
    @XmlElement(required = true)
    protected String rest;
    
    /** The second round. */
    @XmlElement(name = "omg\u00e5ng2", required = true)
    protected BigInteger secondRound;
    
    /** The number of seats. */
    @XmlElement(name = "mandat", required = true)
    protected BigInteger numberOfSeats;
    
    /** The hjid. */
    @XmlAttribute(name = "Hjid")
    protected Long hjid;

    /**
	 * Gets the election region name.
	 *
	 * @return the election region name
	 */
    @Basic
    @Column(name = "ELECTION_REGION_NAME")
    public String getElectionRegionName() {
        return electionRegionName;
    }

    /**
	 * Sets the election region name.
	 *
	 * @param value the new election region name
	 */
    public void setElectionRegionName(final String value) {
        this.electionRegionName = value;
    }

    /**
	 * Gets the number of voters.
	 *
	 * @return the number of voters
	 */
    @Basic
    @Column(name = "NUMBER_OF_VOTERS", precision = 20)
    public BigInteger getNumberOfVoters() {
        return numberOfVoters;
    }

    /**
	 * Sets the number of voters.
	 *
	 * @param value the new number of voters
	 */
    public void setNumberOfVoters(final BigInteger value) {
        this.numberOfVoters = value;
    }

    /**
	 * Gets the first round.
	 *
	 * @return the first round
	 */
    @Basic
    @Column(name = "FIRST_ROUND", precision = 20)
    public BigInteger getFirstRound() {
        return firstRound;
    }

    /**
	 * Sets the first round.
	 *
	 * @param value the new first round
	 */
    public void setFirstRound(final BigInteger value) {
        this.firstRound = value;
    }

    /**
	 * Gets the rest.
	 *
	 * @return the rest
	 */
    @Basic
    @Column(name = "REST")
    public String getRest() {
        return rest;
    }

    /**
	 * Sets the rest.
	 *
	 * @param value the new rest
	 */
    public void setRest(final String value) {
        this.rest = value;
    }

    /**
	 * Gets the second round.
	 *
	 * @return the second round
	 */
    @Basic
    @Column(name = "SECOND_ROUND", precision = 20)
    public BigInteger getSecondRound() {
        return secondRound;
    }

    /**
	 * Sets the second round.
	 *
	 * @param value the new second round
	 */
    public void setSecondRound(final BigInteger value) {
        this.secondRound = value;
    }

    /**
	 * Gets the number of seats.
	 *
	 * @return the number of seats
	 */
    @Basic
    @Column(name = "NUMBER_OF_SEATS", precision = 20)
    public BigInteger getNumberOfSeats() {
        return numberOfSeats;
    }

    /**
	 * Sets the number of seats.
	 *
	 * @param value the new number of seats
	 */
    public void setNumberOfSeats(final BigInteger value) {
        this.numberOfSeats = value;
    }

    /**
	 * Gets the hjid.
	 *
	 * @return the hjid
	 */
    @Id
    @Column(name = "HJID")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getHjid() {
        return hjid;
    }

    /**
	 * Sets the hjid.
	 *
	 * @param value the new hjid
	 */
    public void setHjid(final Long value) {
        this.hjid = value;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(final Object object) {
    	return EqualsBuilder.reflectionEquals(this,object,"hjid");
    }

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public final int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

}