|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.essbase.eas.utils.RandomAccessFileTableModel
public class RandomAccessFileTableModel
Title: RandomAccessResultSetFile Description: Copyright: Copyright (c) 2003 Company: Hyperion Solutions, Inc.
Field Summary | |
---|---|
static short |
DATE |
static short |
DOUBLE |
static short |
FLOAT |
static short |
INTEGER |
static short |
LONG |
static short |
SHORT |
static short |
STRING |
static short |
TIMESTAMP |
Constructor Summary | |
---|---|
RandomAccessFileTableModel() Empty constructor |
|
RandomAccessFileTableModel(java.io.File file) Constructor with the source or output file |
Method Summary | |
---|---|
void |
addTableModelListener(javax.swing.event.TableModelListener l) |
void |
buildColumns(java.sql.ResultSet rs) Builds column information from a SqlResultRest. |
void |
close() |
void |
createFile() creates the random access file |
void |
deleteFile() |
void |
dispose() |
java.lang.Class |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
java.lang.String |
getColumnName(int columnIndex) |
java.io.File |
getFile() |
java.io.RandomAccessFile |
getRAFFile() |
int |
getRowCount() |
java.lang.Object[] |
getRowData(int rowIndex, java.lang.Object[] data) |
long |
getRowOffset(int row) |
java.lang.Object |
getValueAt(int rowIndex, int columnIndex) |
int |
getVersion() |
boolean |
isCellEditable(int rowIndex, int columnIndex) |
boolean |
readFromFile() Reads the file |
void |
removeTableModelListener(javax.swing.event.TableModelListener l) |
void |
setColumnCount(int count) Sets the column count |
void |
setColumnNames(java.lang.String[] names) Sets the columns names |
void |
setColumnTypes(int[] types) Sets the column types. |
void |
setDeleteOnExit(boolean delete) |
void |
setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex) |
void |
setVersion(int version) |
void |
startNewRow() Starts a new row for writing |
void |
writeColumns() Writes the column information |
void |
writeColumns(int cols, java.lang.String[] names, int[] types) |
void |
writeColumns(java.lang.String[] names) |
void |
writeColumns(java.lang.String[] names, int[] types) |
void |
writeData(java.sql.ResultSet rs) Writes row data from the result set |
void |
writeEmptyFile() |
void |
writeHeader() Writes the header information to the file |
void |
writeOffsets() Writes the row offsets to teh file |
void |
writeRow(java.lang.Object[] values) Writes a row information to the file |
void |
writeRowColumn(java.sql.Date value) |
void |
writeRowColumn(java.util.Date value) |
void |
writeRowColumn(double value) |
void |
writeRowColumn(float value) |
void |
writeRowColumn(int value) |
void |
writeRowColumn(int col, java.lang.Object value) Writes a row column |
void |
writeRowColumn(long value) |
void |
writeRowColumn(short value) |
void |
writeRowColumn(java.sql.Timestamp value) |
void |
writeRowCount() Writes the row count to the file |
boolean |
writeToFile(java.sql.ResultSet rs) Writes a result set to a file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short SHORT
public static final short INTEGER
public static final short LONG
public static final short FLOAT
public static final short DOUBLE
public static final short DATE
public static final short TIMESTAMP
public static final short STRING
Constructor Detail |
---|
public RandomAccessFileTableModel()
public RandomAccessFileTableModel(java.io.File file)
file
- fileMethod Detail |
---|
public boolean readFromFile() throws java.io.IOException
java.io.IOException
public void writeEmptyFile() throws java.io.IOException
java.io.IOException
public void createFile() throws java.io.IOException
java.io.IOException
public void writeHeader() throws java.io.IOException
java.io.IOException
public void writeColumns() throws java.io.IOException
java.io.IOException
public void writeColumns(java.lang.String[] names) throws java.io.IOException
java.io.IOException
public void writeColumns(java.lang.String[] names, int[] types) throws java.io.IOException
java.io.IOException
public void writeColumns(int cols, java.lang.String[] names, int[] types) throws java.io.IOException
java.io.IOException
public void setColumnCount(int count)
count
- number of columnspublic void setColumnNames(java.lang.String[] names)
names
- column namespublic void setColumnTypes(int[] types)
types
- column typespublic void buildColumns(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- result setjava.sql.SQLException
public void writeData(java.sql.ResultSet rs) throws java.sql.SQLException, java.io.IOException
rs
- result setjava.sql.SQLException
java.io.IOException
public void startNewRow() throws java.io.IOException
java.io.IOException
public void writeRowColumn(int col, java.lang.Object value) throws java.io.IOException
col
- columnvalue
- value to be writtenjava.io.IOException
public void writeRowColumn(long value) throws java.io.IOException
java.io.IOException
public void writeRowColumn(short value) throws java.io.IOException
java.io.IOException
public void writeRowColumn(int value) throws java.io.IOException
java.io.IOException
public void writeRowColumn(float value) throws java.io.IOException
java.io.IOException
public void writeRowColumn(double value) throws java.io.IOException
java.io.IOException
public void writeRowColumn(java.sql.Date value) throws java.io.IOException
java.io.IOException
public void writeRowColumn(java.util.Date value) throws java.io.IOException
java.io.IOException
public void writeRowColumn(java.sql.Timestamp value) throws java.io.IOException
java.io.IOException
public void writeRow(java.lang.Object[] values) throws java.io.IOException
values
- the column values for the row. It has to be of the same format defined by the column types.java.io.IOException
public void writeOffsets() throws java.io.IOException
java.io.IOException
public void writeRowCount() throws java.io.IOException
java.io.IOException
public boolean writeToFile(java.sql.ResultSet rs)
rs
- resultsetpublic int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.io.File getFile()
public void deleteFile() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
public java.lang.Class getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
public java.lang.Object[] getRowData(int rowIndex, java.lang.Object[] data)
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
public void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener
in interface javax.swing.table.TableModel
public void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener
in interface javax.swing.table.TableModel
public int getVersion()
public void setVersion(int version)
public long getRowOffset(int row)
public void setDeleteOnExit(boolean delete)
public java.io.RandomAccessFile getRAFFile()
public void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |