groovy.sql
Class GroovyRowResult
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.sql.GroovyRowResult
- All Implemented Interfaces:
- GroovyObject
- public class GroovyRowResult
- extends GroovyObjectSupport
Represents an extent of objects.
It's used in the oneRow method to be able to access the result
of a SQL query by the name of the column, or by the column number.
- Version:
- $Revision: 1.1 $
Field Summary |
private java.util.LinkedHashMap |
result
|
Method Summary |
java.lang.Object |
getAt(int index)
Retrieve the value of the property by its index. |
java.lang.Object |
getProperty(java.lang.String property)
Retrieve the value of the property by its name * |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
result
private java.util.LinkedHashMap result
GroovyRowResult
public GroovyRowResult(java.util.LinkedHashMap result)
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Retrieve the value of the property by its name *
- Specified by:
getProperty
in interface GroovyObject
- Overrides:
getProperty
in class GroovyObjectSupport
- Parameters:
property
- is the name of the property to look at
- Returns:
- the value of the property
getAt
public java.lang.Object getAt(int index)
- Retrieve the value of the property by its index.
A negative index will count backwards from the last column.
- Parameters:
index
- is the number of the column to look at
- Returns:
- the value of the property
toString
public java.lang.String toString()
Copyright © 2003-2005 The Codehaus. All Rights Reserved.