|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.zentense.step2.view.View
public abstract class View
A view is a collection of rows, being a row a collection of columns, so
views are a bidimentional table of data. A view can contain any number of rows
(from 0 to N), and rows are ordered (there is a first row, a second one, a
last one, etc). Each row can contain any number of columns (even 0, although
a row without columns is an empty row), and can be expected that the columns
will be the same across rows, although this is not enforced in the
implementation. Columns are not ordered (there is no first or last column) and
are accessed through it's name. Views are used mainly to show or process data.
This is the abstract view implementation. All the rest of views subclass this one.
| Nested Class Summary | |
|---|---|
static class |
View.Empty
An empty ResultSetView implementation |
| Field Summary | |
|---|---|
static View.Empty |
EMPTY
An empty view instance |
| Constructor Summary | |
|---|---|
View()
Default constructor |
|
| Method Summary | |
|---|---|
DelegatedView |
asDelegated()
Casts this view as a DelegatedView |
ResultSetView |
asDelegatedResultSet()
Casts this view as a ResultSetView into a DelegatedView |
ResultSetView |
asResultSet()
Casts this view as a ResultSetView |
void |
fillFromRow(java.util.Hashtable row)
Fills current row from a Hashtable. |
void |
fillRowFromRequest(RequestRuntime vm)
Fills current row from request parameters. |
View |
first()
|
abstract java.lang.Object |
get(java.lang.String colName)
Gets a column value |
boolean |
getBool(java.lang.String colName)
Gets a boolean column |
VectorRowView |
getCachedClone()
Return this view as a Vector of Hashtables, where each Hashtable is a row of the view |
abstract java.lang.String[] |
getCols()
Returns view columns |
VectorRowView |
getColsAsView()
Gets columns as a View |
int |
getCount()
Gets results total size |
double |
getDouble(java.lang.String colName)
Gets a double representation of a column |
static java.lang.String |
getIndent(int ind)
Gets a string composed of 'ind' spaces. |
int |
getInt(java.lang.String colName)
Gets an integer representation of a column value |
int |
getOrdinal()
Gets the current position of this view. |
java.util.Hashtable |
getRow()
Gets current row as a Hashtable |
java.util.Hashtable |
getRow(java.lang.String[] cols)
Gets current row as a Hashtable cols Columns to be included in returned Hashtable |
abstract int |
getSize()
Gets results size. |
int |
getStart()
Returns the first visible row in this view. |
double |
getSum(java.lang.String col)
Gets the sum of a column |
void |
insertRow()
Inserts row. |
boolean |
next()
Advances the view to the next row. |
void |
open()
Position the view before the first visible row |
void |
randomPosition()
Moves to a random row from this view |
abstract void |
set(java.lang.String colName,
java.lang.Object obj)
Sets a (key, value) pair |
void |
setPageBounds(com.zentense.step2.deprecated.AppUnit unit)
Sets page bounds. |
void |
setPageBounds(int begin,
int step)
Sets page bounds. |
void |
setPageBounds(int begin,
int step,
Pager pager)
Sets page bounds. |
void |
setPageBounds(java.lang.String begin,
int step,
Pager pager)
Sets page bounds. |
void |
setPosition(int pos)
Moves to another row in view |
void |
updateRow()
Updates row. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final View.Empty EMPTY
| Constructor Detail |
|---|
public View()
| Method Detail |
|---|
public abstract int getSize()
throws java.lang.Exception
java.lang.Exception
public int getCount()
throws java.lang.Exception
java.lang.Exception
public abstract void set(java.lang.String colName,
java.lang.Object obj)
throws java.lang.Exception
colName - Column name (key)obj - Value
java.lang.Exception
public abstract java.lang.Object get(java.lang.String colName)
throws java.lang.Exception
colName - Column name (key)
java.lang.Exception
public final int getInt(java.lang.String colName)
throws java.lang.Exception
colName - Column name (key)
java.lang.Exception
public final boolean getBool(java.lang.String colName)
throws java.lang.Exception
colName - Column name (key)
java.lang.Exception
public final double getDouble(java.lang.String colName)
throws java.lang.Exception
colName - Column name (key)
java.lang.Exceptionpublic static final java.lang.String getIndent(int ind)
public abstract java.lang.String[] getCols()
throws java.lang.Exception
java.lang.Exception
public final VectorRowView getColsAsView()
throws java.lang.Exception
java.lang.Exception
public int getOrdinal()
throws java.lang.Exception
java.lang.Exception
public final void setPageBounds(java.lang.String begin,
int step,
Pager pager)
throws java.lang.Exception
begin - First row in pagestep - Number of rows in pagepager - Pager to be initialized to represent this paging
java.lang.Exception
public final void setPageBounds(com.zentense.step2.deprecated.AppUnit unit)
throws java.lang.Exception
java.lang.Exception
public void setPageBounds(int begin,
int step)
throws java.lang.Exception
begin - First row in pagestep - Number of rows in page
java.lang.Exception
public final void setPageBounds(int begin,
int step,
Pager pager)
throws java.lang.Exception
begin - First row in pagestep - Number of rows in pagepager - Pager to be initialized to represent this paging
java.lang.Exceptionpublic int getStart()
View#setPageBounds(Integer, Integer)
public boolean next()
throws java.lang.Exception
java.lang.Exception
public void open()
throws java.lang.Exception
java.lang.Exception
public void setPosition(int pos)
throws java.lang.Exception
java.lang.Exception
public final void randomPosition()
throws java.lang.Exception
java.lang.Exception
public java.util.Hashtable getRow()
throws java.lang.Exception
java.lang.Exception
public final java.util.Hashtable getRow(java.lang.String[] cols)
throws java.lang.Exception
java.lang.Exception
public double getSum(java.lang.String col)
throws java.lang.Exception
col - Column name
java.lang.Exception
public VectorRowView getCachedClone()
throws java.lang.Exception
java.lang.Exceptionpublic final ResultSetView asResultSet()
public final DelegatedView asDelegated()
public final ResultSetView asDelegatedResultSet()
public final void fillRowFromRequest(RequestRuntime vm)
throws java.lang.Exception
java.lang.Exception
public final void fillFromRow(java.util.Hashtable row)
throws java.lang.Exception
java.lang.Exception
public void insertRow()
throws java.lang.Exception
java.lang.Exception
public void updateRow()
throws java.lang.Exception
java.lang.Exceptionpublic View first()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||