balld       01/05/18 11:55:05

  Modified:    src/org/apache/cocoon/acting AbstractDatabaseAction.java
                        DatabaseAddAction.java
  Log:
  heavy duty patch. notable changes:
  
  1. the image attribute pseudotypes no longer rely on "unused" jdbc sql types
  2. you can add multiple rows to multiple tables.
  3. javadocs have been added for many methods
  4. yell at me if it breaks anything for you
  
  Revision  Changes    Path
  1.2       +146 -79   
xml-cocoon2/src/org/apache/cocoon/acting/AbstractDatabaseAction.java
  
  Index: AbstractDatabaseAction.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/acting/AbstractDatabaseAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractDatabaseAction.java       2001/05/09 20:50:04     1.1
  +++ AbstractDatabaseAction.java       2001/05/18 18:55:02     1.2
  @@ -172,7 +172,8 @@
    * </table>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2001/05/09 20:50:04 $
  + * @author <a href="mailto:[EMAIL PROTECTED]">Donald Ball</a>
  + * @version CVS $Revision: 1.2 $ $Date: 2001/05/18 18:55:02 $
    */
   public abstract class AbstractDatabaseAction extends 
AbstractComplementaryConfigurableAction implements Configurable, Disposable {
       protected Map files = new HashMap();
  @@ -180,8 +181,10 @@
       protected ComponentSelector dbselector;
   
       static {
  +        /** Initialize the map of type names to jdbc column types.
  +            Note that INTEGER and BLOB column types map to more than one
  +            type name. **/
           Map constants = new HashMap();
  -
           constants.put("ascii", new Integer(Types.CLOB));
           constants.put("big-decimal", new Integer(Types.BIGINT));
           constants.put("binary", new Integer(Types.BLOB));
  @@ -196,11 +199,14 @@
           constants.put("time", new Integer(Types.TIME));
           constants.put("time-stamp", new Integer(Types.TIMESTAMP));
           constants.put("now", new Integer(Types.OTHER));
  -        constants.put("image", new Integer(Types.DISTINCT));
  -        constants.put("image-width", new Integer(Types.ARRAY));
  -        constants.put("image-height", new Integer(Types.BIT));
  -        constants.put("image-size", new Integer(Types.CHAR));
  -
  +        //constants.put("image", new Integer(Types.DISTINCT));
  +        //constants.put("image-width", new Integer(Types.ARRAY));
  +        //constants.put("image-height", new Integer(Types.BIT));
  +        //constants.put("image-size", new Integer(Types.CHAR));
  +        constants.put("image",new Integer(Types.BLOB));
  +        constants.put("image-width",new Integer(Types.INTEGER));
  +        constants.put("image-height",new Integer(Types.INTEGER));
  +        constants.put("image-size",new Integer(Types.INTEGER));
           typeConstants = Collections.unmodifiableMap(constants);
       }
   
  @@ -308,25 +314,63 @@
   
       /**
        * Set the Statement column so that the results are mapped correctly.
  +     * The name of the parameter is retrieved from the configuration object.
  +     *
  +     * @param statement the prepared statement
  +     * @param position the position of the column
  +     * @param request the request
  +     * @param entry the configuration object
        */
       protected void setColumn(PreparedStatement statement, int position, 
Request request, Configuration entry)
       throws Exception {
  -        Integer typeObject = (Integer) 
AbstractDatabaseAction.typeConstants.get(entry.getAttribute("type"));
  -
  -        if (typeObject == null) {
  -            throw new SQLException("Can't set column because the type is 
invalid");
  -        }
  -
  -        String attribute = entry.getAttribute("param", "");
  -        Object value = request.getParameter(attribute);
  +        
setColumn(statement,position,request,entry,entry.getAttribute("param",""));
  +    }
   
  -        if (value == null) value = request.getAttribute(attribute);
  -        if (value == null) value = request.get(attribute);
  +    /**
  +     * Set the Statement column so that the results are mapped correctly. The
  +     * value of the column is retrieved from the request object. If the
  +     * named parameter exists in the request object's parameters, that value 
  +     * is used. Otherwise if the named parameter exists in the request 
object's
  +     * attributes, that value is used. Otherwise the request object is
  +     * retrieved using Request.get(attribute), which is documented to be the
  +     * same as Request.getAttribute(attribute), so something weird must be
  +     * going on.
  +     *
  +     * @param statement the prepared statement
  +     * @param position the position of the column
  +     * @param request the request
  +     * @param entry the configuration object
  +     * @param param the name of the request parameter
  +     */
  +    protected void setColumn(PreparedStatement statement, int position, 
Request request, Configuration entry, String param)
  +    throws Exception {
  +        Object value = request.getParameter(param);
  +        if (value == null) value = request.getAttribute(param);
  +        if (value == null) value = request.get(param);
  +        setColumn(statement,position,request,entry,param,value);
  +    }
   
  +    /**
  +     * Set the Statement column so that the results are mapped correctly.
  +     *
  +     * @param statement the prepared statement
  +     * @param position the position of the column
  +     * @param request the request
  +     * @param entry the configuration object
  +     * @param param the name of the request parameter
  +     * @param value the value of the column
  +     */
  +    protected void setColumn(PreparedStatement statement, int position, 
Request request, Configuration entry, String param, Object value) throws 
Exception {
  +        getLogger().debug("Setting column "+position+" named "+param+" with 
value "+value);
           if (value instanceof String) {
               value = ((String) value).trim();
           }
  -
  +        String typeName = entry.getAttribute("type");
  +        Integer typeObject = (Integer) 
AbstractDatabaseAction.typeConstants.get(typeName);
  +        if (typeObject == null) {
  +            throw new SQLException("Can't set column because the type 
"+typeName+" is unrecognized");
  +        }
  +        /*
           if (value == null || "".equals(value)) {
               switch (typeObject.intValue()) {
                   case Types.DISTINCT:
  @@ -348,8 +392,33 @@
                       return;
               }
           }
  +        */
  +        if (value == null) {
  +            /** If the value is null, set the column value null and return 
**/
  +            statement.setNull(position, typeObject.intValue());
  +            return;
  +        }
  +        if ("".equals(value)) {
  +            switch (typeObject.intValue()) {
  +                case Types.CHAR:
  +                case Types.CLOB:
  +                case Types.VARCHAR:
  +                    /** If the value is an empty string and the column is
  +                        a string type, we can continue **/
  +                    break;
  +                default:
  +                    /** If the value is an empty string and the column
  +                        is something else, we treat it as a null value **/
  +                    statement.setNull(position, typeObject.intValue());
  +                    return;
  +            }
  +        }
   
  -        request.setAttribute(attribute, value);
  +        /** Store the column value in the request attribute
  +            keyed by the request parameter name. we do this so possible 
future
  +            actions can access this data. not sure about the key tho... **/
  +        request.setAttribute(param, value);
  +        File file;
   
           switch (typeObject.intValue()) {
               case Types.CLOB:
  @@ -379,11 +448,6 @@
   
                   statement.setBigDecimal(position, bd);
                   break;
  -            case Types.BLOB:
  -                File binaryFile = (File) value;
  -                InputStream binaryStream = new BufferedInputStream(new 
FileInputStream(binaryFile));
  -                statement.setBinaryStream(position, binaryStream, (int) 
binaryFile.length());
  -                break;
               case Types.TINYINT:
                   Byte b = null;
   
  @@ -431,17 +495,6 @@
   
                   statement.setFloat(position, f.floatValue());
                   break;
  -            case Types.INTEGER:
  -                Integer i = null;
  -
  -                if (value instanceof Integer) {
  -                    i = (Integer) value;
  -                } else {
  -                    i = new Integer((String) value);
  -                }
  -
  -                statement.setInt(position, i.intValue());
  -                break;
               case Types.NUMERIC:
                   Long l = null;
   
  @@ -488,54 +541,68 @@
                   break;
               case Types.OTHER:
                   statement.setTimestamp(position, new Timestamp((new 
java.util.Date()).getTime()));
  -                break;
  -            case Types.DISTINCT:
  -                // Upload an image (just like binary), but cache attributes
  -                Parameters param = new Parameters();
  -                File imageFile = (File) value;
  -                InputStream imageStream = new BufferedInputStream(new 
FileInputStream(imageFile));
  -                statement.setBinaryStream(position, imageStream, (int) 
imageFile.length());
  -
  -                param.setParameter("image-size", 
Long.toString(imageFile.length()));
  -
  -                int [] dimensions = 
ImageDirectoryGenerator.getSize(imageFile);
  -                param.setParameter("image-width", 
Integer.toString(dimensions[0]));
  -                param.setParameter("image-height", 
Integer.toString(dimensions[1]));
  -
  -                synchronized (this.files) {
  -                    this.files.put(imageFile, param);
  -                }
  -                break;
  -            case Types.ARRAY:
  -                // Grab the image-width attribute from the cached attributes
  -                String imageAttr = attribute.substring(0, 
(attribute.length() - "-width".length()));
  -                imageFile = (File) request.get(imageAttr);
  -                synchronized (this.files) {
  -                    param = (Parameters) this.files.get(imageFile);
  -                    statement.setInt(position, 
param.getParameterAsInteger("image-width", -1));
  -                    request.setAttribute(attribute, 
param.getParameter("image-width", ""));
  -                }
                   break;
  -            case Types.BIT:
  -                // Grab the image-height attribute from the cached attributes
  -                imageAttr = attribute.substring(0, (attribute.length() - 
"-height".length()));
  -                imageFile = (File) request.get(imageAttr);
  -                synchronized (this.files) {
  -                    param = (Parameters) this.files.get(imageFile);
  -                    statement.setInt(position, 
param.getParameterAsInteger("image-height", -1));
  -                    request.setAttribute(attribute, 
param.getParameter("image-height", ""));
  +            case Types.BLOB:
  +                file = (File)value;
  +                InputStream input = new BufferedInputStream(new 
FileInputStream(file));
  +                statement.setBinaryStream(position, input, 
(int)file.length());
  +                if ("image".equals(typeName)) {
  +                    /** If this column type is an image, store the
  +                        size, width, and height in a static table **/
  +                    Parameters parameters = new Parameters();
  +                    parameters.setParameter("image-size", 
Long.toString(file.length()));
  +                    int [] dimensions = 
ImageDirectoryGenerator.getSize(file);
  +                    parameters.setParameter("image-width", 
Integer.toString(dimensions[0]));
  +                    parameters.setParameter("image-height", 
Integer.toString(dimensions[1]));
  +                    synchronized (this.files) {
  +                        this.files.put(file, parameters);
  +                    }
                   }
                   break;
  -            case Types.CHAR:
  -                // Grab the image-size attribute from the cached attributes
  -                imageAttr = attribute.substring(0, (attribute.length() - 
"-size".length()));
  -                imageFile = (File) request.get(imageAttr);
  -                synchronized (this.files) {
  -                    param = (Parameters) this.files.get(imageFile);
  -                    statement.setInt(position, 
param.getParameterAsInteger("image-size", -1));
  -                    request.setAttribute(attribute, 
param.getParameter("image-size", ""));
  +            case Types.INTEGER:
  +                if ("int".equals(typeName)) {
  +                    Integer i = null;
  +                    if (value instanceof Integer) {
  +                        i = (Integer) value;
  +                    } else {
  +                        i = new Integer((String) value);
  +                    }
  +                    statement.setInt(position, i.intValue());
  +                    break;
  +                } else if ("image-width".equals(typeName)) {
  +                    /** Get the image width from the cached image data **/
  +                    /** Is this why we store the values in the request
  +                        attributes? **/
  +                    String imageAttr = param.substring(0, (param.length() - 
"-width".length()));
  +                    file = (File) request.get(imageAttr);
  +                    synchronized (this.files) {
  +                        Parameters parameters = (Parameters) 
this.files.get(file);
  +                        statement.setInt(position, 
parameters.getParameterAsInteger("image-width", -1));
  +                        /** Store the image width in the request attributes.
  +                            Why do we do this? **/
  +                        request.setAttribute(param, 
parameters.getParameter("image-width", ""));
  +                    }
  +                } else if ("image-height".equals(typeName)) {
  +                    /** Get the image height from the cached image data **/
  +                    String imageAttr = param.substring(0, (param.length() - 
"-height".length()));
  +                    file = (File) request.get(imageAttr);
  +                    synchronized (this.files) {
  +                        Parameters parameters = (Parameters) 
this.files.get(file);
  +                        statement.setInt(position, 
parameters.getParameterAsInteger("image-height", -1));
  +                        request.setAttribute(param, 
parameters.getParameter("image-height", ""));
  +                    }
  +                } else if ("image-size".equals(typeName)) {
  +                    /** Get the image file size from the cached image data 
**/
  +                    String imageAttr = param.substring(0, (param.length() - 
"-size".length()));
  +                    file = (File) request.get(imageAttr);
  +                    synchronized (this.files) {
  +                        Parameters parameters = (Parameters) 
this.files.get(file);
  +                        statement.setInt(position, 
parameters.getParameterAsInteger("image-size", -1));
  +                        request.setAttribute(param, 
parameters.getParameter("image-size", ""));
  +                    }
                   }
  -                break;
  +            default:
  +                throw new SQLException("Impossible exception - invalid type 
"+typeName);
           }
       }
   
  
  
  
  1.2       +163 -45   
xml-cocoon2/src/org/apache/cocoon/acting/DatabaseAddAction.java
  
  Index: DatabaseAddAction.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/acting/DatabaseAddAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DatabaseAddAction.java    2001/05/09 20:50:05     1.1
  +++ DatabaseAddAction.java    2001/05/18 18:55:03     1.2
  @@ -16,6 +16,7 @@
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
  +import java.util.Enumeration;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.configuration.Configurable;
  @@ -31,11 +32,15 @@
   import org.xml.sax.EntityResolver;
   
   /**
  - * Add a record in a database.  This Action assumes that there is
  - * only one table at a time to update.
  + * Adds record in a database. The action can update one or more tables,
  + * and can add more than one row to a table at a time. The form descriptor
  + * semantics for this are still in a bit of a state of flux. Note
  + * that if a secondary table relies on the value of a new primary key in a 
  + * primary table, the primary key must be created using manual mode.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2001/05/09 20:50:05 $
  + * @author <a href="mailto:[EMAIL PROTECTED]">Donald Ball</a>
  + * @version CVS $Revision: 1.2 $ $Date: 2001/05/18 18:55:03 $
    */
   public class DatabaseAddAction extends AbstractDatabaseAction {
       protected static final Map addStatements = new HashMap();
  @@ -49,11 +54,9 @@
       public Map act(EntityResolver resolver, Map objectModel, String source, 
Parameters param) throws Exception {
           DataSourceComponent datasource = null;
           Connection conn = null;
  -        int currentIndex = 0;
   
           try {
               Configuration conf = 
this.getConfiguration(param.getParameter("form-descriptor", null));
  -            String query = this.getAddQuery(conf);
   
               datasource = this.getDataSource(conf);
               conn = datasource.getConnection();
  @@ -63,40 +66,12 @@
                   conn.setAutoCommit(false);
               }
   
  -            PreparedStatement statement = conn.prepareStatement(query);
  -
  -            Configuration[] keys = 
conf.getChild("table").getChild("keys").getChildren("key");
  -            Configuration[] values = 
conf.getChild("table").getChild("values").getChildren("value");
  -            currentIndex = 1;
  -
  -            for (int i = 0; i < keys.length; i++) {
  -                String mode = keys[i].getAttribute("mode", "automatic");
  -
  -                if ("manual".equals(mode)) {
  -                    String selectQuery = this.getSelectQuery(keys[i]);
  -                    PreparedStatement select_statement = 
conn.prepareStatement(selectQuery);
  -                    ResultSet set = select_statement.executeQuery();
  -                    set.next();
  -                    int value = set.getInt("maxid") + 1;
  -
  -                    statement.setInt(currentIndex, value);
  -
  -                    set.close();
  -                    select_statement.close();
  -                    currentIndex++;
  -                } else if ("form".equals(mode)) {
  -                    this.setColumn(statement, currentIndex, request, 
values[i]);
  -                    currentIndex++;
  -                }
  -            }
  -
  -            for (int i = 0; i < values.length; i++, currentIndex++) {
  -                this.setColumn(statement, currentIndex, request, values[i]);
  +            Configuration[] tables = conf.getChildren("table");
  +            for (int i=0; i<tables.length; i++) {
  +              Configuration table = tables[i];
  +              processTable(table,conn,request);
               }
  -
  -            statement.execute();
               conn.commit();
  -            statement.close();
           } catch (Exception e) {
               if (conn != null) {
                   try {
  @@ -106,7 +81,8 @@
                   }
               }
   
  -            throw new ProcessingException("Could not add record :position = 
" + currentIndex, e);
  +            //throw new ProcessingException("Could not add record :position 
= " + currentIndex, e);
  +            throw new ProcessingException("Could not add record",e);
           } finally {
               if (conn != null) {
                   try {
  @@ -123,18 +99,160 @@
       }
   
       /**
  +     * Inserts a row or a set of rows into the given table based on the
  +     * request parameters
  +     *
  +     * @param table the table's configuration
  +     * @param conn the database connection
  +     * @param request the request
  +     */
  +    void processTable(Configuration table, Connection conn, Request request) 
throws SQLException,ConfigurationException,Exception {
  +      PreparedStatement statement = null;
  +      try {
  +        String query = this.getAddQuery(table);
  +        getLogger().debug("Add query: "+query);
  +        statement = conn.prepareStatement(query);
  +        Configuration[] keys = table.getChild("keys").getChildren("key");
  +        Configuration[] values = 
table.getChild("values").getChildren("value");
  +        int currentIndex = 1;
  +        boolean manyrows = false;
  +        int wildcardIndex = -1;
  +        String wildcardParam = null;
  +        for (int i=0; i<keys.length; i++) {
  +          wildcardParam = keys[i].getAttribute("param");
  +          if ((wildcardIndex = wildcardParam.indexOf('*')) != -1) {
  +            manyrows = true;
  +            break;
  +          }
  +        }
  +        if (manyrows) {
  +          /**
  +           * This table has a column with a wildcard, so we're going
  +           * to be inserting n rows, where 0 <= n
  +           */
  +          String prefix = wildcardParam.substring(0,wildcardIndex);
  +          String suffix = wildcardParam.substring(wildcardIndex+1);
  +          Enumeration names = request.getParameterNames();
  +          while (names.hasMoreElements()) {
  +            String name = (String)names.nextElement();
  +            if (name.startsWith(prefix) && name.endsWith(suffix)) {
  +              String wildcard = name.substring(prefix.length());
  +              wildcard = 
wildcard.substring(0,wildcard.length()-suffix.length());
  +              currentIndex = 1;
  +              for (int j=0; j<keys.length; j++) {
  +                String myparam = 
getActualParam(keys[j].getAttribute("param"),wildcard);
  +                currentIndex += 
setKey(table,keys[j],conn,statement,currentIndex,request,myparam);
  +              }
  +              for (int j=0; j<values.length; j++) {
  +                String myparam = 
getActualParam(values[j].getAttribute("param"),wildcard);
  +                
this.setColumn(statement,currentIndex,request,values[j],myparam,request.getParameter(myparam));
  +                currentIndex++;
  +              }
  +              statement.execute();
  +            }
  +          }
  +        } else {
  +          /**
  +           * This table has no wildcard columns, so we're going to
  +           * be inserting 1 row.
  +           */
  +          for (int i = 0; i < keys.length; i++) {
  +            currentIndex += 
setKey(table,keys[i],conn,statement,currentIndex,request,keys[i].getAttribute("param",""));
  +          }
  +          for (int i = 0; i < values.length; i++, currentIndex++) {
  +            this.setColumn(statement, currentIndex, request, values[i]);
  +          }
  +          statement.execute();
  +          /** Done processing table **/
  +        }
  +      } finally {
  +        try {
  +          if (statement != null) {
  +            statement.close();
  +          }
  +        } catch (SQLException e) {}
  +      }
  +    }
  +
  +    /**
  +     * Sets the key value on the prepared statement and store the value in
  +     * the request object's attributes for use by other inserts.
  +     *
  +     * @param table the table's configuration object
  +     * @param key the key's configuration object
  +     * @param conn the database connection
  +     * @param statement the insert statement
  +     * @param currentIndex the position of the key column
  +     * @param request the request object
  +     * @param param the actual name of the request parameter
  +     * @return the number of columns by which to increment the currentIndex
  +     */
  +    int setKey(Configuration table, Configuration key, Connection conn, 
PreparedStatement statement, int currentIndex, Request request, String param) 
throws ConfigurationException, SQLException,Exception {
  +      String mode = key.getAttribute("mode","automatic");
  +      String attribute_name = 
"key:"+table.getAttribute("name")+':'+key.getAttribute("dbcol");
  +      if ("manual".equals(mode)) {
  +        /** Set the key value using SELECT MAX(keyname)+1 **/
  +        String selectQuery = this.getSelectQuery(key);
  +        PreparedStatement select_statement = 
conn.prepareStatement(selectQuery);
  +        ResultSet set = select_statement.executeQuery();
  +        set.next();
  +        int value = set.getInt("maxid") + 1;
  +        statement.setInt(currentIndex, value);
  +        getLogger().debug("Manually setting key to "+value);
  +        request.setAttribute(attribute_name,new Integer(value));
  +        set.close();
  +        select_statement.close();
  +        return 1;
  +      } else if ("form".equals(mode)) {
  +        /** Set the key value from the request **/
  +        getLogger().debug("Setting key from form");
  +        this.setColumn(statement, currentIndex, request, key, param);
  +        return 1;
  +      } else if ("request-attribute".equals(mode)) {
  +        Integer value = 
(Integer)request.getAttribute(key.getAttribute("request-attribute-name"));
  +        getLogger().debug("Setting key from request attribute "+value);
  +        statement.setInt(currentIndex,value.intValue());
  +        return 1;
  +      } else {
  +        getLogger().debug("Automatically setting key");
  +        /** The database automatically creates a key value **/
  +        return 0;
  +      }
  +    }
  +
  +    /**
  +     * Returns the actual name of the parameter. If the name contains
  +     * no wildcard, the param is returned untouched, otherwise the
  +     * wildcard value is substituted for the * character. This probably
  +     * doesn't deserve a method unto itself, but I can imagine wanting
  +     * to use a more sophisticated matching and substitution algorithm.
  +     *
  +     * @param param the name of the parameter, possibly with a wildcard char
  +     * @param wildcard the wildcard value
  +     * @return the actual name of the parameter
  +     */
  +    String getActualParam(String param, String wildcard) {
  +      int index;
  +      if ((index = param.indexOf('*')) != -1) {
  +        return param.substring(0,index)+wildcard+param.substring(index+1);
  +      } else {
  +        return param;
  +      }
  +    }
  +
  +    /**
        * Get the String representation of the PreparedStatement.  This is
        * mapped to the Configuration object itself, so if it doesn't exist,
        * it will be created.
  +     *
  +     * @param table the table's configuration object
  +     * @return the insert query as a string
        */
  -    protected String getAddQuery(Configuration conf) throws 
ConfigurationException {
  +    protected String getAddQuery(Configuration table) throws 
ConfigurationException {
           String query = null;
  -
           synchronized (DatabaseAddAction.addStatements) {
  -            query = (String) DatabaseAddAction.addStatements.get(conf);
  -
  +            query = (String) DatabaseAddAction.addStatements.get(table);
               if (query == null) {
  -                Configuration table = conf.getChild("table");
                   Configuration[] values = 
table.getChild("values").getChildren("value");
                   Configuration[] keys = 
table.getChild("keys").getChildren("key");
   
  @@ -146,7 +264,7 @@
   
                   for (int i = 0; i < keys.length; i++) {
                       String mode = keys[i].getAttribute("mode", "automatic");
  -                    if ("manual".equals(mode) || "form".equals(mode)) {
  +                    if ("manual".equals(mode) || "form".equals(mode) || 
"request-attribute".equals(mode)) {
                           if (i > 0) {
                               queryBuffer.append(", ");
                           }
  @@ -184,7 +302,7 @@
   
                   query = queryBuffer.toString();
   
  -                DatabaseAddAction.addStatements.put(conf, query);
  +                DatabaseAddAction.addStatements.put(table, query);
               }
           }
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to