/* #LAST_VIEW_OBJECT */
/* #UPDATED */
package org.test.shop.model.domain.entity.view;

// Generated 30.08.2015 21:00:08 by Hibernate Tools 4.3.1

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.voodoodyne.jackson.jsog.JSOGGenerator;

import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Id;

import java.util.Date;

import javax.persistence.Column;

import org.test.shop.model.domain.SView;


/**
 * TmFirmsView generated by hbm2java, updated by voovee
 */
@JsonIdentityInfo(generator = JSOGGenerator.class)
@JsonIgnoreProperties({
			 
			  "firmid"
			, "firm"
			, "serieskey" 
})
@Entity
@Table(name="tm_firms_view")
public class TmFirmsView extends SView  {

	private static final long serialVersionUID = 1935783778978233L;

	private Integer id;
	private Integer version;
	private String createdby;
	private Date createon;
	private Integer firm;
	private String lastmodifiedby;
	private Date modifyon;
	private String serieskey;
	private String label;
	private Integer account;
	private String active;
	private String firmname;
	private Date lastpay;
	private Integer mounthcount;
	private Integer popularity;

	public TmFirmsView() {
	}

	public TmFirmsView(Integer id, Integer version, String createdby,
			Date createon, Integer firm, String lastmodifiedby, Date modifyon,
			String serieskey, String label, Integer account, String active,
			String firmname, Date lastpay, Integer mounthcount,
			Integer popularity) {
		this.id = id;
		this.version = version;
		this.createdby = createdby;
		this.createon = createon;
		this.firm = firm;
		this.lastmodifiedby = lastmodifiedby;
		this.modifyon = modifyon;
		this.serieskey = serieskey;
		this.label = label;
		this.account = account;
		this.active = active;
		this.firmname=firmname;
		this.lastpay = lastpay;
		this.mounthcount = mounthcount;
		this.popularity = popularity;
	}

