ua.gradsoft.xwikisql
Interface SqlResultRow

All Known Implementing Classes:
InMemorySqlResultRow

public interface SqlResultRow

Temporary object, which used for navigation accross query results in velocity #foreach loops. i. e.

  #set($resultset=sql.query("db","select * from table"))
  #foreach($row in $resultset)
  <tr>
    <td>$row.getString("column1")</td>
    <td>$row.getString("column2")</td>
  <tr>
  #end
 


Method Summary
 java.math.BigDecimal getBigDecimal(int i)
          retrieve object in column with index i as BigDecimal.
 java.math.BigDecimal getBigDecimal(java.lang.String name)
          retrieve object in column with name name as BigDecimal.
 java.lang.Boolean getBoolean(int i)
          retrieve object in column with index i as Boolean.
 java.lang.Boolean getBoolean(java.lang.String name)
          retrieve object in column with name name as Boolean.
 java.util.Date getDate(int i)
          retrieve object in column with index i as Date.
 java.util.Date getDate(java.lang.String name)
          retrieve object in column with name name as Date.
 java.lang.Double getDouble(int i)
          retrieve object in column with index i as Double.
 java.lang.Double getDouble(java.lang.String name)
          retrieve object in column with name name as Double.
 java.lang.Integer getInteger(int i)
          retrieve object in column with index i as long.
 java.lang.Integer getInteger(java.lang.String name)
          retrieve object in column with name name as integer.
 java.lang.Long getLong(int i)
          retrieve object in column with index i as long.
 java.lang.Long getLong(java.lang.String name)
          retrieve object in column with name name as long.
 java.lang.Object getObject(int i)
          retrieve object in column with index i
 java.lang.Object getObject(java.lang.String name)
          retrieve object in column with name name
 java.lang.String getString(int i)
          retrieve object in column with index i as string.
 java.lang.String getString(java.lang.String name)
          retrieve object in column with name name as string.
 boolean isNull(int i)
          true is object in appropriative column is null.
 boolean isNull(java.lang.String name)
          true is object in appropriative column is null.
 

Method Detail

getObject

java.lang.Object getObject(java.lang.String name)
retrieve object in column with name name

Parameters:
name - - column name.
Returns:
object which situated on this column name.

getObject

java.lang.Object getObject(int i)
retrieve object in column with index i

Parameters:
i - -- column index (starting from 0)
Returns:
object which situated on this column index.

isNull

boolean isNull(java.lang.String name)
true is object in appropriative column is null.


isNull

boolean isNull(int i)
true is object in appropriative column is null.

Parameters:
i - column index (starting from 0)

getString

java.lang.String getString(java.lang.String name)
retrieve object in column with name name as string.

See Also:
SqlPluginConfiguration.getNullAsEmptyString()

getString

java.lang.String getString(int i)
retrieve object in column with index i as string.

See Also:
SqlPluginConfiguration.getNullAsEmptyString()

getLong

java.lang.Long getLong(java.lang.String name)
retrieve object in column with name name as long. If oject is not convertable to long than throw SqlRuntimeException or log error and return null, in depend from throwExceptions configuration parameter.


getLong

java.lang.Long getLong(int i)
retrieve object in column with index i as long. If oject is not convertable to long then behaviour depends from throwExceptions configuration parameter.


getInteger

java.lang.Integer getInteger(java.lang.String name)
retrieve object in column with name name as integer. If oject is not convertable to Integer: throw SqlRuntimeException or log error and return null, in depend from throwExceptions configuration paraeter.


getInteger

java.lang.Integer getInteger(int i)
retrieve object in column with index i as long. If oject is not convertable to Integer then behaviour depends from throwExceptions configuration parameter.


getBigDecimal

java.math.BigDecimal getBigDecimal(java.lang.String name)
retrieve object in column with name name as BigDecimal. If oject is not convertable to BigDecimal then behaviour depends from throwExceptions configuration parameter.


getBigDecimal

java.math.BigDecimal getBigDecimal(int i)
retrieve object in column with index i as BigDecimal. If oject is not convertable to long then behaviour depends from throwExceptions configuration parameter.


getDouble

java.lang.Double getDouble(java.lang.String name)
retrieve object in column with name name as Double. If oject is not convertable to double then behaviour depends from throwExceptions configuration parameter.


getDouble

java.lang.Double getDouble(int i)
retrieve object in column with index i as Double. If oject is not convertable to double then behaviour depends from throwExceptions configuration parameter.


getBoolean

java.lang.Boolean getBoolean(java.lang.String name)
retrieve object in column with name name as Boolean. If oject is not convertable to boolean then behaviour depends from throwExceptions configuration parameter.


getBoolean

java.lang.Boolean getBoolean(int i)
retrieve object in column with index i as Boolean. If oject is not convertable to boolean then behaviour depends from throwExceptions configuration parameter.

Parameters:
i - index, staring from 0

getDate

java.util.Date getDate(java.lang.String name)
retrieve object in column with name name as Date. If oject is not convertable to date then behaviour depends from throwExceptions configuration parameter. param name name of column to retrieve.


getDate

java.util.Date getDate(int i)
retrieve object in column with index i as Date. If oject is not convertable to date then behaviour depends from throwExceptions configuration parameter.

Parameters:
i - column index, staring from 0