org.zodiac.actuate.application.maintenance.AppMaintenanceResult Maven / Gradle / Ivy
The newest version!
package org.zodiac.actuate.application.maintenance;
import org.zodiac.commons.model.Result;
public class AppMaintenanceResult extends Result {
private static final long serialVersionUID = -1592002457824889090L;
protected AppMaintenanceResult(boolean success, T data, String message) {
super(success, data, message);
}
protected AppMaintenanceResult(boolean success, String message) {
super(success, message);
}
protected AppMaintenanceResult(boolean success, T data) {
super(success, data);
}
protected AppMaintenanceResult(boolean success) {
super(success);
}
@Override
public String toString() {
return "AppMaintenanceResult [getStatusCode()=" + getStatusCode() + ", isSuccess()=" + isSuccess()
+ ", getData()=" + getData() + ", getMsg()=" + getMsg() + "]";
}
public static AppMaintenanceResult successOf(T data, String message) {
return new AppMaintenanceResult(true, data, message);
}
public static AppMaintenanceResult successOfMessage(String message) {
return new AppMaintenanceResult(true, message);
}
public static AppMaintenanceResult successOfData(T data) {
return new AppMaintenanceResult(true, data);
}
public static AppMaintenanceResult failOf(T data, String message) {
return new AppMaintenanceResult(false, data, message);
}
public static AppMaintenanceResult failOfMessage(String message) {
return new AppMaintenanceResult(false, message);
}
public static AppMaintenanceResult failOfData(T data) {
return new AppMaintenanceResult(false, data);
}
}