X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.client.ui.dist%2Fsrc%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Futils%2FArtifactsTableConfigurer.java;h=a3579422261d307e03740829d7d747418a8bc8a5;hb=f59056d0b805cb91f524671a28b8780338509ba4;hp=6505ddee07dec00a2fe33666911ea70ef70317d7;hpb=2db415932b071525adb52c6374e021174512a924;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java index 6505ddee0..a35794222 100644 --- a/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java +++ b/org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/utils/ArtifactsTableConfigurer.java @@ -25,11 +25,11 @@ import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.query.Row; -import org.argeo.ArgeoException; import org.argeo.eclipse.ui.GenericTableComparator; +import org.argeo.slc.SlcException; +import org.argeo.slc.SlcNames; +import org.argeo.slc.SlcTypes; import org.argeo.slc.client.ui.dist.DistConstants; -import org.argeo.slc.jcr.SlcNames; -import org.argeo.slc.jcr.SlcTypes; import org.eclipse.jface.viewers.ColumnLabelProvider; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TableViewerColumn; @@ -110,6 +110,8 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes, return null; SelectionAdapter selectionAdapter = new SelectionAdapter() { + private static final long serialVersionUID = 5239138629878556374L; + @Override public void widgetSelected(SelectionEvent e) { @@ -144,6 +146,8 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes, if (test) { return new ColumnLabelProvider() { + private static final long serialVersionUID = 7996387354459551737L; + public String getText(Object element) { return null; } @@ -154,12 +158,14 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes, }; } else return new ColumnLabelProvider() { + private static final long serialVersionUID = 6746632988975282759L; + public String getText(Object element) { Row row = (Row) element; try { return row.getValue(columnName).getString(); } catch (RepositoryException e) { - throw new ArgeoException("Cannot display row " + row, e); + throw new SlcException("Cannot display row " + row, e); } } @@ -171,6 +177,7 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes, /** Implements comparator for various types of Artifact Table row */ private class CurrentTableComparator extends GenericTableComparator { + private static final long serialVersionUID = -4737460932326339442L; public CurrentTableComparator(int colIndex, int direction) { super(colIndex, direction); @@ -193,13 +200,13 @@ public class ArtifactsTableConfigurer implements SlcNames, SlcTypes, else if (v1.getType() == PropertyType.DATE) rc = v1.getDate().compareTo(v2.getDate()); else - throw new ArgeoException("comparator for object type " + throw new SlcException("comparator for object type " + v1.getType() + " is not yet implemented"); } catch (Exception e) { - throw new ArgeoException("rows cannot be compared ", e); + throw new SlcException("rows cannot be compared ", e); } } else - throw new ArgeoException("Unsupported row type"); + throw new SlcException("Unsupported row type"); // If descending order, flip the direction if (direction == DESCENDING) { rc = -rc;