1 21 22 package org.apache.derbyTesting.functionTests.tests.lang; 23 24 import java.sql.SQLException ; 25 26 29 public class WarehouseVTI extends TableVTI { 30 private int maxRows; 31 private int row = 0; 32 33 public WarehouseVTI(String schemaName,String tableName,String maxRows) 34 throws SQLException 35 { 36 super(tableName); 37 this.maxRows = Integer.parseInt(maxRows); 38 } 39 40 public boolean next() { 41 42 if (++row <= maxRows) 43 return true; 44 else 45 return false; 46 47 } 48 49 public int getInt(int col) 50 51 { 52 switch (col) { 53 case 1: 54 return row; 55 default: 56 System.out.println("ERROR! INVALID COLUMN"); 57 } 58 return 0; 59 } 60 61 } | Popular Tags |