|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlitebase.RowIterator
public class RowIterator
Used to iterate through the rows of a database. It can access some attributes from the row that eases the control of which row was changed, deleted or is newer since a synchronization.
| Field Summary | |
|---|---|
int |
attr
The attribute for this row. |
byte[] |
data
The data for the current row. |
static int |
ROW_ATTR_DELETED
Indicates if the row was deleted. |
static int |
ROW_ATTR_NEW
Indicates if the row is new. |
static int |
ROW_ATTR_SYNCED
Indicates if the a row was synced. |
static int |
ROW_ATTR_UPDATED
Indicates if the row was updated. |
int |
rowid
The rowid for the current row. |
int |
rowNumber
The number of the row. |
| Method Summary | |
|---|---|
void |
close()
Closes this iterator. |
byte[] |
getBlob(int column)
Returns a blob contained in the current row. |
totalcross.util.Date |
getDate(int column)
Returns a date contained in the current row. |
totalcross.sys.Time |
getDateTime(int column)
Returns a datetime contained in the current row. |
double |
getDouble(int column)
Returns a double precision floating point number contained in the current row. |
double |
getFloat(int column)
Returns a floating point number contained in the current row. |
int |
getInt(int column)
Returns an integer contained in the current row. |
long |
getLong(int column)
Returns a long integer contained in the current row. |
short |
getShort(int column)
Returns a short contained in the current row. |
java.lang.String |
getString(int column)
Returns a string contained in the current row. |
boolean |
next()
Moves to the next record and fills the data members. |
boolean |
nextNotSynced()
Moves to the next record with an attribute different of SYNCED. |
void |
reset()
Resets the counter to zero so it is possible to restart to fetch records. |
void |
setSynced()
If the attribute is currently NEW or UPDATED, this method sets them to SYNCED. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ROW_ATTR_SYNCED
public static final int ROW_ATTR_NEW
public static final int ROW_ATTR_UPDATED
public static final int ROW_ATTR_DELETED
public byte[] data
public int rowid
public int attr
ROW_ATTR_ to compare or assign.
public int rowNumber
| Method Detail |
|---|
public boolean next()
throws DriverException
true if it is possible to iterate to the next record. Otherwise, it will return false.
DriverException - If an IOException occurs.
public boolean nextNotSynced()
throws DriverException
true if it is possible to iterate to a next record not synced. Otherwise, it will return
false.
DriverException - If an IOException occurs.
public void setSynced()
throws DriverException
DriverException - If an IOException occurs.public void close()
public void reset()
public short getShort(int column)
throws DriverException
column - The short column index, starting from 1.
DriverException - if the column is not a short or an IOException occurs.
public int getInt(int column)
throws DriverException
column - The integer column index, starting from 1.
DriverException - if the column is not a integer or an IOException occurs.
public long getLong(int column)
throws DriverException
column - The long integer column index, starting from 1.
DriverException - if the column is not a long integer or an IOException occurs.
public double getFloat(int column)
throws DriverException
column - The floating point number column index, starting from 1.
DriverException - if the column is a not floating point number or an IOException occurs.
public double getDouble(int column)
throws DriverException
column - The double precision floating point number column index, starting from 1.
DriverException - if the column is not a double precision floating point number or an
IOException occurs.
public java.lang.String getString(int column)
throws DriverException
column - The string column index, starting from 1.
DriverException - if the column is not of type string or an IOException occurs.
public byte[] getBlob(int column)
throws DriverException
column - The blob column index, starting from 1.
DriverException - if the column is not of type blob or an IOException occurs.
public totalcross.util.Date getDate(int column)
throws DriverException
column - The date column index, starting from 1.
DriverException - if the column is not of type date, an IOException or an InvalidDateException occurs, or the date is not valid.
public totalcross.sys.Time getDateTime(int column)
throws DriverException
column - The datetime column index, starting from 1.
DriverException - if the column is not of type datetime or an IOException occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||