package @REQUEST_PCK@;

import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

@JsonSerialize
@JsonInclude(value = Include.NON_NULL)
public class BaseRequest<T> implements Serializable {

	private static final long serialVersionUID = -2194408736186342022L;

	@JsonIgnore
	private String requestId;

	@JsonProperty(required = true)
	private T data;

	public BaseRequest() {
		super();
//		String requestId = UserHolder.getCurrentUser().getUserId() + String.valueOf(System.currentTimeMillis());
//		this.setRequestId(requestId);
	}

	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public String getRequestId() {
		return requestId;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

}
