CVS update: sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util

From: cvs@openprivacy.org
Date: Sat Mar 17 2001 - 18:28:30 PST

  • Next message: cvs@openprivacy.org: "CVS update: sierra/src/java/org/openprivacy/sierra/tests"

    Date: Saturday March 17, 19101 @ 18:28
    Author: burton
    CVSWEB Options: -------------------

    Main CVSWeb: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi

    View this module: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util

    -----------------------------------

    Update of /usr/local/cvs/public/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util
    In directory giga:/tmp/cvs-serv2478/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util

    Modified Files:
            SelectReputation.java
    Log Message:
    ...

    *****************************************************************
    File: sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util/SelectReputation.java

    CVSWEB Options: -------------------

    CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util/SelectReputation.java?annotate=1.2

    CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util/SelectReputation.java?rev=1.2&content-type=text/x-cvsweb-markup

    CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util/SelectReputation.java.diff?r1=1.2&r2=1.1

    -----------------------------------

    Index: sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util/SelectReputation.java
    diff -u sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util/SelectReputation.java:1.1 sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util/SelectReputation.java:1.2
    --- sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/util/SelectReputation.java:1.1 Fri Mar 16 02alon/implementations/simple/SimpleQueryEngine.java Sat Mar 17 18:28:30 2001
    @@ -41,7 +41,7 @@
     /**
      * @see QueryManager
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: SimpleQueryEngine.java,v 1.12 2001/03/16 10:01:34 burton Exp $
    + * @version $Id: SimpleQueryEngine.java,v 1.13 2001/03/18 02:28:30 burton Exp $
      */
     public class SimpleQueryEngine extends BaseComponent implements Component, QueryEngine {
     
    @@ -49,6 +49,8 @@
         
         private Vector supportedPayloads = new Vector();
     
    + private DatabaseConnectionPool dcp = null;
    +
         public void init() throws TalonException {
             //add init code here
     
    @@ -57,6 +59,9 @@
             URI pmpReference = TypeReferenceFactory.getTypeReference( PropertyManagerPayload.class );
     
             supportedPayloads.addElement( pmpReference );
    +
    + this.dcp = (DatabaseConnectionPool)ComponentFactory
    + .getInstance( SierraResources.DATABASE_CONNNECTION_POOL );
             
         }
     
    @@ -64,16 +69,26 @@
         /**
          * @see QueryEngine
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: SimpleQueryEngine.java,v 1.12 2001/03/16 10:01:34 burton Exp $
    + * @version $Id: SimpleQueryEngine.java,v 1.13 2001/03/18 02:28:30 burton Exp $
          */
         public Result execute( Query query ) throws SierraException {
     
             if ( supports( query ) ) {
     
                 getLogger().message( "Going to execute query: "+ query.getTypeReference() );
    -
    - //FIXME: shouldn't return null
    - return null;
    +
    +
    + try {
    +
    + SelectReputation sr = new SelectReputation( dcp, (PropertyManager)query );
    + sr.commit();
    +
    + return sr.getResult();
    +
    + } catch ( Throwable t ) {
    + throw new SierraException( t );
    + }
    +
                 
             } else {
     
    @@ -89,7 +104,7 @@
          * Add a reputation for indexing...
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: SimpleQueryEngine.java,v 1.12 2001/03/16 10:01:34 burton Exp $
    + * @version $Id: SimpleQueryEngine.java,v 1.13 2001/03/18 02:28:30 burton Exp $
          */
         public void putReputation( Reputation reputation ) throws SierraException {
     
    @@ -101,9 +116,6 @@
     
                 try {
     
    - DatabaseConnectionPool dcp =(DatabaseConnectionPool)ComponentFactory
    - .getInstance( SierraResources.DATABASE_CONNNECTION_POOL );
    -
                     StringBuffer insert = new StringBuffer();
     
                     //insert records into the reputations table
    @@ -126,7 +138,7 @@
         /**
          * @see QueryEngine
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: SimpleQueryEngine.java,v 1.12 2001/03/16 10:01:34 burton Exp $
    + * @version $Id: SimpleQueryEngine.java,v 1.13 2001/03/18 02:28:30 burton Exp $
          */
         public boolean supports( Reputation reputation ) {
     
    @@ -150,7 +162,7 @@
         /**
          * @see QueryEngine
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: SimpleQueryEngine.java,v 1.12 2001/03/16 10:01:34 burton Exp $
    + * @version $Id: SimpleQueryEngine.java,v 1.13 2001/03/18 02:28:30 burton Exp $
          */
         public boolean supports( Payload payload ) {
     
    @@ -162,7 +174,7 @@
         /**
          * @see QueryEngine
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: SimpleQueryEngine.java,v 1.12 2001/03/16 10:01:34 burton Exp $
    + * @version $Id: SimpleQueryEngine.java,v 1.13 2001/03/18 02:28:30 burton Exp $
          */
         public boolean supports( Query query ) {
     



    This archive was generated by hypermail 2b30 : Sat Mar 17 2001 - 18:28:36 PST > + public Result getResult() {
    + return this.result;
    + }
    +
     }
     
         



    This archive was generated by hypermail 2b30 : Sat Mar 17 2001 - 18:28:36 PST