Java Reference
In-Depth Information
rows = root.getChildNodes();
rowCount = rows.getLength();
}
}
public boolean next(){
if(rows==null){
initialise();
}
if(++rowIndex == rowCount){
return false;
}else{
currentRow = (Element)rows.item(rowIndex);
return true;
}
}
// scrollable ResultSet methods
public boolean previous(){
if(rows==null){
initialise();
rowIndex = rowCount;
}
if(--rowIndex < 0){
return false;
}else{
currentRow = (Element)rows.item(rowIndex);
return true;
}
}
public boolean absolute(int row) throws SQLException {
if(row == 0)throw new SQLException("invalid row number");
boolean onValidRow = true;
if(rows==null){
initialise();
}
if(row > 0)rowIndex = row - 1;
else if(row < 0){
rowIndex = rowCount + row;
}
if(rowIndex<-1){
Search WWH ::




Custom Search