package com.goafanti.demand.bo;

import java.util.Date;

import org.apache.commons.lang3.time.DateFormatUtils;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.goafanti.common.constant.AFTConstants;

/**
 * 需求成果匹配LISTBO
 */
public class DemandAchievementListBo {

	private String	id;

	private Integer	serialNumber;

	private Integer	dataCategory;

	private String	name;

	private String	keyword;

	private Integer	demandType;

	private Date	releaseDate;

	private Date	validityPeriod;

	private String	unitName;

	private String	username;

	private String	uid;

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getId() {
		return id;
	}

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

	public Integer getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(Integer serialNumber) {
		this.serialNumber = serialNumber;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getDataCategory() {
		return dataCategory;
	}

	public void setDataCategory(Integer dataCategory) {
		this.dataCategory = dataCategory;
	}

	public String getName() {
		return name;
	}

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

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getDemandType() {
		return demandType;
	}

	public void setDemandType(Integer demandType) {
		this.demandType = demandType;
	}

	public Date getReleaseDate() {
		return releaseDate;
	}

	public void setReleaseDate(Date releaseDate) {
		this.releaseDate = releaseDate;
	}

	public Date getValidityPeriod() {
		return validityPeriod;
	}

	public void setValidityPeriod(Date validityPeriod) {
		this.validityPeriod = validityPeriod;
	}

	public String getUnitName() {
		return unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getValidityPeriodFormattedDate() {
		if (this.validityPeriod == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getValidityPeriod(), AFTConstants.YYYYMMDD);
		}
	}

	public void setValidityPeriodFormattedDate(String validityPeriodFormattedDate) {

	}

	public String getReleaseDateFormattedDate() {
		if (this.releaseDate == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getReleaseDate(), AFTConstants.YYYYMMDD);
		}
	}

	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {

	}

}
