org.syrup.sql
Class ExecutionFunctions

java.lang.Object
  extended byorg.syrup.sql.Functions
      extended byorg.syrup.sql.ExecutionFunctions

public class ExecutionFunctions
extends Functions

Utility functions to execute Syrup PTasks using JDBC.

Author:
Robbert van Dalen

Constructor Summary
ExecutionFunctions(SQLImpl sqlImpl)
          Constructor for the ExecutionFunctions object
 
Method Summary
protected  PTask commit_result(Result r, SyrupConnection con)
          Commits the Result of an execution by executing SQL statements over a Connection.
protected  Context start(PTask pt, java.lang.String w, SyrupConnection con)
          Starts the execution of a PTask by executing SQL statements over a Connection.
 
Methods inherited from class org.syrup.sql.Functions
sqlImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionFunctions

public ExecutionFunctions(SQLImpl sqlImpl)
Constructor for the ExecutionFunctions object

Parameters:
sqlImpl - The SQLImpl that is held by the Function instance.
Method Detail

start

protected Context start(PTask pt,
                        java.lang.String w,
                        SyrupConnection con)
                 throws java.lang.Exception
Starts the execution of a PTask by executing SQL statements over a Connection. Returns the associated Context from the WorkSpace.

Parameters:
pt - The Ptask to be executed.
w - The Worker address (URL) that requested execution.
con - The SyrupConnection over which SQL statements are executed.
Returns:
The associated Context.
Throws:
java.lang.Exception

commit_result

protected PTask commit_result(Result r,
                              SyrupConnection con)
                       throws java.lang.Exception
Commits the Result of an execution by executing SQL statements over a Connection. Returns the executed PTask that produced the Result.

Parameters:
r - The Result to be commited.
con - The SyrupConnection over which SQL statements are executed.
Returns:
The executed PTask that produced the Result.
Throws:
java.lang.Exception