package gov.va.med.esr.mvc.model;


import java.util.Date;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public abstract class AbstractServiceDataWrapperImpl extends AbstractData
	implements ServiceDataWrapper {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1158145410490419846L;
	private Date invocationDate = new Date();
	private String noDataMessage;
	
	public Date getInvocationDate() {
		return invocationDate;
	}
	
	public void activateNoDataMessage(Object[] args) {
		StringBuilder bld = new StringBuilder("No data matching input arguments");
		if(args != null) {
			bld.append(" : ");
			for(int i=0; i<args.length; i++) {
				bld.append(args[i]);
				if(i < args.length - 1)
					bld.append(", ");
			}
		}
		noDataMessage = bld.toString();
	}

	public String getNoDataMessage() {
		return noDataMessage;
	}

	public void setNoDataMessage(String noDataMessage) {
		this.noDataMessage = noDataMessage;
	}

	public void setInvocationDate(Date invocationDate) {
		this.invocationDate = invocationDate;
	}
}
