org.apache.cocoon.processor.sql
Class SQLProcessor

java.lang.Object
  |
  +--org.apache.cocoon.framework.AbstractActor
        |
        +--org.apache.cocoon.processor.sql.SQLProcessor

public class SQLProcessor
extends AbstractActor
implements Processor, Status

A processor that performs SQL database queries.

Version:
$Revision: 1.11 $ $Date: 1999/10/26 16:20:38 $
Author:
Donald Ball

Inner Class Summary
protected  class SQLProcessor.Column
          A class to hold SQL column information
 
Field Summary
protected static int ATTRIBUTE_NULLS
          Print null columns with NULL attribute
protected static SQLQueryCreator default_query_creator
          The default query creator, does {@...} substitution
protected static java.util.Hashtable drivers
          A table of already instantiated drivers to avoid memory leak on stupid JVM implementations
protected static int OMIT_NULLS
          Omit null columns
protected static java.util.Hashtable query_creators
          A table of already instantiated creators for the same rason
 
Fields inherited from class org.apache.cocoon.framework.AbstractActor
director
 
Constructor Summary
SQLProcessor()
           
 
Method Summary
protected  SQLProcessor.Column[] getColumns(java.sql.ResultSetMetaData md, java.lang.String tag_case)
           
protected static int getIntProperty(java.util.Properties props, java.lang.String name, int def)
           
 java.lang.String getStatus()
          Returns information about the status of the implementing class.
 boolean hasChanged(java.lang.Object context)
          Right now, always return true.
 org.w3c.dom.Document process(org.w3c.dom.Document document, java.util.Dictionary parameters)
          Process the DOM tree.
protected  void processQuery(org.w3c.dom.Document document, java.util.Dictionary parameters, org.w3c.dom.Element query_element, java.util.Properties query_props, java.sql.Connection conn)
          Process a single query node
 
Methods inherited from class org.apache.cocoon.framework.AbstractActor
init
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

drivers

protected static java.util.Hashtable drivers
A table of already instantiated drivers to avoid memory leak on stupid JVM implementations

query_creators

protected static java.util.Hashtable query_creators
A table of already instantiated creators for the same rason

default_query_creator

protected static SQLQueryCreator default_query_creator
The default query creator, does {@...} substitution

OMIT_NULLS

protected static final int OMIT_NULLS
Omit null columns

ATTRIBUTE_NULLS

protected static final int ATTRIBUTE_NULLS
Print null columns with NULL attribute
Constructor Detail

SQLProcessor

public SQLProcessor()
Method Detail

process

public org.w3c.dom.Document process(org.w3c.dom.Document document,
                                    java.util.Dictionary parameters)
                             throws java.lang.Exception
Process the DOM tree.
Specified by:
process in interface Processor

processQuery

protected void processQuery(org.w3c.dom.Document document,
                            java.util.Dictionary parameters,
                            org.w3c.dom.Element query_element,
                            java.util.Properties query_props,
                            java.sql.Connection conn)
                     throws java.lang.Exception
Process a single query node

hasChanged

public boolean hasChanged(java.lang.Object context)
Right now, always return true. How else do we handle this?

getStatus

public java.lang.String getStatus()
Description copied from interface: Status
Returns information about the status of the implementing class. Note: this is use instead of the usual toString() method because some of these methods are declared final in some classes in JDK 1.1.
Specified by:
getStatus in interface Status

getColumns

protected SQLProcessor.Column[] getColumns(java.sql.ResultSetMetaData md,
                                           java.lang.String tag_case)
                                    throws java.sql.SQLException

getIntProperty

protected static int getIntProperty(java.util.Properties props,
                                    java.lang.String name,
                                    int def)


Copyright 1999 Java Apache Project. All Rights Reserved.