Jacson

de.spieleck.app.jacson.source
Class SQLSource

java.lang.Object
  extended byde.spieleck.app.jacson.PluginBase
      extended byde.spieleck.app.jacson.source.GenericChunkSourceBase
          extended byde.spieleck.app.jacson.source.SQLSource
All Implemented Interfaces:
ConfigVerify.Acceptor, GenericJacsonChunkSource, JacsonChunkSource, JacsonReporting, JacsonStately

public class SQLSource
extends GenericChunkSourceBase

This class is a JacsonSource reading input from a database. It is a GenericSource so it can be configured.
$Id: SQLSource.java 15 2005-09-28 18:45:04Z pcs $

Since:
0.89
Author:
Patrick Carl

Field Summary
static java.lang.String COLUMN_SEPARATOR_DEFAULT
           
static java.lang.String COLUMN_SEPARATOR_NODE
           
static java.lang.String JDBC_DRIVER_NODE
           
static java.lang.String JDBC_URL_NODE
           
static java.lang.String PASSWORD_NODE
           
static java.lang.String QUERY_NODE
           
static java.lang.String READ_MODE_DEFAULT
           
static java.lang.String READ_MODE_NODE
           
static java.lang.String USER_NODE
           
 
Constructor Summary
SQLSource()
           
 
Method Summary
 boolean accept(ConfigNode node)
           
 void init(ConfigNode config)
          inits this Source using the given config node.
 java.lang.String message()
           
 java.lang.String nextChunk()
          Deliver a sequence of chunks (that is Strings).
 
Methods inherited from class de.spieleck.app.jacson.PluginBase
getRegReport, getRegState, registerReport, registerState, summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.spieleck.app.jacson.JacsonStately
registerState
 
Methods inherited from interface de.spieleck.app.jacson.JacsonReporting
registerReport, summary
 

Field Detail

QUERY_NODE

public static final java.lang.String QUERY_NODE
See Also:
Constant Field Values

JDBC_URL_NODE

public static final java.lang.String JDBC_URL_NODE
See Also:
Constant Field Values

JDBC_DRIVER_NODE

public static final java.lang.String JDBC_DRIVER_NODE
See Also:
Constant Field Values

USER_NODE

public static final java.lang.String USER_NODE
See Also:
Constant Field Values

PASSWORD_NODE

public static final java.lang.String PASSWORD_NODE
See Also:
Constant Field Values

READ_MODE_NODE

public static final java.lang.String READ_MODE_NODE
See Also:
Constant Field Values

READ_MODE_DEFAULT

public static final java.lang.String READ_MODE_DEFAULT
See Also:
Constant Field Values

COLUMN_SEPARATOR_NODE

public static final java.lang.String COLUMN_SEPARATOR_NODE
See Also:
Constant Field Values

COLUMN_SEPARATOR_DEFAULT

public static final java.lang.String COLUMN_SEPARATOR_DEFAULT
See Also:
Constant Field Values
Constructor Detail

SQLSource

public SQLSource()
Method Detail

init

public void init(ConfigNode config)
          throws JacsonConfigException
inits this Source using the given config node.
The following settings are used: This source needs the corresponding JDBC driver within the classpath.

Throws:
JacsonConfigException

accept

public boolean accept(ConfigNode node)

message

public java.lang.String message()

nextChunk

public java.lang.String nextChunk()
                           throws JacsonException
Description copied from interface: JacsonChunkSource
Deliver a sequence of chunks (that is Strings).

Returns:
The next String if available, null if sequence is finished.
Throws:
JacsonException

Spieleck

Copyleft 2002 spieleck.de.