avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From froehl...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser BasicSQLParserManager.java BasicLXSQLParserManager.java
Date Mon, 17 Dec 2001 16:00:00 GMT
froehlich    01/12/17 08:00:00

  Modified:    apps/db/src/java/org/apache/avalon/db/basic/parser
                        BasicSQLParserManager.java
                        BasicLXSQLParserManager.java
  Log:
  create, insert, select + criteria is working 90%
  
  Revision  Changes    Path
  1.6       +34 -16    jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicSQLParserManager.java
  
  Index: BasicSQLParserManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicSQLParserManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BasicSQLParserManager.java	2001/12/15 18:50:13	1.5
  +++ BasicSQLParserManager.java	2001/12/17 16:00:00	1.6
  @@ -1,35 +1,53 @@
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + *  Copyright (C) The Apache Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  - * version 1.1, a copy of which has been included with this distribution in
  - * the LICENSE file.
  + *  This software is published under the terms of the Apache Software License
  + *  version 1.1, a copy of which has been included with this distribution in
  + *  the LICENSE file.
    */
   package org.apache.avalon.db.basic.parser;
   
  -import org.apache.avalon.db.server.sql.AbstractSQLParser;
  -import org.apache.avalon.db.server.AbstractRequestHandler;
  -import org.apache.avalon.db.transport.Request;
   import org.apache.avalon.db.actions.Action;
   import org.apache.avalon.db.actions.ActionException;
  -import org.apache.avalon.db.basic.handlers.sql.BasicSQLSelectSimpleHandler;
   import org.apache.avalon.db.basic.handlers.sql.BasicSQLCreateTableHandler;
  +import org.apache.avalon.db.basic.handlers.sql.BasicSQLInsertRowsHandler;
  +import org.apache.avalon.db.basic.handlers.sql.BasicSQLSelectSimpleHandler;
  +import org.apache.avalon.db.server.AbstractRequestHandler;
  +import org.apache.avalon.db.server.sql.AbstractSQLParser;
  +import org.apache.avalon.db.transport.Request;
   
   /**
  - * Class BasicSQLParserManager
  + *  Class BasicSQLParserManager
    *
  - * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">g-froehlich@gmx.de</a>
  + * @author     Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">
  + *      g-froehlich@gmx.de</a>
  + * @version
    */
   public class BasicSQLParserManager extends AbstractSQLParser {
   
  -    protected void getCustomRequestHandlers(AbstractRequestHandler[] handlers) {
  -        handlers[Request.CREATETABLE] = new BasicSQLCreateTableHandler(this,mDatabasePersistor);
  -        handlers[Request.SELECTSIMPLE] = new BasicSQLSelectSimpleHandler(this,mDatabasePersistor);
  -    }
  -
  -    public void initializeAction(Action action) throws ActionException {
  +    /**
  +     *  Description of the Method
  +     *
  +     * @param  action               Description of Parameter
  +     * @exception  ActionException  Description of Exception
  +     */
  +    public void initializeAction(Action action)
  +        throws ActionException {
           action.setDatabasePersistor(mDatabasePersistor);
           setupLogger(action);
           action.initialize();
       }
  +
  +    /**
  +     *  Gets the customRequestHandlers attribute of the BasicSQLParserManager
  +     *  object
  +     *
  +     * @param  handlers  Description of Parameter
  +     */
  +    protected void getCustomRequestHandlers(AbstractRequestHandler[] handlers) {
  +        handlers[Request.CREATETABLE] = new BasicSQLCreateTableHandler(this, mDatabasePersistor);
  +        handlers[Request.INSERTROWS] = new BasicSQLInsertRowsHandler(this, mDatabasePersistor);
  +        handlers[Request.SELECTSIMPLE] = new BasicSQLSelectSimpleHandler(this, mDatabasePersistor);
  +    }
   }
  +
  
  
  
  1.3       +53 -41    jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicLXSQLParserManager.java
  
  Index: BasicLXSQLParserManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicLXSQLParserManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BasicLXSQLParserManager.java	2001/12/03 17:37:05	1.2
  +++ BasicLXSQLParserManager.java	2001/12/17 16:00:00	1.3
  @@ -1,63 +1,75 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + *  Copyright (C) The Apache Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  - * version 1.1, a copy of which has been included with this distribution in
  - * the LICENSE file.
  + *  This software is published under the terms of the Apache Software License
  + *  version 1.1, a copy of which has been included with this distribution in
  + *  the LICENSE file.
    */
   package org.apache.avalon.db.basic.parser;
  -
  -import org.apache.avalon.db.server.lxsql.AbstractLXSQLParser;
  -import org.apache.avalon.db.server.AbstractRequestHandler;
  -import org.apache.avalon.db.server.stdhandlers.PingHandler;
  -import org.apache.avalon.db.server.stdhandlers.CatalogHandler;
  -import org.apache.avalon.db.server.stdhandlers.EstablishConnectionHandler;
  -import org.apache.avalon.db.transport.Request;
  +import org.apache.avalon.db.actions.Action;
  +import org.apache.avalon.db.actions.ActionException;
  +import org.apache.avalon.db.basic.handlers.BasicCloseResultSetHandler;
  +import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLCreateAggregateViewHandler;
  +import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLCreateIndexHandler;
   import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLCreateTableHandler;
   import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLCreateViewHandler;
  -import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLCreateIndexHandler;
   import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLDeleteRowsHandler;
  +import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLDropIndexHandler;
  +import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLDropTableHandler;
  +import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLDropViewHandler;
   import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLInsertRowsHandler;
   import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLSelectSimpleHandler;
   import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLUpdateRowsHandler;
  -import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLDropTableHandler;
  -import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLDropViewHandler;
  -import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLDropIndexHandler;
  -import org.apache.avalon.db.basic.handlers.lxsql.BasicLXSQLCreateAggregateViewHandler;
  -import org.apache.avalon.db.basic.handlers.BasicCloseResultSetHandler;
  -import org.apache.avalon.db.actions.Action;
  -import org.apache.avalon.db.actions.ActionException;
  -
  +import org.apache.avalon.db.server.AbstractRequestHandler;
  +import org.apache.avalon.db.server.lxsql.AbstractLXSQLParser;
  +import org.apache.avalon.db.server.stdhandlers.CatalogHandler;
  +import org.apache.avalon.db.server.stdhandlers.EstablishConnectionHandler;
  +import org.apache.avalon.db.server.stdhandlers.PingHandler;
  +import org.apache.avalon.db.transport.Request;
   
   /**
  - * Class BasicLXSQLParserManager
  + *  Class BasicLXSQLParserManager
    *
  - *
  - * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @author     Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">
  + *      Paul_Hammant@yahoo.com</a>
  + * @version    $Revision: 1.3 $
    */
   public class BasicLXSQLParserManager extends AbstractLXSQLParser {
   
  -    protected void getCustomRequestHandlers(AbstractRequestHandler[] handlers) {
  -
  -        handlers[Request.CREATETABLE] = new BasicLXSQLCreateTableHandler(this,mDatabasePersistor);
  -        handlers[Request.CREATEVIEW] = new BasicLXSQLCreateViewHandler(this,mDatabasePersistor);
  -        handlers[Request.CREATEAGGREGATEVIEW] = new BasicLXSQLCreateAggregateViewHandler(this,mDatabasePersistor);
  -        handlers[Request.CREATEINDEX] = new BasicLXSQLCreateIndexHandler(this,mDatabasePersistor);
  -        handlers[Request.DELETEROWS] = new BasicLXSQLDeleteRowsHandler(this,mDatabasePersistor);
  -        handlers[Request.INSERTROWS] = new BasicLXSQLInsertRowsHandler(this,mDatabasePersistor);
  -        handlers[Request.SELECTSIMPLE] = new BasicLXSQLSelectSimpleHandler(this,mDatabasePersistor);
  -        handlers[Request.UPDATEROWS] = new BasicLXSQLUpdateRowsHandler(this,mDatabasePersistor);
  -        handlers[Request.DROPTABLE] = new BasicLXSQLDropTableHandler(this,mDatabasePersistor);
  -        handlers[Request.DROPVIEW] = new BasicLXSQLDropViewHandler(this,mDatabasePersistor);
  -        handlers[Request.DROPINDEX] = new BasicLXSQLDropIndexHandler(this,mDatabasePersistor);
  -        handlers[Request.CLOSERESULTSET] = new BasicCloseResultSetHandler(mDatabasePersistor);
  -    }
  -
  -    public void initializeAction(Action action) throws ActionException {
  +    /**
  +     *  Description of the Method
  +     *
  +     * @param  action               Description of Parameter
  +     * @exception  ActionException  Description of Exception
  +     */
  +    public void initializeAction(Action action)
  +        throws ActionException {
           action.setDatabasePersistor(mDatabasePersistor);
           setupLogger(action);
           action.initialize();
       }
  +
  +    /**
  +     *  Gets the customRequestHandlers attribute of the BasicLXSQLParserManager
  +     *  object
  +     *
  +     * @param  handlers  Description of Parameter
  +     */
  +    protected void getCustomRequestHandlers(AbstractRequestHandler[] handlers) {
  +
  +        handlers[Request.CREATETABLE] = new BasicLXSQLCreateTableHandler(this, mDatabasePersistor);
  +        handlers[Request.CREATEVIEW] = new BasicLXSQLCreateViewHandler(this, mDatabasePersistor);
  +        handlers[Request.CREATEAGGREGATEVIEW] = new BasicLXSQLCreateAggregateViewHandler(this,
mDatabasePersistor);
  +        handlers[Request.CREATEINDEX] = new BasicLXSQLCreateIndexHandler(this, mDatabasePersistor);
  +        handlers[Request.DELETEROWS] = new BasicLXSQLDeleteRowsHandler(this, mDatabasePersistor);
  +        handlers[Request.INSERTROWS] = new BasicLXSQLInsertRowsHandler(this, mDatabasePersistor);
  +        handlers[Request.SELECTSIMPLE] = new BasicLXSQLSelectSimpleHandler(this, mDatabasePersistor);
  +        handlers[Request.UPDATEROWS] = new BasicLXSQLUpdateRowsHandler(this, mDatabasePersistor);
  +        handlers[Request.DROPTABLE] = new BasicLXSQLDropTableHandler(this, mDatabasePersistor);
  +        handlers[Request.DROPVIEW] = new BasicLXSQLDropViewHandler(this, mDatabasePersistor);
  +        handlers[Request.DROPINDEX] = new BasicLXSQLDropIndexHandler(this, mDatabasePersistor);
  +        handlers[Request.CLOSERESULTSET] = new BasicCloseResultSetHandler(mDatabasePersistor);
  +    }
   }
  +
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message