|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.zentense.step2.view.View
com.zentense.step2.view.RowView
com.zentense.step2.view.VectorRowView
public class VectorRowView
This class implements a Vector of rows. Each row is a Hashtable.
| Nested Class Summary | |
|---|---|
protected class |
VectorRowView.ComparableComparer
Performs comparisons over a vector of rows (used for sorting them) |
| Nested classes/interfaces inherited from class com.zentense.step2.view.View |
|---|
View.Empty |
| Field Summary | |
|---|---|
protected int |
ptr
Number of row being read. |
protected java.util.Vector |
res
Vector that holds all rows |
| Fields inherited from class com.zentense.step2.view.RowView |
|---|
row |
| Fields inherited from class com.zentense.step2.view.View |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
VectorRowView()
Creates an view with no rows |
|
VectorRowView(java.util.Vector v)
Constructor from a vector |
|
VectorRowView(VectorRowView vrv)
Constructor from another vector row view |
|
| Method Summary | |
|---|---|
void |
add(View v)
Appends the content of the given view at the end of this view. |
void |
addRow(java.util.Hashtable row)
Appends a row to this view |
void |
addRow(java.lang.String[] cols,
java.lang.Object[] values)
Appends a row to this view. |
java.lang.Object |
get(int idx,
java.lang.String colName)
Gets a value |
static java.lang.Object |
get(java.util.Vector v,
int idx,
java.lang.String colName)
Gets a value from a vector of rows |
int |
getCount()
Gets results total size |
double |
getDouble(int idx,
java.lang.String colName)
Gets value as a double |
static double |
getDouble(java.util.Vector v,
int idx,
java.lang.String colName)
Gets double value from a vector of rows |
int |
getInt(int idx,
java.lang.String colName)
Gets a value as integer |
static int |
getInt(java.util.Vector v,
int idx,
java.lang.String colName)
Gets integer value from a vector of rows |
int |
getOrdinal()
Gets the current position of this view. |
java.util.Vector |
getResults()
Gets results |
java.util.Hashtable |
getRowAt(int idx)
Gets a row |
int |
getSize()
Gets results size |
int |
getStart()
Returns the first visible row in this view. |
void |
insertRowAt(java.util.Hashtable row,
int pos)
Inserts a row |
boolean |
next()
Advances the view to the next row. |
void |
open()
Position the view before the first visible row |
VectorRowView |
order(java.lang.String colname)
Sorts the view |
void |
put(int idx,
java.lang.String colName,
java.lang.Object obj)
Puts a value |
void |
removeRow(int idx)
Removes a row |
VectorRowView |
reverse()
Reverses the results |
void |
setPageBounds(int begin,
int step)
Sets page bounds. |
void |
setPosition(int pos)
Moves to another row in view |
void |
setResults(java.util.Vector res)
Sets results |
void |
setResults(VectorRowView vrv)
Sets results |
java.lang.String |
toString()
Gives a string representation of this object |
java.util.Vector |
toVectorRow()
|
| Methods inherited from class com.zentense.step2.view.RowView |
|---|
get, getCols, getRow, isEmpty, set, setRow, setRow, setRowOp |
| Methods inherited from class com.zentense.step2.view.View |
|---|
asDelegated, asDelegatedResultSet, asResultSet, fillFromRow, fillRowFromRequest, first, getBool, getCachedClone, getColsAsView, getDouble, getIndent, getInt, getRow, getSum, insertRow, randomPosition, setPageBounds, setPageBounds, setPageBounds, updateRow |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int ptr
protected java.util.Vector res
| Constructor Detail |
|---|
public VectorRowView()
public VectorRowView(VectorRowView vrv)
vrv - A vector row viewpublic VectorRowView(java.util.Vector v)
v - A vector of rows| Method Detail |
|---|
public void setResults(java.util.Vector res)
res - A vector of rowspublic void setResults(VectorRowView vrv)
vrv - A vector row viewpublic final java.util.Vector getResults()
public int getStart()
View
getStart in class ViewView#setPageBounds(Integer, Integer)public final int getSize()
getSize in class RowViewpublic int getCount()
View
getCount in class Viewpublic final int getOrdinal()
View
getOrdinal in class Viewpublic final void setPosition(int pos)
View
setPosition in class View
public final void open()
throws java.lang.Exception
View
open in class Viewjava.lang.Exception
public final boolean next()
throws java.lang.Exception
View
next in class Viewjava.lang.Exception
public final void setPageBounds(int begin,
int step)
throws java.sql.SQLException
View
setPageBounds in class Viewbegin - First row in pagestep - Number of rows in page
java.sql.SQLException
public void put(int idx,
java.lang.String colName,
java.lang.Object obj)
idx - Row indexcolName - Column nameobj - New value
public final java.lang.Object get(int idx,
java.lang.String colName)
idx - Row indexcolName - Column name
public final int getInt(int idx,
java.lang.String colName)
idx - Row indexcolName - Column name
public final double getDouble(int idx,
java.lang.String colName)
idx - Row indexcolName - Column name
public static final java.lang.Object get(java.util.Vector v,
int idx,
java.lang.String colName)
v - Vector of rowsidx - Row indexcolName - Column name
public static final int getInt(java.util.Vector v,
int idx,
java.lang.String colName)
v - Vector of rowsidx - Row indexcolName - Column name
public static final double getDouble(java.util.Vector v,
int idx,
java.lang.String colName)
v - Vector of rowsidx - Row indexcolName - Column name
public final VectorRowView reverse()
public final VectorRowView order(java.lang.String colname)
colname - Column name used for sorting
public java.lang.String toString()
toString in class RowView
public java.util.Vector toVectorRow()
throws java.lang.Exception
java.lang.Exception
public final void insertRowAt(java.util.Hashtable row,
int pos)
row - Row to be insertedpos - Index rowpublic final void addRow(java.util.Hashtable row)
row - Row to be appended
public final void addRow(java.lang.String[] cols,
java.lang.Object[] values)
cols - Array of column namesvalues - Array of values
public final void add(View v)
throws java.lang.Exception
v - View to be appended
java.lang.Exceptionpublic final java.util.Hashtable getRowAt(int idx)
idx - Row index
public final void removeRow(int idx)
idx - Row index
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||