|
@@ -1,4 +1,47 @@
|
|
|
package com.example.data_structure.common;
|
|
package com.example.data_structure.common;
|
|
|
|
|
|
|
|
public class Response {
|
|
public class Response {
|
|
|
|
|
+
|
|
|
|
|
+ private Object content;
|
|
|
|
|
+ private String message;
|
|
|
|
|
+ private boolean success;
|
|
|
|
|
+
|
|
|
|
|
+ public Response(Object content, String message, boolean success) {
|
|
|
|
|
+ this.content = content;
|
|
|
|
|
+ this.message = message;
|
|
|
|
|
+ this.success = success;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public Response(Object content, boolean success) {
|
|
|
|
|
+ this.content = content;
|
|
|
|
|
+ this.success = success;
|
|
|
|
|
+ this.message=null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public Response(String message, boolean success) {
|
|
|
|
|
+ this.message = message;
|
|
|
|
|
+ this.success = success;
|
|
|
|
|
+ this.content=null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public Response(boolean success) {
|
|
|
|
|
+ this.success = success;
|
|
|
|
|
+ this.message=null;
|
|
|
|
|
+ this.content=null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static Response buildSuccess(){
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static Response buildSuccess(Object content,String message){
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static Response buildSuccess(Object content){
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|