Login | Register
My pages Projects Community openCollabNet

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

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

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

Author dlr
Full name Daniel Rall
Date 2000-11-10 12:27:40 PST
Message User: dlr
  Date: 00/11/10 12:27:40

  Modified: java/org/joist/database RoleManager.java
  Log:
  Removed duplicate code.
  
  Revision Changes Path
  1.15 +4 -22 joist/java/org/joist​/database/RoleManage​r.java
  
  Index: RoleManager.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/database/RoleM​anager.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- RoleManager.java 2000/11/03 21:09:33 1.14
  +++ RoleManager.java 2000/11/10 20:27:39 1.15
  @@ -13,7 +13,7 @@
    * Manages the Role table.
    *
    * @author <a href="mailto:leonard​r@collab.net">Leo​nard Richardson</a>
  - * @version $Id: RoleManager.java,v 1.14 2000/11/03 21:09:33 leonardr Exp $
  + * @version $Id: RoleManager.java,v 1.15 2000/11/10 20:27:39 dlr Exp $
    *
    * Copyright (c) 2000 CollabNet, Inc.
    */
  @@ -214,6 +214,7 @@
       }
           return roles;
       }
  +
       /**
        * Adds a new role to the database
        *
  @@ -341,28 +342,9 @@
       /**
        * Creates a SQL <code>where</code> clause.
        */
  - protected static String buildWhereClause (String roleID, String name)
  + protected static final String buildWhereClause (String roleID, String name)
       {
  - StringBuffer whereClause = new StringBuffer();
  - boolean firstClause = true;
  -
  - if (roleID != null)
  - {
  - whereClause.append(R​OLE_ID).append('=').​append(roleID);
  - firstClause = false;
  - }
  - if (name != null)
  - {
  - if (!firstClause)
  - {
  - whereClause.append(" AND ");
  - }
  - whereClause.append(R​OLE_NAME).append('='​)
  - .append(escapeAndQuo​teSQL(name));
  - firstClause = false;
  - }
  -
  - return whereClause.toString();
  + return buildWhereClause(roleID, name, null);
       }
   
       /**

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

Messages

Show all messages in topic

CVS update: joist/java/org/joist/database RoleManager.java dlr Daniel Rall 2000-11-10 12:27:40 PST
Messages per page: