package com.enactor.training.paymentService.service.messages.gcash;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;

import com.enactor.core.application.process.ApplicationProcessDataType;
import com.enactor.core.application.process.IApplicationProcessDataType;
import com.enactor.core.entities.PropertyValidationException;
import com.enactor.core.jaxb.WrappedArrayListAdapter;
import com.enactor.core.utilities.Logger;	

/**
 * Add comments for the TimeDetail entity implementation here
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TimeDetail", namespace=com.enactor.training.PackageInfo.NSURI_TRAINING, propOrder = {
	"confirmedTimes",
	"createdTime",
	"expiryTime",
	"paidTimes"
})

@XmlRootElement(name = TimeDetail.ENTITY_NAME, namespace=com.enactor.training.PackageInfo.NSURI_TRAINING)
public class TimeDetail implements ITimeDetail {

	/** My logger instance */
	@SuppressWarnings("unused")
	private static final Logger logger = Logger.getLogger(TimeDetail.class);
	
	/** serialVersionUID */
	private static final long serialVersionUID = 1L;
	
	/** Entity name. */
	public static final String ENTITY_NAME = "timeDetail";
	
	/** Entity QName */
	public static final QName ENTITY_QNAME = new QName(com.enactor.training.PackageInfo.NSURI_TRAINING, ENTITY_NAME, com.enactor.training.PackageInfo.PREFIX_TRAINING);

	/** Entity application data type name */
	public static final String ENTITY_DATA_TYPE_NAME = "enactor.gcash.messages.TimeDetail";
	
	/** Entity application data type */
	public static final IApplicationProcessDataType ENTITY_DATA_TYPE = new ApplicationProcessDataType(ENTITY_DATA_TYPE_NAME, ITimeDetail.class.getName());	
		
	/** The ConfirmedTimes field */
	@XmlJavaTypeAdapter(value = WrappedArrayListAdapter.class)
	private List<Date> confirmedTimes = new ArrayList<Date>();
	
	/** The CreatedTime field */
	private Date createdTime = null;
	
	/** The ExpiryTime field */
	private Date expiryTime = null;
	
	/** The PaidTimes field */
	@XmlJavaTypeAdapter(value = WrappedArrayListAdapter.class)
	private List<Date> paidTimes = new ArrayList<Date>();

	/**************************************************************************
	 * TimeDetail Interface
	 **************************************************************************/
	
	@Override
	public void setConfirmedTimes(List<Date> confirmedTimes) throws PropertyValidationException {
		this.confirmedTimes = confirmedTimes;
	}
	
	@Override
	public List<Date> getConfirmedTimes() {
		return confirmedTimes;
	}
	
	@Override
	public void setCreatedTime(Date createdTime) throws PropertyValidationException {
		this.createdTime = createdTime;
	}
	
	@Override
	public Date getCreatedTime() {
		return createdTime;
	}
	
	@Override
	public void setExpiryTime(Date expiryTime) throws PropertyValidationException {
		this.expiryTime = expiryTime;
	}
	
	@Override
	public Date getExpiryTime() {
		return expiryTime;
	}
	
	@Override
	public void setPaidTimes(List<Date> paidTimes) throws PropertyValidationException {
		this.paidTimes = paidTimes;
	}
	
	@Override
	public List<Date> getPaidTimes() {
		return paidTimes;
	}
	
	@Override
	public QName getEntityQName() {
		return ENTITY_QNAME;
	}

}
