1 package com.daffodilwoods.daffodildb.server.datasystem.persistentsystem; 2 3 import com.daffodilwoods.daffodildb.server.datasystem.interfaces.*; 4 import com.daffodilwoods.daffodildb.server.datasystem.utility.*; 5 import com.daffodilwoods.database.resource.DException; 6 import com.daffodilwoods.database.general.QualifiedIdentifier; 7 import com.daffodilwoods.daffodildb.server.sql99.utils._Reference; 8 9 14 public class Table implements _DataTable{ 15 16 19 20 public _TableList table; 21 22 23 private QualifiedIdentifier tableName; 24 25 28 private PersistentDatabase persistentDatabase; 29 30 public Table(QualifiedIdentifier tableName0,PersistentDatabase persistentDatabase0,_TableList table0) { 31 persistentDatabase = persistentDatabase0; 32 table = table0; 33 tableName = tableName0; 34 } 35 36 41 42 public _TableIterator getIterator() throws DException { 43 return new DatabaseUserTableIterator(persistentDatabase.getDatabaseUserTable(tableName,table),((PersistentTable)table.getTable(5)).getClusterIterator()); 44 } 45 46 public _TableCharacteristics getTableCharacteristics() throws DException{ 47 return table.getTableCharacteristics(); 48 } 49 50 51 public int getIndexType() throws DException { 52 return 1; 53 } 54 55 56 public _Record getBlankRecord() throws DException{ 57 _TableCharacteristics tc = table.getTableCharacteristics(); 58 return new Record(tc,new Object [tc.getColumnCount()]); 59 } 60 61 62 public void rollBack() throws DException { 63 table.rollBack(); 64 } 65 66 67 public _TableList getTable() { 68 return table; 69 } 70 71 } 72 73 | Popular Tags |