mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
Implemented a mechanism to sort statistics and dimensions
This commit is contained in:
1 parent
3550fd168f
commit
8bba0008aa
22 files changed
+116
-50
No files matched your search
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -1,7 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
@@ -4,7 +4,7 @@ Bundle-Name: Shared
|
||||
Bundle-SymbolicName: com.sap.sse.datamining.shared
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: SAP
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Export-Package: com.sap.sse.datamining.shared,
|
||||
com.sap.sse.datamining.shared.annotations,
|
||||
com.sap.sse.datamining.shared.components,
|
||||
|
||||
+2
@@ -17,5 +17,7 @@ import java.lang.annotation.Target;
|
||||
public @interface Connector {
|
||||
|
||||
public String messageKey() default "";
|
||||
|
||||
public int ordinal() default Integer.MAX_VALUE;
|
||||
|
||||
}
|
||||
+2
@@ -29,5 +29,7 @@ import java.lang.annotation.Target;
|
||||
public @interface Dimension {
|
||||
|
||||
public String messageKey();
|
||||
|
||||
public int ordinal() default Integer.MAX_VALUE;
|
||||
|
||||
}
|
||||
+2
@@ -18,5 +18,7 @@ public @interface Statistic {
|
||||
public Unit resultUnit() default Unit.None;
|
||||
|
||||
public int resultDecimals() default 0;
|
||||
|
||||
public int ordinal() default Integer.MAX_VALUE;
|
||||
|
||||
}
|
||||
+3
-1
@@ -3,7 +3,7 @@ package com.sap.sse.datamining.shared.dto;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public interface FunctionDTO extends Serializable {
|
||||
public interface FunctionDTO extends Serializable, Comparable<FunctionDTO> {
|
||||
|
||||
public boolean isDimension();
|
||||
|
||||
@@ -14,5 +14,7 @@ public interface FunctionDTO extends Serializable {
|
||||
public String getReturnTypeName();
|
||||
|
||||
public String getSourceTypeName();
|
||||
|
||||
public int getOrdinal();
|
||||
|
||||
}
|
||||
+14
-1
@@ -15,6 +15,7 @@ public class FunctionDTOImpl implements FunctionDTO {
|
||||
|
||||
private String displayName;
|
||||
private boolean isDimension;
|
||||
private int ordinal;
|
||||
|
||||
/**
|
||||
* Constructor for the GWT-Serialization. Don't use this!
|
||||
@@ -23,7 +24,8 @@ public class FunctionDTOImpl implements FunctionDTO {
|
||||
FunctionDTOImpl() {
|
||||
}
|
||||
|
||||
public FunctionDTOImpl(String functionName, String sourceTypeName, String returnTypeName, List<String> parameterTypeNames, String displayName, boolean isDimension) {
|
||||
public FunctionDTOImpl(String functionName, String sourceTypeName, String returnTypeName, List<String> parameterTypeNames,
|
||||
String displayName, boolean isDimension, int ordinal) {
|
||||
this.functionName = functionName;
|
||||
this.sourceTypeName = sourceTypeName;
|
||||
this.returnTypeName = returnTypeName;
|
||||
@@ -31,6 +33,7 @@ public class FunctionDTOImpl implements FunctionDTO {
|
||||
|
||||
this.displayName = displayName;
|
||||
this.isDimension = isDimension;
|
||||
this.ordinal = ordinal;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,6 +61,16 @@ public class FunctionDTOImpl implements FunctionDTO {
|
||||
return isDimension;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrdinal() {
|
||||
return ordinal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(FunctionDTO f) {
|
||||
return Integer.compare(this.getOrdinal(), f.getOrdinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (isDimension() ? "Dimension " : "Function ") + sourceTypeName + "." + functionName + "(" + parametersAsString() + ") : " + returnTypeName;
|
||||
|
||||
Reference in new issue
Block a user