|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.sql.ResultSetMetaDataWrapper
public class ResultSetMetaDataWrapper
This class defines a wrapper for accessing a specific column in ResultSetMetaData
.
This allows iteration over columns using idiomatic Groovy, e.g.
meta.each {col -> println col.columnName }All
ResultSetMetaData
column methods taking a column index
are available on a column either as a no-arg getter or via a property.
This wrapper is created by an iterator invoked for ResultSetMetaData
.
SqlGroovyMethods
Constructor Summary | |
---|---|
ResultSetMetaDataWrapper(ResultSetMetaData target,
int index)
|
Method Summary | |
---|---|
Object |
getProperty(String property)
Retrieves a property value. |
Object |
invokeMethod(String name,
Object args)
Invokes the given method. |
void |
setProperty(String property,
Object newValue)
Sets the given property to the new value. |
Methods inherited from class groovy.lang.GroovyObjectSupport |
---|
getMetaClass, setMetaClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultSetMetaDataWrapper(ResultSetMetaData target, int index)
Method Detail |
---|
public Object invokeMethod(String name, Object args)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class GroovyObjectSupport
name
- the name of the method to callargs
- the arguments to use for the method call
public Object getProperty(String property)
GroovyObject
getProperty
in interface GroovyObject
getProperty
in class GroovyObjectSupport
property
- the name of the property of interest
public void setProperty(String property, Object newValue)
GroovyObject
setProperty
in interface GroovyObject
setProperty
in class GroovyObjectSupport
property
- the name of the property of interestnewValue
- the new value for the property
|
Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |