Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/database UserManager.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/database UserManager.java

Author davidp
Full name David C. Pellegrini
Date 2000-10-20 11:30:08 PDT
Message User: davidp
  Date: 00/10/20 11:30:08

  Modified: java/org/joist/database UserManager.java
  Log:
  Added method getUserByLoginID()
  
  Revision Changes Path
  1.29 +29 -2 joist/java/org/joist​/database/UserManage​r.java
  
  Index: UserManager.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/database/UserM​anager.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- UserManager.java 2000/10/19 21:57:25 1.28
  +++ UserManager.java 2000/10/20 18:30:07 1.29
  @@ -62,7 +62,7 @@
     *
     * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
     * @author Leonard Richardson <A HREF="mailto:leonard​r@collab.net">leo​nardr at collab dot net<​/A>
  - * @version $Revision: 1.28 $
  + * @version $Revision: 1.29 $
     *
     * Copyright (c) 1999 dataweb systems, inc.
     * Copyright (c) 1999, 2000 Collab.Net, Inc.
  @@ -185,7 +185,7 @@
           throws SQLException, DataSetException, JoistDatabaseException
       {
           TableDataSet user = new TableDataSet(connection, TABLE_NAME);
  - user.where("name=" + name);
  + user.where("name=" + QuotedString.from(name));
           user.fetchRecords();
           if (user != null && user.containsRecord(0))
           {
  @@ -194,6 +194,33 @@
           else
           {
               throw new JoistDatabaseException("No such user " + name);
  + }
  + }
  +
  + /**
  + * Gets a Record for a particular user by user loginID.
  + *
  + * @param connection A JDBC connection.
  + * @param loginID loginID of the user to get.
  + * @return a TableDataSet with all the users.
  + * @exception SQLException
  + * @exception DataSetException
  + * @exception JoistDatabaseException
  + */
  + public Record
  + getUserByLoginID(Connection connection, String loginID)
  + throws SQLException, DataSetException, JoistDatabaseException
  + {
  + TableDataSet user = new TableDataSet(connection, TABLE_NAME);
  + user.where("loginID=" + QuotedString.from(loginID));
  + user.fetchRecords();
  + if (user != null && user.containsRecord(0))
  + {
  + return user.getRecord(0);
  + }
  + else
  + {
  + throw new JoistDatabaseException("No such user " + loginID);
           }
       }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: joist/java/org/joist/database UserManager.java davidp David C. Pellegrini 2000-10-20 11:30:08 PDT
Messages per page: