org.culturegraph.mf.sql.sink
Class SqlStatementSink

java.lang.Object
  extended by org.culturegraph.mf.framework.DefaultLifeCycle
      extended by org.culturegraph.mf.framework.DefaultObjectReceiver<String>
          extended by org.culturegraph.mf.sql.sink.SqlStatementSink
All Implemented Interfaces:
org.culturegraph.mf.framework.LifeCycle, org.culturegraph.mf.framework.ObjectReceiver<String>, org.culturegraph.mf.framework.Receiver

@Description(value="Executes the received string object as an SQL statement.")
@In(value=java.lang.String.class)
public final class SqlStatementSink
extends org.culturegraph.mf.framework.DefaultObjectReceiver<String>

Executes the received string object as an SQL statement. Any result sets which may be produced by executing the statement are discarded. Use SqlStatementPipe if access to the result sets is required. In many situations it can be preferable to use prepared statements instead of raw SQL statements. Use in such situations.

Author:
Christoph Böhme
See Also:
SqlStatementPipe, SqlStreamSink

Constructor Summary
SqlStatementSink(Connection connection)
           
SqlStatementSink(String datasource)
           
 
Method Summary
 void closeStream()
           
 void process(String sql)
           
 
Methods inherited from class org.culturegraph.mf.framework.DefaultLifeCycle
resetStream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.culturegraph.mf.framework.LifeCycle
resetStream
 

Constructor Detail

SqlStatementSink

public SqlStatementSink(String datasource)

SqlStatementSink

public SqlStatementSink(Connection connection)
Method Detail

process

public void process(String sql)
Specified by:
process in interface org.culturegraph.mf.framework.ObjectReceiver<String>
Overrides:
process in class org.culturegraph.mf.framework.DefaultObjectReceiver<String>

closeStream

public void closeStream()
Specified by:
closeStream in interface org.culturegraph.mf.framework.LifeCycle
Overrides:
closeStream in class org.culturegraph.mf.framework.DefaultLifeCycle


Copyright © 2014. All Rights Reserved.