mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 15:37:56 +01:00
ordering labels on mindmap retreive
This commit is contained in:
parent
a4aa1c5436
commit
632a9a6e00
@ -29,6 +29,7 @@ import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class Mindmap {
|
||||
@ -44,7 +45,7 @@ public class Mindmap {
|
||||
private User lastEditor;
|
||||
|
||||
private Set<Collaboration> collaborations = new HashSet<Collaboration>();
|
||||
private Set<Label> labels = new HashSet<Label>();
|
||||
private Set<Label> labels = new LinkedHashSet<>();
|
||||
|
||||
private User creator;
|
||||
private String tags;
|
||||
|
@ -37,6 +37,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@XmlRootElement(name = "map")
|
||||
@ -97,7 +98,7 @@ public class RestMindmapInfo {
|
||||
mindmap.setTitle(title);
|
||||
}
|
||||
public Set<RestLabel> getLabels() {
|
||||
final Set<RestLabel> result = new HashSet<>();
|
||||
final Set<RestLabel> result = new LinkedHashSet<>();
|
||||
for (Label label : mindmap.getLabels()) {
|
||||
result.add(new RestLabel(label));
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
</set>
|
||||
|
||||
<set name = "labels"
|
||||
table="R_LABEL_MINDMAP">
|
||||
table="R_LABEL_MINDMAP" order-by="label_id">
|
||||
<key column="mindmap_id" not-null="true"/>
|
||||
<many-to-many column="label_id" class="com.wisemapping.model.Label"/>
|
||||
</set>
|
||||
|
Loading…
Reference in New Issue
Block a user