groovy.sql
Class GroovyRowResult

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by 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 $

Constructor Summary
GroovyRowResult(LinkedHashMap result)
           
 
Method Summary
 Object getAt(int index)
          Retrieve the value of the property by its index.
 Object getProperty(String property)
          Retrieve the value of the property by its name *
 String toString()
           
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, invokeMethod, setMetaClass, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GroovyRowResult

public GroovyRowResult(LinkedHashMap result)
Method Detail

getProperty

public Object getProperty(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 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 String toString()
Overrides:
toString in class Object


Copyright © 2003-2010 The Codehaus. All Rights Reserved.