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

com.droidlogix.dbflare.a2e.JsonResult Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
package com.droidlogix.dbflare.a2e;

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

public class JsonResult
{
	private long total;
	private Object data;
	private long dbExecutionTime;
	private List errors;

	public JsonResult()
	{
		this.total = 0;
		this.data = null;
		this.dbExecutionTime = -1;
		this.errors = new ArrayList<>();
	}

	public JsonResult(long total, Object data, String error)
	{
		this.total = total;
		this.data = data;
		this.dbExecutionTime = -1;
		if(this.errors == null)
		{
			this.errors = new ArrayList<>();
			this.errors.add(error);
		}
	}

	public JsonResult(long total, Object data, List errors)
	{
		this.total = total;
		this.data = data;
		this.dbExecutionTime = -1;
		if(errors != null)
		{
			this.errors = errors;
		}
		else
		{
			this.errors = new ArrayList<>();
		}
	}

	public long getTotal()
	{
		return total;
	}

	public void setTotal(long total)
	{
		this.total = total;
	}

	public Object getData()
	{
		return data;
	}

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

	public long getDbExecutionTime()
	{
		return dbExecutionTime;
	}

	public void setDbExecutionTime(long dbExecutionTime)
	{
		this.dbExecutionTime = dbExecutionTime;
	}

	public List getErrors()
	{
		return errors;
	}

	public void setErrors(List errors)
	{
		this.errors = errors;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy