Minor Updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@92321 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
69e6254088
commit
c3ae48eecf
|
@ -30,6 +30,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.column.LabelColumnSession
|
|||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.type.ChangeColumnTypeMonitor;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.type.ChangeColumnTypeSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.open.TDOpenSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.Direction;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.ChangeTableTypeMonitor;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.ChangeTableTypeSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Agencies;
|
||||
|
@ -835,9 +836,9 @@ public class SessionUtil {
|
|||
httpSession.setAttribute(CODELISTS_PAGING_LOADED, listCodelists);
|
||||
}
|
||||
|
||||
public static String getCodelistsPagingLoadedDirection(
|
||||
public static Direction getCodelistsPagingLoadedDirection(
|
||||
HttpSession httpSession) {
|
||||
String direction = (String) httpSession
|
||||
Direction direction = (Direction) httpSession
|
||||
.getAttribute(CODELISTS_PAGING_LOADED_DIRECTION);
|
||||
if (direction == null) {
|
||||
logger.error("CODELISTS_PAGING_LOADED_DIRECTION was not acquired");
|
||||
|
@ -846,9 +847,9 @@ public class SessionUtil {
|
|||
}
|
||||
|
||||
public static void setCodelistsPagingLoadedDirection(
|
||||
HttpSession httpSession, String direction) {
|
||||
HttpSession httpSession, Direction direction) {
|
||||
|
||||
String dir = ((String) httpSession
|
||||
Direction dir = ((Direction) httpSession
|
||||
.getAttribute(CODELISTS_PAGING_LOADED_DIRECTION));
|
||||
if (dir != null)
|
||||
httpSession.removeAttribute(CODELISTS_PAGING_LOADED_DIRECTION);
|
||||
|
|
|
@ -112,6 +112,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRRightsMetadata
|
|||
import org.gcube.portlets.user.td.gwtservice.shared.tr.open.TDOpenSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.CodelistPagingLoadConfig;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.CodelistPagingLoadResult;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.Direction;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.ChangeTableTypeMonitor;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.ChangeTableTypeSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabDescriptionsMetadata;
|
||||
|
@ -757,7 +758,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
ArrayList<TabResource> ltr = SessionUtil
|
||||
.getCodelistsPagingLoaded(session);
|
||||
String direction = SessionUtil
|
||||
Direction direction = SessionUtil
|
||||
.getCodelistsPagingLoadedDirection(session);
|
||||
String filter = SessionUtil.getCodelistsPagingLoadedFilter(session);
|
||||
|
||||
|
@ -795,7 +796,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
}
|
||||
|
||||
if (direction.compareTo(plc.getDirection()) != 0) {
|
||||
if (direction!=plc.getDirection()) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.paging;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -17,9 +14,19 @@ public class CodelistPagingLoadConfig implements Serializable {
|
|||
|
||||
protected int offset;
|
||||
protected int limit;
|
||||
protected String direction;
|
||||
protected Direction direction;
|
||||
protected String filter;
|
||||
|
||||
|
||||
public CodelistPagingLoadConfig(){}
|
||||
|
||||
public CodelistPagingLoadConfig(int offset, int limit, Direction direction, String filter){
|
||||
this.offset=offset;
|
||||
this.limit=limit;
|
||||
this.direction=direction;
|
||||
this.filter=filter;
|
||||
}
|
||||
|
||||
|
||||
public int getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
@ -36,11 +43,11 @@ public class CodelistPagingLoadConfig implements Serializable {
|
|||
this.limit = limit;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
public Direction getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(String direction) {
|
||||
public void setDirection(Direction direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ public class CodelistPagingLoadResult implements Serializable {
|
|||
protected int limit;
|
||||
protected int totalLenght;
|
||||
protected ArrayList<TabResource> ltr;
|
||||
protected String direction;
|
||||
protected Direction direction;
|
||||
protected String filter;
|
||||
|
||||
public int getOffset() {
|
||||
|
@ -54,11 +54,11 @@ public class CodelistPagingLoadResult implements Serializable {
|
|||
this.ltr = ltr;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
public Direction getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(String direction) {
|
||||
public void setDirection(Direction direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.paging;
|
||||
|
||||
public enum Direction {
|
||||
asc,
|
||||
desc;
|
||||
}
|
Loading…
Reference in New Issue