Mercurial > hg > ismi-richfaces
comparison src/main/java/de/mpiwg/itgroup/ismi/utils/templates/DigitalizationTemplate.java @ 184:135b29621a32
Fix bug with digitalizations having no own value.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 27 Jul 2018 14:23:46 +0200 |
parents | 2e911857a759 |
children | 310f512f66af |
comparison
equal
deleted
inserted
replaced
183:ee8a923319ec | 184:135b29621a32 |
---|---|
65 if(!initialized) | 65 if(!initialized) |
66 this.init(); | 66 this.init(); |
67 return titlesInCodex; | 67 return titlesInCodex; |
68 } | 68 } |
69 | 69 |
70 public int compareTo(DigitalizationTemplate o) { | 70 public int compareTo(DigitalizationTemplate o) { |
71 boolean thisnull = (this.entity == null || this.entity.getOwnValue() == null); | |
72 boolean thatnull = (o.entity == null || o.entity.getOwnValue() == null); | |
73 if (thisnull && thatnull) { | |
74 return 0; | |
75 } | |
76 if (thisnull) { | |
77 return -1; | |
78 } | |
79 if (thatnull) { | |
80 return 1; | |
81 } | |
71 return this.entity.getOwnValue().compareTo(o.getEntity().getOwnValue()); | 82 return this.entity.getOwnValue().compareTo(o.getEntity().getOwnValue()); |
72 } | 83 } |
73 } | 84 } |