You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
package de.superx.rest.model; |
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|
|
|
/** |
|
* Model class representing the result of a CSV import operation. |
|
*/ |
|
@JsonIgnoreProperties(ignoreUnknown = true) |
|
public class CsvUploadResult { |
|
|
|
private boolean success; |
|
private String message; |
|
private Long recordsImported; |
|
|
|
public CsvUploadResult() { |
|
} |
|
|
|
public CsvUploadResult(boolean success, String message, Long recordsImported) { |
|
this.success = success; |
|
this.message = message; |
|
this.recordsImported = recordsImported; |
|
} |
|
|
|
public static CsvUploadResult createFromObject(CsvUploadResult source) { |
|
if (source == null) { |
|
return null; |
|
} |
|
return new CsvUploadResult(source.success, source.message, source.recordsImported); |
|
} |
|
|
|
public boolean isSuccess() { |
|
return success; |
|
} |
|
|
|
public void setSuccess(boolean success) { |
|
this.success = success; |
|
} |
|
|
|
public String getMessage() { |
|
return message; |
|
} |
|
|
|
public void setMessage(String message) { |
|
this.message = message; |
|
} |
|
|
|
public Long getRecordsImported() { |
|
return recordsImported; |
|
} |
|
|
|
public void setRecordsImported(Long recordsImported) { |
|
this.recordsImported = recordsImported; |
|
} |
|
}
|
|
|