Refactory: plugin core plugin.xml and MANIFEST.MF
[phpeclipse.git] / net.sourceforge.phpeclipse.wizards / src / net / sourceforge / phpeclipse / wizards / actions / metadata / Row.java
1 package net.sourceforge.phpeclipse.wizards.actions.metadata;
2
3 import java.util.Iterator;
4 import java.util.List;
5
6 import com.quantum.sql.SQLResultSetResults;
7
8 public class Row {
9         private final List elements;
10
11         public Row(List elements) {
12                 this.elements = elements;
13         }
14         
15         public Object get(int columnNumber) {
16                 return (columnNumber > this.elements.size() || columnNumber <= 0) 
17                                 ? null 
18                                 : this.elements.get(columnNumber - 1);
19         }
20         
21         public String[] getAsStringArray() {
22                 String[] resultArray = new String[this.elements.size()];
23                 int i = 0;
24                 for (Iterator iter = this.elements.iterator(); iter.hasNext() ; ) {
25                         String element = iter.next().toString();
26                         resultArray[i] = element;
27                         i++;
28                 }
29                 return resultArray;
30         }
31         
32 //      public SQLResultSetResults getResultSet() {
33 //              return SQLResultSetResults.this;
34 //      }
35 }