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

com.uulookingfor.ics.domain.IcsResult Maven / Gradle / Ivy

package com.uulookingfor.ics.domain;

import java.io.Serializable;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;


/**
 * @author suxiong.sx 
 */
@ToString
public class IcsResult implements Serializable{
	
	private static final long serialVersionUID = 1L;

	@Getter @Setter private boolean success = false;
	
	@Getter @Setter private T model;
	
	@Getter @Setter private String errCode;
	
	@Getter @Setter private String errMsg;
	
	public IcsResult fail(String errCode, String errMsg){
		
		this.success = false;
		this.errCode = errCode;
		this.errMsg = errMsg;
		
		return this;
	}
	
	public IcsResult success(T model){
		
		this.success = true;
		this.model = model;
		
		return this;
	}
	
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy