ProductEntry.java 1.56 KB
package fi.codecrew.moya.verkkomaksutfi;

import java.math.BigDecimal;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import fi.codecrew.moya.beanutil.DecimalXMLAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
public class ProductEntry {

	private String title;
	private String code;
	@XmlJavaTypeAdapter(DecimalXMLAdapter.class)
	private BigDecimal amount = BigDecimal.ONE;
	@XmlJavaTypeAdapter(DecimalXMLAdapter.class)
	private BigDecimal price = BigDecimal.ZERO;
	private Integer vat = 23;
	@XmlJavaTypeAdapter(DecimalXMLAdapter.class)
	private BigDecimal discount = BigDecimal.ZERO;
	private Integer type = 1;

	public ProductEntry(String t) {
		title = t;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Integer getVat() {
		return vat;
	}

	public void setVat(Integer vat) {
		this.vat = vat;
	}

	public BigDecimal getDiscount() {
		return discount;
	}

	public void setDiscount(BigDecimal discount) {
		this.discount = discount;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

}