package common.db.dao.hibernate;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * FooMaster generated by hbm2java
 */
@Entity
@Table(name = "foo_master")
public class FooMaster implements java.io.Serializable {

	/** serialVersionUID */
	private static final long serialVersionUID = -7011922344251626152L;

	/** id */
	private Long id;
	/** fooId */
	private String fooId;
	/** hooId */
	private String hooId;
	/** torokuDateTime */
	private Date torokuDateTime;
	/** fooName */
	private String fooName;
	/** fooAddress */
	private String fooAddress;
	/** fooPhone */
	private String fooPhone;
	/** version */
	private int version;
	/** createUserId */
	private String createUserId;
	/** createDateTime */
	private Date createDateTime;
	/** updateUserId */
	private String updateUserId;
	/** updateDateTime */
	private Date updateDateTime;

	/**
	 * @return Id
	 */
	@SequenceGenerator(name = "generator", sequenceName = "master")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	/**
	 * @param val Id
	 */
	public void setId(final Long val) {
		this.id = val;
	}

	/**
	 * @return FooId
	 */
	@Column(name = "foo_id", nullable = false, length = 32)
	public String getFooId() {
		return this.fooId;
	}

	/**
	 * @param val FooId
	 */
	public void setFooId(final String val) {
		this.fooId = val;
	}

	/**
	 * @return HooId
	 */
	@Column(name = "hoo_id", nullable = false, length = 64)
	public String getHooId() {
		return this.hooId;
	}

	/**
	 * @param val HooId
	 */
	public void setHooId(final String val) {
		this.hooId = val;
	}

	/**
	 * @return TorokuDateTime
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "toroku_date_time", nullable = false, length = 29)
	public Date getTorokuDateTime() {
		return this.torokuDateTime == null ? null : new Timestamp(this.torokuDateTime.getTime());
	}

	/**
	 * @param val TorokuDateTime
	 */
	public void setTorokuDateTime(final Date val) {
		this.torokuDateTime = val == null ? null : new Timestamp(val.getTime());
	}

	/**
	 * @return FooName
	 */
	@Column(name = "foo_name", nullable = false, length = 128)
	public String getFooName() {
		return this.fooName;
	}

	/**
	 * @param val FooName
	 */
	public void setFooName(final String val) {
		this.fooName = val;
	}

	/**
	 * @return FooAddress
	 */
	@Column(name = "foo_address", length = 256)
	public String getFooAddress() {
		return this.fooAddress;
	}

	/**
	 * @param val FooAddress
	 */
	public void setFooAddress(final String val) {
		this.fooAddress = val;
	}

	/**
	 * @return FooPhone
	 */
	@Column(name = "foo_phone", length = 128)
	public String getFooPhone() {
		return this.fooPhone;
	}

	/**
	 * @param val FooPhone
	 */
	public void setFooPhone(final String val) {
		this.fooPhone = val;
	}

	/**
	 * @return Version
	 */
	@Column(name = "version", nullable = false)
	public int getVersion() {
		return this.version;
	}

	/**
	 * @param val Version
	 */
	public void setVersion(final int val) {
		this.version = val;
	}

	/**
	 * @return CreateUserId
	 */
	@Column(name = "create_user_id", nullable = false, length = 32)
	public String getCreateUserId() {
		return this.createUserId;
	}

	/**
	 * @param val CreateUserId
	 */
	public void setCreateUserId(final String val) {
		this.createUserId = val;
	}

	/**
	 * @return CreateDateTime
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_date_time", nullable = false, length = 29)
	public Date getCreateDateTime() {
		return this.createDateTime == null ? null : new Timestamp(this.createDateTime.getTime());
	}

	/**
	 * @param val CreateDateTime
	 */
	public void setCreateDateTime(final Date val) {
		this.createDateTime = val == null ? null : new Timestamp(val.getTime());
	}

	/**
	 * @return UpdateUserId
	 */
	@Column(name = "update_user_id", nullable = false, length = 32)
	public String getUpdateUserId() {
		return this.updateUserId;
	}

	/**
	 * @param val UpdateUserId
	 */
	public void setUpdateUserId(final String val) {
		this.updateUserId = val;
	}

	/**
	 * @return UpdateDateTime
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_date_time", nullable = false, length = 29)
	public Date getUpdateDateTime() {
		return this.updateDateTime == null ? null : new Timestamp(this.updateDateTime.getTime());
	}

	/**
	 * @param val UpdateDateTime
	 */
	public void setUpdateDateTime(final Date val) {
		this.updateDateTime = val == null ? null : new Timestamp(val.getTime());
	}

}
