|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujac.util.table.BaseRow
org.ujac.util.table.DataRow
public class DataRow
Name: Row
Description: A class holding row data.
| Field Summary |
|---|
| Fields inherited from class org.ujac.util.table.BaseRow |
|---|
rowData, table |
| Fields inherited from interface org.ujac.util.table.TableConstants |
|---|
DEFAULT_DATE_FORMAT, DEFAULT_DOUBLE_FORMAT, DEFAULT_INTEGER_FORMAT, DEFAULT_TIME_FORMAT, DEFAULT_TIMESTAMP_FORMAT, ROW_TYPE_FOOTER, ROW_TYPE_GROUP, ROW_TYPE_GROUP_TITLE, ROW_TYPE_HEADER, ROW_TYPE_NORMAL |
| Fields inherited from interface org.ujac.util.UjacTypes |
|---|
TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_NAME_BOOLEAN, TYPE_NAME_DATE, TYPE_NAME_DOUBLE, TYPE_NAME_FLOAT, TYPE_NAME_INT, TYPE_NAME_LONG, TYPE_NAME_OBJECT, TYPE_NAME_SHORT, TYPE_NAME_STRING, TYPE_NAME_TABLE, TYPE_NAME_TIME, TYPE_NAME_TIMESTAMP, TYPE_OBJECT, TYPE_SHORT, TYPE_STRING, TYPE_TABLE, TYPE_TIME, TYPE_TIMESTAMP |
| Constructor Summary | |
|---|---|
protected |
DataRow(Table table,
int rowIdx)
Constructs a DataRow instance with specific arguments. |
|
DataRow(Table table,
int rowIdx,
Row srcRow)
Constructs a DataRow instance with specific attributes. |
| Method Summary | |
|---|---|
protected void |
expandRow()
Expands the length of the row to the number of columns of the table. |
boolean |
getBoolean(int columnIdx)
Gets the boolean value from the given row. |
boolean |
getBoolean(String columnName)
Gets the boolean value from the given row. |
Date |
getDate(int columnIdx)
Gets the Date value from the given row. |
Date |
getDate(String columnName)
Gets the Date value from the given row. |
double |
getDouble(int columnIdx)
Gets the double value from the given row. |
double |
getDouble(String columnName)
Gets the double value from the given row. |
float |
getFloat(int columnIdx)
Gets the float value from the given row. |
float |
getFloat(String columnName)
Gets the float value from the given row. |
int |
getIndex()
Gets the colum index. |
int |
getInt(int columnIdx)
Gets the integer value from the given row. |
int |
getInt(String columnName)
Gets the int value from the given row. |
long |
getLong(int columnIdx)
Gets the long value from the given row. |
long |
getLong(String columnName)
Gets the long value from the given row. |
Object |
getObject(int columnIdx)
Gets the Object value from the given row. |
Object |
getObject(String columnName)
Gets the Object value from the given row. |
String |
getString(int columnIdx)
Gets the String value from the given row. |
String |
getString(String columnName)
Gets the String value from the given row. |
Table |
getTable()
Gets the table the row is member of. |
Date |
getTime(int columnIdx)
Gets the Time value from the given row. |
Date |
getTime(String columnName)
Gets the Time value from the given row. |
Date |
getTimestamp(int columnIdx)
Gets the Timestamp value from the given row. |
Date |
getTimestamp(String columnName)
Gets the Timestamp value from the given row. |
String |
getType()
Gets the row type. |
protected void |
readData(ObjectInputStream s)
Reads the object's data from the given stream. |
protected void |
removeColumn(int columnIdx)
Removes the given column from the row data. |
void |
setBoolean(int columnIdx,
boolean value)
Sets the boolean value at the given row. |
void |
setBoolean(String columnName,
boolean value)
Sets the boolean value at the given row. |
void |
setDate(int columnIdx,
Date value)
Sets the Date value at the given row. |
void |
setDate(String columnName,
Date value)
Sets the Date value at the given row. |
void |
setDouble(int columnIdx,
double value)
Sets the double value at the given row. |
void |
setDouble(String columnName,
double value)
Sets the double value at the given row. |
void |
setFloat(int columnIdx,
float value)
Sets the float value at the given row. |
void |
setFloat(String columnName,
float value)
Sets the float value at the given row. |
protected void |
setIndex(int index)
Sets the colum index. |
void |
setInt(int columnIdx,
int value)
Sets the integer value at the given row. |
void |
setInt(String columnName,
int value)
Sets the int value at the given row. |
void |
setLong(int columnIdx,
long value)
Sets the long value at the given row. |
void |
setLong(String columnName,
long value)
Sets the long value at the given row. |
void |
setObject(int columnIdx,
Object value)
Sets the Object value at the given row. |
void |
setObject(String columnName,
Object value)
Sets the Object value at the given row. |
void |
setString(int columnIdx,
String value)
Sets the String value at the given row. |
void |
setString(String columnName,
String value)
Sets the String value at the given row. |
void |
setTime(int columnIdx,
Date value)
Sets the Time value at the given row. |
void |
setTime(String columnName,
Date value)
Sets the Time value at the given row. |
void |
setTimestamp(int columnIdx,
Date value)
Sets the Timestamp value at the given row. |
void |
setTimestamp(String columnName,
Date value)
Sets the Timestamp value at the given row. |
void |
setType(String type)
Sets the row type. |
protected void |
writeData(ObjectOutputStream s)
Writes the object's data to the given stream. |
| Methods inherited from class org.ujac.util.table.BaseRow |
|---|
asList, formatValue, formatValue, getAlign, getAlign, getFieldAlignment, getFormat, getFormat, isEndsBlock, isStartNewPage, isStartsBlock, isVisible, isVisible, setAlign, setAlign, setEndsBlock, setFormat, setFormat, setStartNewPage, setStartsBlock, setVisible, setVisible, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ujac.util.table.Row |
|---|
asList, formatValue, formatValue, getAlign, getAlign, getFormat, getFormat, isEndsBlock, isStartNewPage, isStartsBlock, isVisible, isVisible, setAlign, setAlign, setEndsBlock, setFormat, setFormat, setStartNewPage, setStartsBlock, setVisible, setVisible |
| Constructor Detail |
|---|
protected DataRow(Table table,
int rowIdx)
table - The table which contains this row.rowIdx - The index of this row.
public DataRow(Table table,
int rowIdx,
Row srcRow)
table - The row's table.rowIdx - The index of this row.srcRow - the row to copy.| Method Detail |
|---|
public String getType()
getType in interface Rowpublic void setType(String type)
type - The row type to set.public Table getTable()
getTable in interface RowgetTable in class BaseRowpublic int getIndex()
getIndex in interface Rowprotected void setIndex(int index)
index - The new column index.protected void expandRow()
expandRow in class BaseRow
protected void removeColumn(int columnIdx)
throws ColumnNotDefinedException
columnIdx - The index of the column to remove.
ColumnNotDefinedException - In case the column to remove does not exist.
public String getString(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getString in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public String getString(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getString in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setString(String columnName,
String value)
throws ColumnNotDefinedException,
TypeMismatchException
setString in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setString(int columnIdx,
String value)
throws ColumnNotDefinedException,
TypeMismatchException
setString in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public int getInt(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getInt in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public int getInt(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getInt in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setInt(String columnName,
int value)
throws ColumnNotDefinedException,
TypeMismatchException
setInt in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setInt(int columnIdx,
int value)
throws ColumnNotDefinedException,
TypeMismatchException
setInt in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public long getLong(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getLong in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public long getLong(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getLong in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setLong(String columnName,
long value)
throws ColumnNotDefinedException,
TypeMismatchException
setLong in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setLong(int columnIdx,
long value)
throws ColumnNotDefinedException,
TypeMismatchException
setLong in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public float getFloat(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getFloat in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public float getFloat(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getFloat in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setFloat(String columnName,
float value)
throws ColumnNotDefinedException,
TypeMismatchException
setFloat in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setFloat(int columnIdx,
float value)
throws ColumnNotDefinedException,
TypeMismatchException
setFloat in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public double getDouble(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getDouble in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public double getDouble(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getDouble in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setDouble(String columnName,
double value)
throws ColumnNotDefinedException,
TypeMismatchException
setDouble in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setDouble(int columnIdx,
double value)
throws ColumnNotDefinedException,
TypeMismatchException
setDouble in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public boolean getBoolean(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getBoolean in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public boolean getBoolean(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getBoolean in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setBoolean(String columnName,
boolean value)
throws ColumnNotDefinedException,
TypeMismatchException
setBoolean in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setBoolean(int columnIdx,
boolean value)
throws ColumnNotDefinedException,
TypeMismatchException
setBoolean in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public Date getDate(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getDate in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public Date getDate(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getDate in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setDate(String columnName,
Date value)
throws ColumnNotDefinedException,
TypeMismatchException
setDate in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setDate(int columnIdx,
Date value)
throws ColumnNotDefinedException,
TypeMismatchException
setDate in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public Date getTime(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getTime in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public Date getTime(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getTime in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setTime(String columnName,
Date value)
throws ColumnNotDefinedException,
TypeMismatchException
setTime in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setTime(int columnIdx,
Date value)
throws ColumnNotDefinedException,
TypeMismatchException
setTime in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public Date getTimestamp(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
getTimestamp in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public Date getTimestamp(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
getTimestamp in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setTimestamp(String columnName,
Date value)
throws ColumnNotDefinedException,
TypeMismatchException
setTimestamp in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setTimestamp(int columnIdx,
Date value)
throws ColumnNotDefinedException,
TypeMismatchException
setTimestamp in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public Object getObject(String columnName)
throws ColumnNotDefinedException
getObject in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
public Object getObject(int columnIdx)
throws ColumnNotDefinedException
getObject in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
public void setObject(String columnName,
Object value)
throws ColumnNotDefinedException,
TypeMismatchException
setObject in interface RowcolumnName - The name of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public void setObject(int columnIdx,
Object value)
throws ColumnNotDefinedException,
TypeMismatchException
setObject in interface RowcolumnIdx - The index of the desired column.value - The new value.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
protected void writeData(ObjectOutputStream s)
throws IOException
writeData in class BaseRows - The stream to write to
IOException - In case the data output failed.
protected void readData(ObjectInputStream s)
throws IOException,
ClassNotFoundException
readData in class BaseRows - The stream to read from.
IOException - In case the data reading failed.
ClassNotFoundException - In case the class to deserialize could not be found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||