groovy.sql
Class DataSet

java.lang.Object
  extended bygroovy.sql.Sql
      extended bygroovy.sql.DataSet

public class DataSet
extends Sql

Represents an extent of objects

Version:
$Revision: 1.8 $
Author:
Chris Stevenson, James Strachan

Field Summary
private  java.util.List params
           
private  DataSet parent
           
private  java.lang.String sql
           
private  java.lang.String table
           
private  SqlWhereVisitor visitor
           
private  Closure where
           
 
Fields inherited from class groovy.sql.Sql
log, updateCount
 
Constructor Summary
DataSet(DataSet parent, Closure where)
           
DataSet(Sql sql, java.lang.Class type)
           
DataSet(Sql sql, java.lang.String table)
           
 
Method Summary
 void add(java.util.Map values)
           
 DataSet createView(Closure criteria)
           
 void each(Closure closure)
           
 DataSet findAll(Closure where)
           
 java.util.List getParameters()
           
 java.lang.String getSql()
           
protected  SqlWhereVisitor getSqlVisitor()
           
 
Methods inherited from class groovy.sql.Sql
asSql, call, call, call, close, closeResources, closeResources, commit, configure, createConnection, dataSet, dataSet, eachRow, eachRow, eachRow, execute, execute, execute, executeUpdate, executeUpdate, executeUpdate, findWhereKeyword, firstRow, firstRow, getConnection, getDataSource, getParameters, getUpdateCount, loadDriver, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, nullify, query, query, query, queryEach, queryEach, queryEach, rollback, rows, rows, setObject, setParameters, withStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

where

private Closure where

parent

private DataSet parent

table

private java.lang.String table

visitor

private SqlWhereVisitor visitor

sql

private java.lang.String sql

params

private java.util.List params
Constructor Detail

DataSet

public DataSet(Sql sql,
               java.lang.Class type)

DataSet

public DataSet(Sql sql,
               java.lang.String table)

DataSet

public DataSet(DataSet parent,
               Closure where)
Method Detail

add

public void add(java.util.Map values)
         throws java.sql.SQLException
Throws:
java.sql.SQLException

findAll

public DataSet findAll(Closure where)

each

public void each(Closure closure)
          throws java.sql.SQLException
Throws:
java.sql.SQLException

getSql

public java.lang.String getSql()

getParameters

public java.util.List getParameters()

getSqlVisitor

protected SqlWhereVisitor getSqlVisitor()

createView

public DataSet createView(Closure criteria)


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