/*******************************************************************************
 * Copyright 2019 2Fi Business Solutions Ltd.
 *
 *
 *
 * This code is copyrighted. Under no circumstances should any party, people,
 * or organization should redistribute any portions of this code in any form,
 * either verbatim or through electronic media, to any third parties, unless
 * under explicit written permission by 2Fi Business Solutions Ltd.
 ******************************************************************************/
package com.ffii.tbms.example;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.ffii.core.BaseEntity;

@Entity
@Table(name = "example")
public class Example extends BaseEntity<Integer> {

	private static final long serialVersionUID = 6045007748715095923L;

	@Column(columnDefinition = "varchar(50)", nullable = false)
	private String name;

	@Column(columnDefinition = "varchar(255)")
	private String description;

	@Column(columnDefinition = "int", nullable = false)
	private int intValue;

	@Column(columnDefinition = "int")
	private Integer integerValue;

	@Column(columnDefinition = "decimal(12,2)")
	private BigDecimal decimalValue;

	@Column(columnDefinition = "boolean", nullable = false)
	private boolean booleanValue;

	@Column(columnDefinition = "date")
	private Date dateValue;

	@Column(columnDefinition = "datetime")
	private Date datetimeValue;

	// @Transient means it wont be saved to database
	@Transient
	private String transientField;

	/** Default constructor */
	public Example() {

	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getIntValue() {
		return intValue;
	}

	public void setIntValue(int intValue) {
		this.intValue = intValue;
	}

	public Integer getIntegerValue() {
		return integerValue;
	}

	public void setIntegerValue(Integer integerValue) {
		this.integerValue = integerValue;
	}

	public BigDecimal getDecimalValue() {
		return decimalValue;
	}

	public void setDecimalValue(BigDecimal decimalValue) {
		this.decimalValue = decimalValue;
	}

	public boolean isBooleanValue() {
		return booleanValue;
	}

	public void setBooleanValue(boolean booleanValue) {
		this.booleanValue = booleanValue;
	}

	public Date getDateValue() {
		return dateValue;
	}

	public void setDateValue(Date dateValue) {
		this.dateValue = dateValue;
	}

	public Date getDatetimeValue() {
		return datetimeValue;
	}

	public void setDatetimeValue(Date datetimeValue) {
		this.datetimeValue = datetimeValue;
	}

	public String getTransientField() {
		return transientField;
	}

	public void setTransientField(String transientField) {
		this.transientField = transientField;
	}

}