	@Id
	@Column(name="id")
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name="version")
	public Integer getVersion() {
		return this.version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name="createdby")
	public String getCreatedby() {
		return this.createdby;
	}

	public void setCreatedby(String createdby) {
		this.createdby = createdby;
	}

	@Column(name="createon", length = 29)
	public Date getCreateon() {
		return this.createon;
	}

	public void setCreateon(Date createon) {
		this.createon = createon;
	}

	@Column(name="firm")
	public Integer getFirm() {
		return this.firm;
	}

	public void setFirm(Integer firm) {
		this.firm = firm;
	}

	@Column(name="lastmodifiedby")
	public String getLastmodifiedby() {
		return this.lastmodifiedby;
	}

	public void setLastmodifiedby(String lastmodifiedby) {
		this.lastmodifiedby = lastmodifiedby;
	}

	@Column(name="modifyon", length = 29)
	public Date getModifyon() {
		return this.modifyon;
	}

	public void setModifyon(Date modifyon) {
		this.modifyon = modifyon;
	}

	@Column(name="serieskey")
	public String getSerieskey() {
		return this.serieskey;
	}

	public void setSerieskey(String serieskey) {
		this.serieskey = serieskey;
	}

	@Column(name="label")
	public String getLabel() {
		return this.label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	@Column(name="account")
	public Integer getAccount() {
		return this.account;
	}

	public void setAccount(Integer account) {
		this.account = account;
	}

	@Column(name="active")
	public String getActive() {
		return this.active;
	}

	public void setActive(String active) {
		this.active = active;
	}

	@Column(name="firmname")
	public String getFirmname() {
		return this.firmname;
	}

	public void setFirmname(String firmname) {
		this.firmname=firmname;
	}

	@Column(name="lastpay", length = 29)
	public Date getLastpay() {
		return this.lastpay;
	}

	public void setLastpay(Date lastpay) {
		this.lastpay = lastpay;
	}

	@Column(name="mounthcount")
	public Integer getMounthcount() {
		return this.mounthcount;
	}

	public void setMounthcount(Integer mounthcount) {
		this.mounthcount = mounthcount;
	}

	@Column(name="popularity")
	public Integer getPopularity() {
		return this.popularity;
	}

	public void setPopularity(Integer popularity) {
		this.popularity = popularity;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmFirmsView))
			return false;
		TmFirmsView castOther = (TmFirmsView) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getVersion() == castOther.getVersion()) || (this
						.getVersion() != null && castOther.getVersion() != null && this
						.getVersion().equals(castOther.getVersion())))
				&& ((this.getCreatedby() == castOther.getCreatedby()) || (this
						.getCreatedby() != null
						&& castOther.getCreatedby() != null && this
						.getCreatedby().equals(castOther.getCreatedby())))
				&& ((this.getCreateon() == castOther.getCreateon()) || (this
						.getCreateon() != null
						&& castOther.getCreateon() != null && this
						.getCreateon().equals(castOther.getCreateon())))
				&& ((this.getFirm() == castOther.getFirm()) || (this.getFirm() != null
						&& castOther.getFirm() != null && this.getFirm()
						.equals(castOther.getFirm())))
				&& ((this.getLastmodifiedby() == castOther.getLastmodifiedby()) || (this
						.getLastmodifiedby() != null
						&& castOther.getLastmodifiedby() != null && this
						.getLastmodifiedby().equals(
								castOther.getLastmodifiedby())))
				&& ((this.getModifyon() == castOther.getModifyon()) || (this
						.getModifyon() != null
						&& castOther.getModifyon() != null && this
						.getModifyon().equals(castOther.getModifyon())))
				&& ((this.getSerieskey() == castOther.getSerieskey()) || (this
						.getSerieskey() != null
						&& castOther.getSerieskey() != null && this
						.getSerieskey().equals(castOther.getSerieskey())))
				&& ((this.getLabel() == castOther.getLabel()) || (this
						.getLabel() != null && castOther.getLabel() != null && this
						.getLabel().equals(castOther.getLabel())))
				&& ((this.getAccount() == castOther.getAccount()) || (this
						.getAccount() != null && castOther.getAccount() != null && this
						.getAccount().equals(castOther.getAccount())))
				&& ((this.getActive() == castOther.getActive()) || (this
						.getActive() != null && castOther.getActive() != null && this
						.getActive().equals(castOther.getActive())))
				&& ((this.getFirmname() == castOther.getFirmname()) || (this
						.getFirmname() != null
						&& castOther.getFirmname() != null && this
						.getFirmname().equals(castOther.getFirmname())))
				&& ((this.getLastpay() == castOther.getLastpay()) || (this
						.getLastpay() != null && castOther.getLastpay() != null && this
						.getLastpay().equals(castOther.getLastpay())))
				&& ((this.getMounthcount() == castOther.getMounthcount()) || (this
						.getMounthcount() != null
						&& castOther.getMounthcount() != null && this
						.getMounthcount().equals(castOther.getMounthcount())))
				&& ((this.getPopularity() == castOther.getPopularity()) || (this
						.getPopularity() != null
						&& castOther.getPopularity() != null && this
						.getPopularity().equals(castOther.getPopularity())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getVersion() == null ? 0 : this.getVersion().hashCode());
		result = 37 * result
				+ (getCreatedby() == null ? 0 : this.getCreatedby().hashCode());
		result = 37 * result
				+ (getCreateon() == null ? 0 : this.getCreateon().hashCode());
		result = 37 * result
				+ (getFirm() == null ? 0 : this.getFirm().hashCode());
		result = 37
				* result
				+ (getLastmodifiedby() == null ? 0 : this.getLastmodifiedby()
						.hashCode());
		result = 37 * result
				+ (getModifyon() == null ? 0 : this.getModifyon().hashCode());
		result = 37 * result
				+ (getSerieskey() == null ? 0 : this.getSerieskey().hashCode());
		result = 37 * result
				+ (getLabel() == null ? 0 : this.getLabel().hashCode());
		result = 37 * result
				+ (getAccount() == null ? 0 : this.getAccount().hashCode());
		result = 37 * result
				+ (getActive() == null ? 0 : this.getActive().hashCode());
		result = 37 * result
				+ (getFirmname() == null ? 0 : this.getFirmname().hashCode());
		result = 37 * result
				+ (getLastpay() == null ? 0 : this.getLastpay().hashCode());
		result = 37
				* result
				+ (getMounthcount() == null ? 0 : this.getMounthcount()
						.hashCode());
		result = 37
				* result
				+ (getPopularity() == null ? 0 : this.getPopularity()
						.hashCode());
		return result;
	}

// #SETTER_AND_GETTER
	
// ------------------ Logic part ------------------
	
	public TmFirmsView specialInit() {
	
		
		return this;
	}
	public TmFirmsView init() {
		initList();
		initDicts();
		
		return this;
	}
	
	public TmFirmsView customInitList(List<String> list) {
		
		return this;
	}
	
	public TmFirmsView initList() {

		return this;
	}
	
	public TmFirmsView initDicts() {
		return this;
	}
	
	
}