131 lines
2.0 KiB
Java
131 lines
2.0 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)
|
||
|
*
|
||
|
* Oct 21, 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;
|
||
|
|
||
|
/**
|
||
|
* 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
|
||
|
*/
|
||
|
public CommitReport(STATE state, long recordId, String msg) {
|
||
|
super();
|
||
|
this.state = state;
|
||
|
this.recordId = recordId;
|
||
|
this.msg = msg;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 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;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 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;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
/* (non-Javadoc)
|
||
|
* @see java.lang.Object#toString()
|
||
|
*/
|
||
|
@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("]");
|
||
|
return builder.toString();
|
||
|
}
|
||
|
|
||
|
}
|