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

com.github.stupdit1t.excel.common.PoiResult Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
package com.github.stupdit1t.excel.common;

import java.util.Collections;
import java.util.List;

/**
 * excel 导入返回的实体类
 *
 * @param 
 * @author 625
 */
public class PoiResult {

    private boolean success = true;

    private List message = Collections.emptyList();

    private List data;

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public List getMessage() {
        return message;
    }

    public String getMessageToString() {
        return String.join("\n", message);
    }

    public void setMessage(List message) {
        this.message = message;
    }

    public List getData() {
        return data;
    }

    public void setData(List beans) {
        this.data = beans;
    }

    public static  PoiResult fail() {
        PoiResult poiResult = new PoiResult<>();
        poiResult.setSuccess(false);
        poiResult.setMessage(Collections.singletonList("读取Excel失败"));
        poiResult.setData(Collections.emptyList());
        return poiResult;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy