Mercurial > dive4elements > gnv-client
comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResultDescriptor.java @ 884:12f88239fb33
Updated Javadocs to the Listed Classes.
Also done some Codecleanup and removed unused Methods from the Code.
geo-backend/trunk@842 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 26 Mar 2010 15:23:03 +0000 |
parents | 5b536542ef56 |
children | 1c3efbd2fc5a |
comparison
equal
deleted
inserted
replaced
883:6d568397740c | 884:12f88239fb33 |
---|---|
18 | 18 |
19 /** | 19 /** |
20 *The Uid of this Class | 20 *The Uid of this Class |
21 */ | 21 */ |
22 private static final long serialVersionUID = 7016889733270716130L; | 22 private static final long serialVersionUID = 7016889733270716130L; |
23 | |
24 /** | 23 /** |
25 * The Names of the Columns of one Result | 24 * The Names of the Columns of one Result |
26 */ | 25 */ |
27 private List<String> columnNames = new ArrayList<String>(); | 26 private List<String> columnNames = new ArrayList<String>(); |
28 | |
29 /** | 27 /** |
30 * The Name of the Classes of the Values of one Result. | 28 * The Name of the Classes of the Values of one Result. |
31 */ | 29 */ |
32 private List<String> columnClassNames = new ArrayList<String>(); | 30 private List<String> columnClassNames = new ArrayList<String>(); |
33 | |
34 /** | 31 /** |
35 * | 32 * The Lookup for the Columnindex of the Columnnames |
36 */ | 33 */ |
37 private Map<String, Integer> columnIndexLookup = new HashMap<String, Integer>(); | 34 private Map<String, Integer> columnIndexLookup = new HashMap<String, Integer>(); |
38 | 35 |
39 /** | 36 /** |
40 * Constructor | 37 * Constructor |
78 */ | 75 */ |
79 public int [] getColumnIndices(String [] columnNames) { | 76 public int [] getColumnIndices(String [] columnNames) { |
80 if (columnNames == null) { | 77 if (columnNames == null) { |
81 return null; | 78 return null; |
82 } | 79 } |
83 | |
84 int [] indices = new int[columnNames.length]; | 80 int [] indices = new int[columnNames.length]; |
85 | |
86 for (int i = 0; i < indices.length; ++i) { | 81 for (int i = 0; i < indices.length; ++i) { |
87 indices[i] = this.getColumnIndex(columnNames[i]); | 82 indices[i] = this.getColumnIndex(columnNames[i]); |
88 } | 83 } |
89 | |
90 return indices; | 84 return indices; |
91 } | 85 } |
92 | 86 |
93 /** | 87 /** |
94 * @see de.intevation.gnv.geobackend.base.ResultDescriptor#getColumnIndex(java.lang.String) | 88 * @see de.intevation.gnv.geobackend.base.ResultDescriptor#getColumnIndex(java.lang.String) |
97 | 91 |
98 Integer value = this.columnIndexLookup.get(columnName); | 92 Integer value = this.columnIndexLookup.get(columnName); |
99 return value != null ? value.intValue() : -1; | 93 return value != null ? value.intValue() : -1; |
100 } | 94 } |
101 | 95 |
96 /** | |
97 * @see java.lang.Object#toString() | |
98 */ | |
99 @Override | |
102 public String toString() { | 100 public String toString() { |
103 StringBuilder sb = new StringBuilder("["); | 101 StringBuilder sb = new StringBuilder("["); |
104 int N = Math.min(columnNames.size(), columnClassNames.size()); | 102 int N = Math.min(columnNames.size(), columnClassNames.size()); |
105 for (int i = 0; i < N; ++i) { | 103 for (int i = 0; i < N; ++i) { |
106 if (i > 0) { | 104 if (i > 0) { |