resultsetcol
This commit is contained in:
snoop 2017-04-25 18:42:06 +09:00
parent 6eda977943
commit e781e680d1

View File

@ -27,11 +27,14 @@ public class OFResultSetCol extends OFResultSet{
this.meta.put(meta.get(indexI), indexI); this.meta.put(meta.get(indexI), indexI);
} }
for( int indexI = 0 ; indexI < arrayColumns.size(); ++indexI) { if( arrayColumns != null) {
this.meta.put(arrayColumns.get(indexI), indexI+ meta.size()); for( int indexI = 0 ; indexI < arrayColumns.size(); ++indexI) {
this.meta.put(arrayColumns.get(indexI), indexI+ meta.size());
}
} }
} }
public Map<String, String> parse() { public Map<String, String> parse() {
@ -57,13 +60,16 @@ public class OFResultSetCol extends OFResultSet{
arrayValue.clear(); arrayValue.clear();
for(int indexL =0; indexL < arrayColumns.size(); ++indexL) { if(arrayColumns != null ) {
columnIdx = this.meta.get(arrayColumns.get(indexL)); for(int indexL =0; indexL < arrayColumns.size(); ++indexL) {
columnIdx = this.meta.get(arrayColumns.get(indexL));
arrayValue.add(row.get(columnIdx)); arrayValue.add(row.get(columnIdx));
}
} }
for(int indexK = 0 ; indexK < metrics.size(); ++indexK) { for(int indexK = 0 ; indexK < metrics.size(); ++indexK) {
metric = metrics.get(indexK); metric = metrics.get(indexK);
@ -83,6 +89,10 @@ public class OFResultSetCol extends OFResultSet{
private String convertMetric(String metric, List<String> arrayValue) { private String convertMetric(String metric, List<String> arrayValue) {
if(arrayValue == null || arrayValue.size() <= 0) {
return metric;
}
String convertChar = "$"; String convertChar = "$";
String convertStr = null; String convertStr = null;