org.drizzle.jdbc.internal.common.queryresults
Class DrizzleQueryResult

java.lang.Object
  extended by org.drizzle.jdbc.internal.common.queryresults.DrizzleQueryResult
All Implemented Interfaces:
QueryResult, SelectQueryResult

public final class DrizzleQueryResult
extends java.lang.Object
implements SelectQueryResult

User: marcuse Date: Jan 23, 2009 Time: 8:15:55 PM


Constructor Summary
DrizzleQueryResult(java.util.List<ColumnInformation> columnInformation, java.util.List<java.util.List<ValueObject>> valueObjects, short warningCount)
           
 
Method Summary
 void close()
           
 int getColumnId(java.lang.String columnLabel)
          get the id of the column named columnLabel
 java.util.List<ColumnInformation> getColumnInformation()
           
 java.lang.String getMessage()
           
 ResultSetType getResultSetType()
           
 int getRowPointer()
          gets the current row number
 int getRows()
           
 ValueObject getValueObject(int i)
          gets the value at position i in the result set.
 ValueObject getValueObject(java.lang.String column)
          gets the value object in column named columnName
 short getWarnings()
           
 void moveRowPointerTo(int i)
          moves the row pointer to position i
 boolean next()
          move pointer forward
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrizzleQueryResult

public DrizzleQueryResult(java.util.List<ColumnInformation> columnInformation,
                          java.util.List<java.util.List<ValueObject>> valueObjects,
                          short warningCount)
Method Detail

next

public boolean next()
Description copied from interface: SelectQueryResult
move pointer forward

Specified by:
next in interface SelectQueryResult
Returns:
true if there is another row

close

public void close()
Specified by:
close in interface QueryResult

getWarnings

public short getWarnings()
Specified by:
getWarnings in interface QueryResult

getMessage

public java.lang.String getMessage()
Specified by:
getMessage in interface QueryResult

getColumnInformation

public java.util.List<ColumnInformation> getColumnInformation()
Specified by:
getColumnInformation in interface QueryResult

getValueObject

public ValueObject getValueObject(int i)
                           throws NoSuchColumnException
gets the value at position i in the result set. i starts at zero!

Specified by:
getValueObject in interface SelectQueryResult
Parameters:
i - index, starts at 0
Returns:
Throws:
NoSuchColumnException - if the column does not exist

getValueObject

public ValueObject getValueObject(java.lang.String column)
                           throws NoSuchColumnException
Description copied from interface: SelectQueryResult
gets the value object in column named columnName

Specified by:
getValueObject in interface SelectQueryResult
Parameters:
column - the name of the column
Returns:
a value object
Throws:
NoSuchColumnException - if the column does not exist

getRows

public int getRows()
Specified by:
getRows in interface QueryResult

getColumnId

public int getColumnId(java.lang.String columnLabel)
                throws NoSuchColumnException
Description copied from interface: SelectQueryResult
get the id of the column named columnLabel

Specified by:
getColumnId in interface SelectQueryResult
Parameters:
columnLabel - the label of the column
Returns:
the index, starts at 0
Throws:
NoSuchColumnException - if the column does not exist

moveRowPointerTo

public void moveRowPointerTo(int i)
Description copied from interface: SelectQueryResult
moves the row pointer to position i

Specified by:
moveRowPointerTo in interface SelectQueryResult
Parameters:
i - the position

getRowPointer

public int getRowPointer()
Description copied from interface: SelectQueryResult
gets the current row number

Specified by:
getRowPointer in interface SelectQueryResult
Returns:
the current row number

getResultSetType

public ResultSetType getResultSetType()
Specified by:
getResultSetType in interface QueryResult


Copyright © 2012. All Rights Reserved.