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

cc.protea.foundation.utility.services.GenericResponse Maven / Gradle / Ivy

package cc.protea.foundation.utility.services;

import javax.xml.bind.annotation.XmlTransient;

public class GenericResponse {

	@XmlTransient
	public Integer userId;

	public boolean success;
	public String message;

	public static GenericResponse success() {
		return GenericResponse.success(null);
	}

	public static GenericResponse success(final Integer userId) {
		GenericResponse response = new GenericResponse();
		response.success = true;
		response.userId = userId;
		return response;
	}

	public static GenericResponse failure(final String message) {
		GenericResponse response = new GenericResponse();
		response.success = false;
		response.message = message;
		return response;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy