portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/browser DatabaseBrowserAction.java
Date Mon, 05 Aug 2002 22:21:50 GMT
taylor      2002/08/05 15:21:49

  Modified:    src/java/org/apache/jetspeed/modules/actions/portlets/browser
                        DatabaseBrowserAction.java
  Log:
  Changed the data structure storing the result set from the database, from Vectors to ArrayLists
.
  
  Revision  Changes    Path
  1.25      +14 -14    jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/browser/DatabaseBrowserAction.java
  
  Index: DatabaseBrowserAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/browser/DatabaseBrowserAction.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- DatabaseBrowserAction.java	5 Aug 2002 22:11:28 -0000	1.24
  +++ DatabaseBrowserAction.java	5 Aug 2002 22:21:49 -0000	1.25
  @@ -319,9 +319,9 @@
       protected void getRows(VelocityPortlet portlet, RunData rundata, String sql,
                              int windowSize) throws Exception
       {
  -        List resultSetVector = new ArrayList();
  -        List resultSetTitleVector = new ArrayList();
  -        List resultSetTypeVector = new ArrayList();
  +        List resultSetList = new ArrayList();
  +        List resultSetTitleList = new ArrayList();
  +        List resultSetTypeList = new ArrayList();
           DBConnection dbConn = null;
           PreparedStatement selectStmt = null;
           ResultSet rs = null;
  @@ -363,13 +363,13 @@
               /*
               the array columnDisplayed maintains a boolean value for each
               column index. Only the columns that are set to true are added to
  -            the resultSetVector, resultSetTitleVector and resultSetTypeVector.
  +            the resultSetList, resultSetTitleList and resultSetTypeList.
               */
               boolean[] columnDisplayed = new boolean [columnNum + userObjListSize];
   
               /*
               this for loop constructs the columnDisplayed array as well as adds
  -            to the resultSetTitleVector and resultSetTypeVector
  +            to the resultSetTitleList and resultSetTypeList
               */
               for(int i = 1; i <= columnNum; i++)
               {
  @@ -378,8 +378,8 @@
                         (type == Types.BINARY) || (type == Types.LONGVARBINARY) ||
                         (type == Types.VARBINARY)) )
                   {
  -                    resultSetTitleVector.add(rsmd.getColumnName(i));
  -                    resultSetTypeVector.add(String.valueOf(type));
  +                    resultSetTitleList.add(rsmd.getColumnName(i));
  +                    resultSetTypeList.add(String.valueOf(type));
                       columnDisplayed[i-1] = true;
                   }
                   else
  @@ -391,13 +391,13 @@
               for (int i = columnNum; i < columnNum + userObjListSize; i++)
               {
                   ActionParameter usrObj = (ActionParameter)userObjList.get(i - columnNum);
  -                resultSetTitleVector.add(usrObj.getName());
  -                resultSetTypeVector.add(usrObj.getType());
  +                resultSetTitleList.add(usrObj.getName());
  +                resultSetTypeList.add(usrObj.getType());
                   columnDisplayed[i] = true;
                   //System.out.println("User List Name = "+ usrObj.getName()+" Type = "+usrObj.getType());
               }
               /*
  -            this while loop adds each row to the resultSetVector
  +            this while loop adds each row to the resultSetList
               */
               int index = 0;
               while(rs.next())
  @@ -426,12 +426,12 @@
                       }
                   }
   
  -                resultSetVector.add(row);
  +                resultSetList.add(row);
                   index++;
               }
               BrowserIterator iterator =
  -                new DatabaseBrowserIterator( resultSetVector, resultSetTitleVector,
  -                                             resultSetTypeVector, windowSize);
  +                new DatabaseBrowserIterator( resultSetList, resultSetTitleList,
  +                                             resultSetTypeList, windowSize);
               setDatabaseBrowserIterator(portlet, rundata, iterator);
   
           }
  
  
  

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


Mime
View raw message