dsql.value
Class XmlRecordHolder

java.lang.Object
  extended bydsql.DMExecuted
      extended bydsql.value.Value
          extended bydsql.value.NonScalarValue
              extended bydsql.value.XmlDataValue
                  extended bydsql.value.XmlRecordHolder
All Implemented Interfaces:
Cursor, DataValue, DotAt, RecordHolder

public class XmlRecordHolder
extends XmlDataValue
implements Cursor


Field Summary
protected  int currentRecordIndex
           
protected  int currentRecordPos
           
 
Fields inherited from class dsql.value.XmlDataValue
buffer, dataEle, external, fileName, parser, readColumnFromFile, recordHolder
 
Constructor Summary
XmlRecordHolder(XmlDataValue data)
           
 
Method Summary
 int currentRecord()
           
 Value getRecord()
          get current record; this could be the actual record, as does XmlRecordHolder, or a "proxy" as does TableResult
 Value getRecord(int i)
           
 int getRecordCount()
          this function should be called with care as it can be computationaly expensive for SQL Cursors!
 void gotoRecord(int pos)
           
 boolean nextRecord()
           
protected  ASTXMLElement parseNextRecord()
          Parse next column and add it to buffer
 void printRecord(ASTPrint printer)
           
 void reset()
           
 void setRecord(int i, Value val)
           
 
Methods inherited from class dsql.value.XmlDataValue
allowDSQL, equals, getBoolean, getColumn, getColumn, getColumnCount, getColumnIndex, getColumnLabel, getColumnString, getColumnString, getField, getField, getMeta, getRecordHolder, getString, getXmlData, getXmlData, initParser, parseNext, parseNextColumn, print, setContents, setContents, setField
 
Methods inherited from class dsql.value.NonScalarValue
getFields, isScalar, setField
 
Methods inherited from class dsql.value.Value
getFloat, getInt, getObject, getObjectClass, getType, getValue, getValue
 
Methods inherited from class dsql.DMExecuted
getCaller, setCaller
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentRecordIndex

protected int currentRecordIndex

currentRecordPos

protected int currentRecordPos
Constructor Detail

XmlRecordHolder

public XmlRecordHolder(XmlDataValue data)
                throws ExecuteException
Method Detail

parseNextRecord

protected ASTXMLElement parseNextRecord()
                                 throws ExecuteException
Parse next column and add it to buffer

Throws:
ExecuteException

reset

public void reset()
           throws ExecuteException
Specified by:
reset in interface Cursor
Throws:
ExecuteException

currentRecord

public int currentRecord()
                  throws ExecuteException
Specified by:
currentRecord in interface Cursor
Throws:
ExecuteException

gotoRecord

public void gotoRecord(int pos)
                throws ExecuteException
Specified by:
gotoRecord in interface Cursor
Parameters:
pos - is the record position: 1 is the first record, 0 is the record before first, -1 is after the last record
Throws:
ExecuteException

nextRecord

public boolean nextRecord()
                   throws ExecuteException
Specified by:
nextRecord in interface Cursor
Throws:
ExecuteException

getRecordCount

public int getRecordCount()
                   throws ExecuteException
Description copied from interface: RecordHolder
this function should be called with care as it can be computationaly expensive for SQL Cursors!

Specified by:
getRecordCount in interface RecordHolder
Returns:
number of records
Throws:
ExecuteException

getRecord

public Value getRecord()
                throws ExecuteException
Description copied from interface: Cursor
get current record; this could be the actual record, as does XmlRecordHolder, or a "proxy" as does TableResult

Specified by:
getRecord in interface Cursor
Throws:
ExecuteException

getRecord

public Value getRecord(int i)
                throws ExecuteException
Specified by:
getRecord in interface RecordHolder
Returns:
record at position i (first record is 1). For SQL cursors, the returned Value can be a ProxyRecord
Throws:
ExecuteException

printRecord

public void printRecord(ASTPrint printer)
                 throws ExecuteException
Specified by:
printRecord in interface Cursor
Throws:
ExecuteException

setRecord

public void setRecord(int i,
                      Value val)
               throws ExecuteException
Specified by:
setRecord in interface RecordHolder
Throws:
ExecuteException