|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dbforms.config.ResultSetVector
public class ResultSetVector
In version 0.5, this class held the actual data of a ResultSet (SELECT from a table). The main weakness of this class was that it used too much memory and processor time:
since version 0.7 DbForms queries only those record from the database the user really wants to see. this way you can query from a table with millions of records and you will still have no memory problems, [exception: you choose count="" in DbForms-tag :=) -> see org.dbforms.taglib.DbFormTag]
Constructor Summary | |
---|---|
ResultSetVector()
Creates a new, empty ResultSetVector object. |
|
ResultSetVector(Table table)
Creates a new ResultSetVector object with the given FieldList |
|
ResultSetVector(Table table,
Vector selectedFields)
Creates a new ResultSetVector object. |
Method Summary | |
---|---|
void |
addResultSet(DbEventInterceptorData interceptorData,
ResultSet rs)
DOCUMENT ME! |
void |
addRow(DbEventInterceptorData interceptorData,
Object[] objectRow)
adds a row to the ResultSetVector |
void |
flip()
DOCUMENT ME! |
Object |
getAttribute(String key)
reads a value from the attributes list |
Map |
getAttributes()
DOCUMENT ME! |
String[] |
getCurrentRow()
DOCUMENT ME! |
FieldValues |
getCurrentRowAsFieldValues()
DOCUMENT ME! |
Map |
getCurrentRowAsMap()
DOCUMENT ME! |
Object[] |
getCurrentRowAsObjects()
DOCUMENT ME! |
String |
getField(int i)
returns the fieldValues String representation given by index i |
String |
getField(String fieldName)
returns the fieldValues string representation given by it's name |
Object |
getFieldAsObject(int i)
returns the fieldValues Object given by index i |
Object |
getFieldAsObject(int row,
int i)
returns the fieldValues Object given by row row and index i |
Object |
getFieldAsObject(int row,
String fieldName)
returns the fieldValues Object given by row row and fieldName |
Object |
getFieldAsObject(String fieldName)
returns the fieldValues Object given by it's name |
Field |
getFieldDescription(String fieldName)
gets the Field object to a given fieldName |
int |
getFieldIndex(String fieldName)
returns the index of a given fieldName |
String |
getTableName()
|
boolean |
isFirst()
Return true if the current record is the first record |
boolean |
isFirstPage()
DOCUMENT ME! |
boolean |
isLast()
Return true if the current record is the last record |
boolean |
isLastPage()
DOCUMENT ME! |
static boolean |
isNull(ResultSetVector rsv)
Checks if the given ResultSetVector is null |
void |
moveFirst()
moves to the first record |
void |
moveLast()
moves to the last record |
boolean |
moveNext()
moves to the next record |
boolean |
movePrevious()
moves to the previous record |
void |
setAttribute(String key,
Object value)
Stores a value in the attributes list |
void |
setFieldAsObject(int row,
int i,
Object obj)
sets the fieldValue Object given by row row and index i |
void |
setFieldAsObject(int row,
String fieldName,
Object obj)
sets the fieldValue Object given by row row and fieldName |
void |
setFirstPage(boolean b)
DOCUMENT ME! |
void |
setLastPage(boolean b)
DOCUMENT ME! |
int |
size()
implements size() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultSetVector()
public ResultSetVector(Table table)
table
- The FieldList to usepublic ResultSetVector(Table table, Vector selectedFields)
table
- DOCUMENT ME!selectedFields
- DOCUMENT ME!Method Detail |
---|
public static final boolean isNull(ResultSetVector rsv)
rsv
- ResultSetVector to check
public void setAttribute(String key, Object value)
key
- key for the valuevalue
- value to storepublic Object getAttribute(String key)
key
- key to read
public Map getAttributes()
public String getTableName()
public String[] getCurrentRow()
public FieldValues getCurrentRowAsFieldValues()
IllegalArgumentException
- DOCUMENT ME!public Map getCurrentRowAsMap()
IllegalArgumentException
- DOCUMENT ME!public Object[] getCurrentRowAsObjects()
public String getField(int i)
i
- Index into the objectArray
public String getField(String fieldName)
fieldName
- name of the field
public Object getFieldAsObject(int i)
i
- Index into the objectArray
public Object getFieldAsObject(int row, int i)
row
- row in the rsvi
- Index into the objectArray
public void setFieldAsObject(int row, int i, Object obj)
row
- row in the rsvi
- Index into the objectArraypublic Object getFieldAsObject(String fieldName)
fieldName
- name of the field
public Object getFieldAsObject(int row, String fieldName)
row
- row in the rsv
public void setFieldAsObject(int row, String fieldName, Object obj)
row
- row in the rsvfieldName
- name of the fieldpublic Field getFieldDescription(String fieldName)
fieldName
- name of the field
public int getFieldIndex(String fieldName)
fieldName
- name of the field
public boolean isFirst()
public void setFirstPage(boolean b)
b
- value to setpublic boolean isFirstPage()
public boolean isLast()
public void setLastPage(boolean b)
b
- value to setpublic boolean isLastPage()
public void addResultSet(DbEventInterceptorData interceptorData, ResultSet rs) throws SQLException
interceptorData
- DOCUMENT ME!rs
- DOCUMENT ME!
SQLException
- DOCUMENT ME!public void addRow(DbEventInterceptorData interceptorData, Object[] objectRow)
interceptorData
- DOCUMENT ME!objectRow
- row to addpublic void flip()
public void moveFirst()
public void moveLast()
public boolean moveNext()
public boolean movePrevious()
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |