geoportal-data-entry-app/src/main/java/org/gcube/portlets/user/geoportaldataentry/shared/CommitReport.java

153 lines
2.4 KiB
Java

package org.gcube.portlets.user.geoportaldataentry.shared;
import java.io.Serializable;
/**
* The Class CommitReport.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Nov 30, 2020
*/
public class CommitReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = -9519707669761939L;
/**
* The Enum STATE.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Oct 21, 2020
*/
public enum STATE {
ERROR, WARN, OK, UNKNOWN
}
public STATE state = STATE.UNKNOWN;
public Long recordId;
public String msg;
public String report;
/**
* Instantiates a new commit report.
*/
public CommitReport() {
}
/**
* Instantiates a new commit report.
*
* @param state the state
* @param recordId the record id
* @param msg the msg
* @param report the report
*/
public CommitReport(STATE state, long recordId, String msg, String report) {
super();
this.state = state;
this.recordId = recordId;
this.msg = msg;
this.report = report;
}
/**
* Gets the state.
*
* @return the state
*/
public STATE getState() {
return state;
}
/**
* Sets the state.
*
* @param state the new state
*/
public void setState(STATE state) {
this.state = state;
}
/**
* Gets the record id.
*
* @return the record id
*/
public Long getRecordId() {
return recordId;
}
/**
* Gets the report.
*
* @return the report
*/
public String getReport() {
return report;
}
/**
* Sets the report.
*
* @param report the new report
*/
public void setReport(String report) {
this.report = report;
}
/**
* Sets the record id.
*
* @param recordId the new record id
*/
public void setRecordId(long recordId) {
this.recordId = recordId;
}
/**
* Gets the msg.
*
* @return the msg
*/
public String getMsg() {
return msg;
}
/**
* Sets the msg.
*
* @param msg the new msg
*/
public void setMsg(String msg) {
this.msg = msg;
}
/**
* To string.
*
* @return the string
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("CommitReport [state=");
builder.append(state);
builder.append(", recordId=");
builder.append(recordId);
builder.append(", msg=");
builder.append(msg);
builder.append(", report=");
builder.append(report);
builder.append("]");
return builder.toString();
}
}