[cvs] expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj GroupMembers.java

JCorporate Ltd jcorp at jcorp2.servlets.net
Fri May 28 11:59:49 PDT 2004


Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj
In directory jcorp2.servlets.net:/tmp/cvs-serv30547/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj

Modified Files:
	GroupMembers.java 
Log Message:
add constructor for transactions, and fix checkRefs


Index: GroupMembers.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/GroupMembers.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** GroupMembers.java	21 May 2004 18:24:48 -0000	1.19
--- GroupMembers.java	28 May 2004 18:59:47 -0000	1.20
***************
*** 67,70 ****
--- 67,71 ----
  import com.jcorporate.expresso.core.controller.ControllerRequest;
  import com.jcorporate.expresso.core.db.DBException;
+ import com.jcorporate.expresso.core.db.DBConnection;
  import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
  import com.jcorporate.expresso.core.misc.StringUtil;
***************
*** 80,84 ****
   * <p>GroupMembers.java</p>
   * <p>
-  * Copyright 1999-2002 Jcorporate Ltd.</p>
   * Group Member definitions table. IMPORTANT: Use getGroups() from the User object
   * to determine which groups a certain user belongs to, as the implementation may
--- 81,84 ----
***************
*** 86,90 ****
   * application
   *
-  * @version        $Revision$  $Date$
   * @author        Michael Nash
   * @since Expresso 1.0
--- 86,89 ----
***************
*** 127,131 ****
      public GroupMembers()
              throws DBException {
-         super();
      } /* GroupMembers() */
  
--- 126,129 ----
***************
*** 154,157 ****
--- 152,164 ----
  
      /**
+      * constructor for db transactions
+      *
+      * @param localConnection the DB connection which should be used, typically because of an ongoing transaction
+      */
+     public GroupMembers(DBConnection localConnection) throws DBException {
+         if (localConnection != null) setConnection(localConnection);
+     }
+ 
+     /**
       * Extend add to handle nested groups
       *
***************
*** 221,225 ****
              throws DBException {
  
!         UserGroup testobj = (UserGroup) newInstance();
          checkRef(GROUP_NAME, testobj,
                  "Invalid " + getString(getMetaData().getDescription(GROUP_NAME)));
--- 228,238 ----
              throws DBException {
  
!         UserGroup testobj = null;
!         if ( getLocalConnection() != null ) {
!             testobj = new UserGroup(getLocalConnection()) ;
!         } else {
!             testobj = new UserGroup();
!             testobj.setDataContext(getDataContext());
!         }
          checkRef(GROUP_NAME, testobj,
                  "Invalid " + getString(getMetaData().getDescription(GROUP_NAME)));
***************
*** 349,353 ****
  
  
! }
! 
! /* GroupMembers */
\ No newline at end of file
--- 362,364 ----
  
  
! } /* GroupMembers */
\ No newline at end of file



More information about the cvs mailing list