1 package com.knowgate.hipergate.datamodel; 2 3 import java.util.ArrayList ; 4 5 import com.knowgate.dataobjs.DBColumn; 6 7 11 public class ColumnList extends ArrayList { 12 13 public ColumnList() { 14 } 15 16 public DBColumn getColumn(int index) 17 throws ArrayIndexOutOfBoundsException , ClassCastException { 18 return (DBColumn) get(index); 19 } 20 21 public String getColumnName(int index) 22 throws ArrayIndexOutOfBoundsException , ClassCastException , NullPointerException { 23 return ((DBColumn) get(index)).getName(); 24 } 25 26 public String toString(String sDelimiter) { 27 final int cCount = size(); 28 StringBuffer oBuffer = new StringBuffer (30*cCount); 29 for (int c=0; c<cCount; c++) { 30 if (c>0) oBuffer.append(sDelimiter); 31 oBuffer.append(getColumnName(c)); 32 } 33 return oBuffer.toString(); 34 } } 36 | Popular Tags |