package jj.tech.paolu.utils;


public class R {
	public Boolean isOk;
	public String  message;
	public Object data;
	public String code;
	
	public R() {
	}
	
	public R(Boolean isOk, String  message, Object data) {
		this.isOk=isOk;
		this.message=message;
		this.data=data;
	} 
	
	public static R SUCCESS(){
		return new R(true,"", null);
	}
	
	public static R SUCCESS(String message){
		return new R(true, message==null ? "" : message, null);
	}
	
	public static R SUCCESS(String message, Object data){
		return new R(true, message==null ? "" : message, data);
	}
	public static R SUCCESS(Object data){
		return new R(true, "" , data);
	}
	
	
	
	public static R FALSE(){
		return new R(false,"", null);
	}
	public static R FALSE(String message){
		return new R(false, message==null ? "" : message, null);
	}
	public static R FALSE(String message, Object data){
		return new R(false, message==null ? "" : message, data);
	}
	public static R FALSE(Object data){
		return new R(true, "" , data);
	}
	
	
	public Boolean getIsOk() {
		return isOk;
	}

	public void setIsOk(Boolean isOk) {
		this.isOk = isOk;
	}

	public String getMessage() {
		return message;
	}

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

	public Object getData() {
		return data;
	}

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