Separate RecentActivityTableRequest's offset to dmp and dataset offset (backend)
This commit is contained in:
parent
a60151560b
commit
f3c1244600
|
@ -224,7 +224,7 @@ public class DashBoardManager {
|
|||
recentActivityModels.addAll(dmpList
|
||||
.withHint(HintedModelFactory.getHint(RecentDmpModel.class))
|
||||
.orderBy((builder, root) -> builder.desc(root.get(tableRequest.getCriteria().getOrder())))
|
||||
.skip(tableRequest.getOffset())
|
||||
.skip(tableRequest.getDmpOffset())
|
||||
.take(tableRequest.getLength())
|
||||
.select(item -> {
|
||||
return new RecentDmpModel().fromEntity(item);
|
||||
|
@ -233,7 +233,7 @@ public class DashBoardManager {
|
|||
recentActivityModels.addAll(datasetList
|
||||
.withHint(HintedModelFactory.getHint(RecentDatasetModel.class))
|
||||
.orderBy((builder, root) -> builder.desc(root.get(tableRequest.getCriteria().getOrder())))
|
||||
.skip(tableRequest.getOffset())
|
||||
.skip(tableRequest.getDatasetOffset())
|
||||
.take(tableRequest.getLength())
|
||||
.select(item -> {
|
||||
return new RecentDatasetModel().fromEntity(item);
|
||||
|
|
|
@ -4,15 +4,24 @@ import eu.eudat.criteria.RecentActivityCriteria;
|
|||
|
||||
public class RecentActivityTableRequest {
|
||||
private RecentActivityCriteria criteria;
|
||||
private int offset;
|
||||
private int dmpOffset;
|
||||
private int datasetOffset;
|
||||
private int length;
|
||||
|
||||
public int getOffset() {
|
||||
return offset;
|
||||
public int getDmpOffset() {
|
||||
return dmpOffset;
|
||||
}
|
||||
|
||||
public void setOffset(int offset) {
|
||||
this.offset = offset;
|
||||
public void setDmpOffset(int dmpOffset) {
|
||||
this.dmpOffset = dmpOffset;
|
||||
}
|
||||
|
||||
public int getDatasetOffset() {
|
||||
return datasetOffset;
|
||||
}
|
||||
|
||||
public void setDatasetOffset(int datasetOffset) {
|
||||
this.datasetOffset = datasetOffset;
|
||||
}
|
||||
|
||||
public int getLength() {
|
||||
|
|
Loading…
Reference in New Issue