190 lines
3.7 KiB
Java
190 lines
3.7 KiB
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.portlets.user.geoportaldataentry.shared;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.List;
|
|
|
|
import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
|
|
|
|
|
/**
|
|
* The Class ResultSetPaginatedData.
|
|
*
|
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
|
*
|
|
* Aug 6, 2021
|
|
*/
|
|
public class ResultSetPaginatedData implements Serializable {
|
|
|
|
/**
|
|
*
|
|
*/
|
|
private static final long serialVersionUID = 6800997954077785719L;
|
|
private List<ConcessioneDV> data;
|
|
private int clientStartIndex = 0;
|
|
private int limit;
|
|
private int serverEndIndex = 0;
|
|
private boolean isServerSearchFinished = false;
|
|
private long totalItems;
|
|
|
|
/**
|
|
* Instantiates a new searched folder.
|
|
*/
|
|
public ResultSetPaginatedData() {
|
|
}
|
|
|
|
|
|
/**
|
|
* Instantiates a new result set paginated data.
|
|
*
|
|
* @param clientStartIndex the client start index
|
|
* @param limit the limit
|
|
* @param serverEndIndex the server end index
|
|
* @param isServerSearchFinished the is server search finished
|
|
*/
|
|
public ResultSetPaginatedData(int clientStartIndex, int limit, int serverEndIndex, boolean isServerSearchFinished) {
|
|
|
|
this.clientStartIndex = clientStartIndex;
|
|
this.limit = limit;
|
|
this.serverEndIndex = serverEndIndex;
|
|
this.isServerSearchFinished = isServerSearchFinished;
|
|
}
|
|
|
|
/**
|
|
* Gets the data.
|
|
*
|
|
* @return the data
|
|
*/
|
|
public List<ConcessioneDV> getData() {
|
|
return data;
|
|
}
|
|
|
|
/**
|
|
* Gets the client start index.
|
|
*
|
|
* @return the client start index
|
|
*/
|
|
public int getClientStartIndex() {
|
|
return clientStartIndex;
|
|
}
|
|
|
|
/**
|
|
* Gets the limit.
|
|
*
|
|
* @return the limit
|
|
*/
|
|
public int getLimit() {
|
|
return limit;
|
|
}
|
|
|
|
/**
|
|
* Gets the server end index.
|
|
*
|
|
* @return the server end index
|
|
*/
|
|
public int getServerEndIndex() {
|
|
return serverEndIndex;
|
|
}
|
|
|
|
/**
|
|
* Checks if is server search finished.
|
|
*
|
|
* @return true, if is server search finished
|
|
*/
|
|
public boolean isServerSearchFinished() {
|
|
return isServerSearchFinished;
|
|
}
|
|
|
|
/**
|
|
* Sets the data.
|
|
*
|
|
* @param data the new data
|
|
*/
|
|
public void setData(List<ConcessioneDV> data) {
|
|
this.data = data;
|
|
}
|
|
|
|
/**
|
|
* Sets the client start index.
|
|
*
|
|
* @param clientStartIndex the new client start index
|
|
*/
|
|
public void setClientStartIndex(int clientStartIndex) {
|
|
this.clientStartIndex = clientStartIndex;
|
|
}
|
|
|
|
/**
|
|
* Sets the limit.
|
|
*
|
|
* @param limit the new limit
|
|
*/
|
|
public void setLimit(int limit) {
|
|
this.limit = limit;
|
|
}
|
|
|
|
/**
|
|
* Sets the server end index.
|
|
*
|
|
* @param serverEndIndex the new server end index
|
|
*/
|
|
public void setServerEndIndex(int serverEndIndex) {
|
|
this.serverEndIndex = serverEndIndex;
|
|
}
|
|
|
|
/**
|
|
* Sets the server search finished.
|
|
*
|
|
* @param isServerSearchFinished the new server search finished
|
|
*/
|
|
public void setServerSearchFinished(boolean isServerSearchFinished) {
|
|
this.isServerSearchFinished = isServerSearchFinished;
|
|
}
|
|
|
|
/**
|
|
* Gets the total items.
|
|
*
|
|
* @return the total items
|
|
*/
|
|
public long getTotalItems() {
|
|
return totalItems;
|
|
}
|
|
|
|
/**
|
|
* Sets the total items.
|
|
*
|
|
* @param totalItems the new total items
|
|
*/
|
|
public void setTotalItems(long totalItems) {
|
|
this.totalItems = totalItems;
|
|
}
|
|
|
|
/**
|
|
* To string.
|
|
*
|
|
* @return the string
|
|
*/
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder builder = new StringBuilder();
|
|
builder.append("ResultSetPaginatedData [data=");
|
|
builder.append(data);
|
|
builder.append(", clientStartIndex=");
|
|
builder.append(clientStartIndex);
|
|
builder.append(", limit=");
|
|
builder.append(limit);
|
|
builder.append(", serverEndIndex=");
|
|
builder.append(serverEndIndex);
|
|
builder.append(", isServerSearchFinished=");
|
|
builder.append(isServerSearchFinished);
|
|
builder.append(", totalItems=");
|
|
builder.append(totalItems);
|
|
builder.append("]");
|
|
return builder.toString();
|
|
}
|
|
|
|
|
|
|
|
}
|