Overview | Package | Class | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cocoon.processor.sql
Class SQLProcessor

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

All Implemented Interfaces:
  Actor, Changeable, Processor, Status

public class SQLProcessor
extends AbstractActor
implements Processor, Status

A processor that performs SQL database queries.

Version:
  $Revision: 1.13 $ $Date: 2000/06/07 19:45:50 $
Author:
  Donald Ball

Field Summary
`protected static int` | `ATTRIBUTE_NULLS` Print null columns with NULL attribute
`protected static QueryCreator` | `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 org.apache.cocoon.processor.sql.Column[]` | `getColumns(java.sql.ResultSetMetaData md, java.lang.String tag_case)`
`static java.lang.String` | `getCountQuery(java.lang.String query)`
`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, toString, wait, wait, wait`

Methods inherited from interface org.apache.cocoon.framework.Actor
`init`

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 QueryCreator 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?
  Specified by:
    `hasChanged` in interface `Changeable`

### 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 org.apache.cocoon.processor.sql.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)

### getCountQuery

    public static java.lang.String getCountQuery(java.lang.String query)

Overview | Package | Class | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.