All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.naviit.libs.common.model.response.RepositoryResponse Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
/************************************************************************
 * Copyright 2017 by DTT - All rights reserved.                         *    
 ************************************************************************/
package com.github.naviit.libs.common.model.response;

import java.io.Serializable;

import com.github.naviit.libs.common.util.JsonUtil;

/**
 * Author: Dang Thanh Tung
 * 		Email: [email protected]
 * Created: 13/09/2017
 */
@SuppressWarnings("serial")
public class RepositoryResponse implements Serializable {

	protected int code;
	protected String message;
	protected T data;

	public RepositoryResponse() {}

	public RepositoryResponse(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public RepositoryResponse(int code, String message, T data) {
		this.code = code;
		this.message = message;
		this.data = data;
	}

	public int getCode() { return code; }
	public void setCode(int code) { this.code = code; }

	public String getMessage() { return message; }
	public void setMessage(String message) { this.message = message; }

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

	@Override
	public String toString() {
		return JsonUtil.toJson(this);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy