[cvs] expresso commit by rimovm: Moved all the setRequestingUid() calls to

JCorporate Ltd jcorp at jcorporate.com
Sat Mar 19 03:05:49 UTC 2005


Log Message:
-----------
Moved all the setRequestingUid() calls to setRequestingUser(ReadOnlyUser)

@deprecated setRequestingUid()

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core:
        ExpressoSchema.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller:
        SecureIfSetController.java
        State.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects:
        Securable.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc:
        JoinedDataObject.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/db:
        TableCreator.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj:
        AutoDBObject.java
        CacheUtils.java
        DBObject.java
        DBSequence.java
        RowSecuredDBObject.java
        Schema.java
        SecurDBObject.java
        SecuredDBObject.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/job:
        Job.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/logging:
        Log.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc:
        ConfigManager.java
        RecordPaginator.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/registry:
        RequestRegistryFilter.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/security:
        SuperUser.java
        User.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/utility:
        DBTool.java
        DBToolTests.java
        JobHandler.java
        QueueJob.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/controller:
        ComponentManager.java
        DataTransfer.java
        Download.java
        ReportServer.java
        TestController.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/dbobj:
        AppIntegration.java
        DownloadFiles.java
        DownloadLog.java
        ISOCountryCodes.java
        PerfTestSet.java
        PerfTestSetDet.java
        PerfTestStat.java
        PerfTests.java
        RegisteredUser.java
        RestrictedCountries.java
        RestrictedOverrides.java
        SingleDBUserInfo.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/job:
        SendNotice.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/report:
        DownloadUsers.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/velocity:
        ExpressoTool.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/xml/controller:
        XMLController.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/xml/dbobj:
        ControllerXSLMap.java
        UserAgent.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller:
        ControllerSecurityMatrix.java
        DBMaint.java
        DBSecurityMatrix.java
        ErrorHandler.java
        JobSecurityMatrix.java
        Log.java
        QueueJob.java
        Registration.java
        SimpleLoginController.java
        SimpleRegistration.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint:
        Add.java
        DynamicCmd.java
        List.java
        Search.java
        Update.java
        UpdateUpdate.java
        ViewBlob.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/ui:
        DefaultAutoElement.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj:
        CacheSync.java
        ControllerDefault.java
        ControllerSecurity.java
        DBMessage.java
        DBObjImpl.java
        DBObjLimit.java
        DBObjSecurity.java
        DBOtherMap.java
        DefaultUserInfo.java
        Event.java
        EventMail.java
        GroupMembers.java
        GroupNest.java
        JobHandlerControl.java
        JobHandlerRegistry.java
        JobQueue.java
        JobQueueParam.java
        JobSecurity.java
        LogEntry.java
        MediaDBObject.java
        MimeTypes.java
        RegistrationDBObject.java
        RegistrationDomain.java
        RegistrationObjectMap.java
        SchemaList.java
        SecurityDBObject.java
        Setup.java
        TmpUser.java
        UserGroup.java
        UserPreference.java
        UserPreferenceDef.java
        UserPreferenceVal.java
        ValidationQueue.java
        ValidationQueueParam.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/job:
        ClearOldValidation.java
        TestJob.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/servlet:
        DBCreate.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/test:
        SchemaCreator.java
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/validation:
        ValidationEntry.java
    expresso/expresso-web/WEB-INF/test-src/com/jcorporate/expresso/core/dataobjects/jdbc/tests:
        JoinedObjectTest.java
        TestJoinUtil.java
    expresso/expresso-web/WEB-INF/test-src/com/jcorporate/expresso/core/dataobjects/test:
        TestDataTransferObject.java
    expresso/expresso-web/WEB-INF/test-src/com/jcorporate/expresso/core/dbobj/tests:
        AutoDBObjTest.java
    expresso/expresso-web/WEB-INF/test-src/com/jcorporate/expresso/ext/tests:
        DBObjStressTest.java
        RetrieveThroughputTest.java
        StressTestObject.java
        StressThread.java
    expresso/expresso-web/WEB-INF/test-src/com/jcorporate/expresso/services/dbobj/tests:
        DBObjSecurityTests.java
        MimeTypesTests.java
        SetupTests.java

Revision Data
-------------
Index: UpdateUpdate.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/UpdateUpdate.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/UpdateUpdate.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/UpdateUpdate.java -u -r1.21 -r1.22
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/UpdateUpdate.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/UpdateUpdate.java
@@ -85,6 +85,7 @@
 import com.jcorporate.expresso.services.controller.ui.DefaultAutoElement;
 import com.jcorporate.expresso.services.dbobj.Setup;
 import org.apache.log4j.Logger;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -143,8 +144,7 @@
                 ((Securable) myDBObj).isAllowed(SecuredDBObject.UPDATE);
 
             } else {
-                if (getUid() == SecuredDBObject.SYSTEM_ACCOUNT
-                        || User.getUserFromId(getUid(), this.getControllerRequest().getDataContext()).isAdmin()) {
+                if (getRequestingUser() == SuperUser.SUPER_USER || getRequestingUser().isAdmin()) {
                     // all access ok
                 } else {
                     String allowInsecure = Setup.getValue(req.getDataContext(),
@@ -188,4 +188,4 @@
 
 }
 
-/* UpdateUpdate */
\ No newline at end of file
+/* UpdateUpdate */
Index: DynamicCmd.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/DynamicCmd.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/DynamicCmd.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/DynamicCmd.java -u -r1.41 -r1.42
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/DynamicCmd.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/DynamicCmd.java
@@ -97,6 +97,7 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.StringTokenizer;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -383,8 +384,7 @@
 
         boolean canSearch = false;
         boolean allowInsecure = "y".equalsIgnoreCase(Setup.getValue(this.getDBName(), "insecureDBMaint"));
-        if (getUid() == SecuredDBObject.SYSTEM_ACCOUNT
-                || User.getUserFromId(getUid(), this.getControllerRequest().getDataContext()).isAdmin()) {
+        if (getRequestingUser() == SuperUser.SUPER_USER || getRequestingUser().isAdmin()) {
             // all access ok
             canSearch = true;
         } else {
@@ -746,9 +746,9 @@
             }
 
             if (myDataObject instanceof Securable) {
-                ((Securable) myDataObject).setRequestingUid(getUid());
+                ((Securable) myDataObject).setRequestingUser(getRequestingUser());
             } else {
-                if (getUid() == SecuredDBObject.SYSTEM_ACCOUNT
+                if (getRequestingUser() == SuperUser.SUPER_USER
                         || User.getUserFromId(getUid(), this.getControllerRequest().getDataContext()).isAdmin()) {
                     // all access ok
                 } else {
@@ -765,7 +765,8 @@
             myDataObject.setLocale(getControllerRequest().getLocale());
 
             /* Now see if there is a "page limit" for this object */
-            DBObjLimit dl = new DBObjLimit(SecuredDBObject.SYSTEM_ACCOUNT);
+            DBObjLimit dl = new DBObjLimit();
+            dl.setRequestingUser(SuperUser.SUPER_USER);
             dl.setDataContext(getDBName());
             dl.setField("DBObjectName", myDBObjName);
 
@@ -1261,4 +1262,4 @@
     }
 }
 
-/* DynamicCmd */
\ No newline at end of file
+/* DynamicCmd */
Index: ViewBlob.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/ViewBlob.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/ViewBlob.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/ViewBlob.java -u -r1.11 -r1.12
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/ViewBlob.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/ViewBlob.java
@@ -87,6 +87,7 @@
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletResponse;
 import java.io.InputStream;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -169,8 +170,8 @@
             if (curDBObj instanceof Securable) {
                 ((Securable) curDBObj).isAllowed("S");
             } else {
-                if (getUid() == SecuredDBObject.SYSTEM_ACCOUNT
-                        || User.getUserFromId(getUid(), this.getControllerRequest().getDataContext()).isAdmin()) {
+                if (getRequestingUser()== SuperUser.SUPER_USER
+                        || getRequestingUser().isAdmin()) {
                     // all access ok
                 } else {
                     String allowInsecure = Setup.getValue(newRequest.getDataContext(),
@@ -392,4 +393,4 @@
         }
 
     }
-}
\ No newline at end of file
+}
Index: Search.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Search.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Search.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Search.java -u -r1.25 -r1.26
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Search.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Search.java
@@ -84,6 +84,7 @@
 import com.jcorporate.expresso.services.dbobj.Setup;
 
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -279,8 +280,7 @@
             if (myDBObj instanceof Securable) {
                 ((Securable) myDBObj).isAllowed("S");
             } else {
-                if (getUid() == SecuredDBObject.SYSTEM_ACCOUNT
-                        || User.getUserFromId(getUid(), this.getControllerRequest().getDataContext()).isAdmin()) {
+                if (getRequestingUser() == SuperUser.SUPER_USER || getRequestingUser().isAdmin()) {
                     // all access ok
                 } else {
                     String allowInsecure = Setup.getValue(req.getDataContext(),
@@ -305,4 +305,4 @@
         }
     } /* execute() */
 
-} /* Search */
\ No newline at end of file
+} /* Search */
Index: Add.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Add.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Add.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Add.java -u -r1.23 -r1.24
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Add.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Add.java
@@ -85,6 +85,7 @@
 
 import java.util.HashMap;
 import java.util.Map;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -220,8 +221,7 @@
             if (myDBObj instanceof Securable) {
                 ((Securable) myDBObj).isAllowed("A");
             } else {
-                if (getUid() == SecuredDBObject.SYSTEM_ACCOUNT
-                        || User.getUserFromId(getUid(), this.getControllerRequest().getDataContext()).isAdmin()) {
+                if (getRequestingUser() == SuperUser.SUPER_USER || getRequestingUser().isAdmin()) {
                     // all access ok
                 } else {
                     String allowInsecure = Setup.getValue(req.getDataContext(),
@@ -244,4 +244,4 @@
             throw new ControllerException(de);
         }
     } /* run(ControllerRequest, ControllerResponse) */
-} /* Add */
\ No newline at end of file
+} /* Add */
Index: Update.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Update.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Update.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Update.java -u -r1.26 -r1.27
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Update.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/Update.java
@@ -93,6 +93,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.StringTokenizer;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -255,8 +256,7 @@
             if (myDBObj instanceof Securable) {
                 ((Securable) myDBObj).isAllowed("U");
             } else {
-                if (getUid() == SecuredDBObject.SYSTEM_ACCOUNT
-                        || User.getUserFromId(getUid(), this.getControllerRequest().getDataContext()).isAdmin()) {
+                if (getRequestingUser() == SuperUser.SUPER_USER || getRequestingUser().isAdmin()) {
                     // all access ok
                 } else {
                     String allowInsecure = Setup.getValue(req.getDataContext(),
@@ -310,16 +310,16 @@
                         masterTrans.addParam("definition", ((Defineable) myDBObj).getDefinitionName());
                     }
 
-                    
+
                     // get the detail set
                     HashSet detailSet = new HashSet();
                     detailSet.addAll(metadata.getDetailSet());
-                    
+
                     HashMap regObjectsKeys = new HashMap();
                     // special case for UserInfo objects so we can add the appropriate RegistrationDBObject's
                     if (myDBObj.getClass().getName().equals(ConfigManager.getClassHandler("userInfo"))) {
                         User user = new User((UserInfo)myDBObj);
-                        
+
                         RegistrationDomain regDomain = new RegistrationDomain();
                         regDomain.setField(RegistrationDomain.FLD_NAME, user.getRegistrationDomain());
                         if (regDomain.find()) {
@@ -334,7 +334,7 @@
                             detailSet.addAll(regObjectsSet);
                         }
                     }
-                    
+
                     String oneDet = null;
                     for (Iterator ee = detailSet.iterator(); ee.hasNext(); ) {
                         oneDet = (String) ee.next();
@@ -362,7 +362,7 @@
                         StringBuffer fieldsString = new StringBuffer();
                         String localFields = metadata.getDetailFieldsLocal(oneDet);
                         String foreignFields = metadata.getDetailFieldsForeign(oneDet);
-                        
+
                         // special case for UserInfo objects so we can add the appropriate RegistrationDBObject's
                         if (regObjectsKeys.containsKey(oneDet)) {
                             fieldsString.append(regObjectsKeys.get(oneDet));
@@ -374,14 +374,14 @@
                             StringTokenizer stkForeign = new StringTokenizer(foreignFields,
                                     "|");
                             boolean needsPipe = false;
-    
+
                             while (stkLocal.hasMoreTokens()) {
                                 if (needsPipe) {
                                     fieldsString.append("|");
                                 } else {
                                     needsPipe = true;
                                 }
-    
+
                                 String localField = stkLocal.nextToken();
                                 String foreignField = stkForeign.nextToken();
                                 fieldsString.append(foreignField);
@@ -411,4 +411,4 @@
 
 }
 
-/* Update */
\ No newline at end of file
+/* Update */
Index: List.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/List.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/List.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/List.java -u -r1.13 -r1.14
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/List.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/dbmaint/List.java
@@ -76,6 +76,7 @@
 import com.jcorporate.expresso.core.misc.StringUtil;
 import com.jcorporate.expresso.core.security.User;
 import com.jcorporate.expresso.services.dbobj.Setup;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 /**
  * list all records in a DBObject.
@@ -115,8 +116,7 @@
             if (myDBObj instanceof Securable) {
                 ((Securable) myDBObj).isAllowed("S");
             } else {
-                if (getUid() == SecuredDBObject.SYSTEM_ACCOUNT
-                        || User.getUserFromId(getUid(), this.getControllerRequest().getDataContext()).isAdmin()) {
+                if (getRequestingUser() == SuperUser.SUPER_USER || getRequestingUser().isAdmin()) {
                     // all access ok
                 } else {
                     String allowInsecure = Setup.getValue(req.getDataContext(),
@@ -136,4 +136,4 @@
 
 }
 
-/* List */
\ No newline at end of file
+/* List */
Index: ExpressoSchema.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/ExpressoSchema.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/ExpressoSchema.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/ExpressoSchema.java -u -r1.54 -r1.55
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/ExpressoSchema.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/ExpressoSchema.java
@@ -71,6 +71,7 @@
 import com.jcorporate.expresso.kernel.InstallLog;
 import com.jcorporate.expresso.kernel.util.ClassLocator;
 import com.jcorporate.expresso.services.dbobj.JobQueue;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -195,7 +196,7 @@
     public synchronized void otherSetup(InstallLog installLog,
                                         String dataContext) throws com.jcorporate.expresso.core.db.DBException {
         //Add a recurring 'Clear old validation entries job'
-        JobQueue jq = new JobQueue(SecuredDBObject.SYSTEM_ACCOUNT);
+        JobQueue jq = new JobQueue(SuperUser.SUPER_USER);
         jq.setDataContext(dataContext);
         jq.setField(JobQueue.FLD_JOBCODE,
                 com.jcorporate.expresso.services.job.ClearOldValidation.class.getName());
Index: State.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/State.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/State.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/State.java -u -r1.30 -r1.31
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/State.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/State.java
@@ -83,6 +83,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -1178,6 +1179,16 @@
     protected int getUid()
             throws ControllerException {
         return myRequest.getUid();
+    }
+
+
+    /**
+     * Retrieve a reference to the current security context as specified
+     * int he ControllerRequest object.
+     * @return ReadOnlyUser reference.
+     */
+    protected ReadOnlyUser getRequestingUser() {
+        return myRequest.getRequestingUser();
     }
 
     /**
Index: SecureIfSetController.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/SecureIfSetController.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/SecureIfSetController.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/SecureIfSetController.java -u -r1.6 -r1.7
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/SecureIfSetController.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/SecureIfSetController.java
@@ -69,6 +69,7 @@
 import com.jcorporate.expresso.core.db.DBException;
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
 import com.jcorporate.expresso.services.dbobj.ControllerSecurity;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 /**
  * Controller that uses security if the security system is available.
@@ -126,7 +127,7 @@
             DBConnectionPool pool = DBConnectionPool.getInstance(dataContext);
             DBConnection connection = pool.getConnection("Security Check");
             try {
-                ControllerSecurity cs = new ControllerSecurity(SecuredDBObject.SYSTEM_ACCOUNT);
+                ControllerSecurity cs = new ControllerSecurity(SuperUser.SUPER_USER);
                 cs.setDataContext(dataContext);
                 cs.count();
             } finally {
@@ -142,4 +143,4 @@
     }
 
 
-}
\ No newline at end of file
+}
Index: Securable.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/Securable.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/Securable.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/Securable.java -u -r1.8 -r1.9
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/Securable.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/Securable.java
@@ -90,13 +90,14 @@
  * @author Michael Rimov
  * @since Expresso 5.1
  */
-public interface Securable {
-
-
-    /**
+public interface Securable
+{
+   /**
      * ID for system account.  System account bypasses all security checking
      * in the system for the particular dbobject.  So often you need to use
      * it with caution.
+     * @deprecated Since Expresso 5.6.1.  Use com.jcorporate.expresso.core.security.SuperUser.SUPER_USER
+     * for indicating system account instead.
      */
     static final int SYSTEM_ACCOUNT = -1;
 
@@ -115,7 +116,7 @@
      * @param newUid Sets the UID for this DBObject.  Used for security checks.
      * @throws DBException if there's a problem switching UID.
      * @since Expresso 4.0
-     * @deprecated Since Expresso 5.6.1 Use setrequestingUid(ReadOnlyUser) instead.
+     * @deprecated Since Expresso 5.6.1 Use setRequestingUser(ReadOnlyUser) instead.
      */
     void setRequestingUid(int newUid);
 
@@ -141,8 +142,10 @@
      * @param requestedFunction the Requested function String, either A,U,S,D for
      *                          Add,Update,Search,Delete
      * @throws SecurityException if the user is not allowed
+     * @throws com.jcorporate.expresso.core.db.DBException for Database access
+     * exception.
      */
-    public void isAllowed(String requestedFunction)
-            throws SecurityException, com.jcorporate.expresso.core.db.DBException;
+    public void isAllowed(String requestedFunction) throws SecurityException
+        , com.jcorporate.expresso.core.db.DBException;
 
 }
Index: JoinedDataObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JoinedDataObject.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JoinedDataObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JoinedDataObject.java -u -r1.46 -r1.47
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JoinedDataObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JoinedDataObject.java
@@ -2005,6 +2005,7 @@
      * elements.
      *
      * @param newUid the user id for the operation.
+     * @deprecated as per interface specification.
      */
     public void setRequestingUid(int newUid) {
 
Index: TableCreator.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/TableCreator.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/TableCreator.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/TableCreator.java -u -r1.23 -r1.24
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/TableCreator.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/TableCreator.java
@@ -84,6 +84,7 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 /**
  * A singleton utility class that helps create tables.  It is stored as a weak reference
@@ -392,7 +393,7 @@
         for (Enumeration e = oneSchema.getMembers(); e.hasMoreElements();) {
             oneMember = (DBObject) e.nextElement();
             if (oneMember instanceof Securable) {
-                ((Securable) oneMember).setRequestingUid(Securable.SYSTEM_ACCOUNT);
+                ((Securable) oneMember).setRequestingUser(SuperUser.SUPER_USER);
             }
             metadata = oneMember.getJDBCMetaData();
 
@@ -566,9 +567,9 @@
 
     }
 
-	/**
-	 * Delete Table - Deletes a table from the specified db
-	 *
+    /**
+     * Delete Table - Deletes a table from the specified db
+     *
      *
      * @param   dbObj The Instantiated Database Object to check against.
      * @throws    DBException If there's an error creating the table with the
@@ -578,47 +579,47 @@
      *
      * Create by Yves Henri AMAIZO <amy_amaizo at compuserve.com>
      * @since $DatabaseSchema  $Date$
-	 */
-	public  void deleTable(DBObject dbObj)
-			throws DBException {
+     */
+    public  void deleTable(DBObject dbObj)
+            throws DBException {
 
-		FastStringBuffer sqlStatement = FastStringBuffer.getInstance();
+        FastStringBuffer sqlStatement = FastStringBuffer.getInstance();
 
-		JDBCObjectMetaData metadata = dbObj.getJDBCMetaData();
+        JDBCObjectMetaData metadata = dbObj.getJDBCMetaData();
 
-		try {
+        try {
 
-			DBConnectionPool myPool = null;
-			DBConnection myConnection = null;
+            DBConnectionPool myPool = null;
+            DBConnection myConnection = null;
 
-			try {
+            try {
 
-				myPool = DBConnectionPool.getInstance(dbObj.getDataContext());
-				myConnection = myPool.getConnection("Table Deletor");
+                myPool = DBConnectionPool.getInstance(dbObj.getDataContext());
+                myConnection = myPool.getConnection("Table Deletor");
 
-				sqlStatement = sqlStatement.append("DROP TABLE ");
-				sqlStatement.append(metadata.getTargetSQLTable(dbObj.getDataContext()));
+                sqlStatement = sqlStatement.append("DROP TABLE ");
+                sqlStatement.append(metadata.getTargetSQLTable(dbObj.getDataContext()));
 
 
-				// Send SQL to database
-				if (log.isInfoEnabled()) {
-					log.info("Executing:" + sqlStatement.toString());
-				}
-				myConnection.executeUpdate(sqlStatement.toString());
+                // Send SQL to database
+                if (log.isInfoEnabled()) {
+                    log.info("Executing:" + sqlStatement.toString());
+                }
+                myConnection.executeUpdate(sqlStatement.toString());
 
 
-			} catch (Throwable t) {
-				t.printStackTrace();
-				throw new DBException(t);
-			} finally {
-				if (myPool != null) {
-					myPool.release(myConnection);
-				}
-			}
-		} finally {
-			sqlStatement.release();
-		}
+            } catch (Throwable t) {
+                t.printStackTrace();
+                throw new DBException(t);
+            } finally {
+                if (myPool != null) {
+                    myPool.release(myConnection);
+                }
+            }
+        } finally {
+            sqlStatement.release();
+        }
 
-	}
+    }
 
 }
Index: DBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java,v
retrieving revision 1.248
retrieving revision 1.249
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java -u -r1.248 -r1.249
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java
@@ -125,6 +125,7 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -4123,7 +4124,7 @@
                 //Default expiration of valid values = 15 minutes
                 //
                 long expiration = 60 * 1000 * 15;
-                DBObjLimit limit = new DBObjLimit(SecuredDBObject.SYSTEM_ACCOUNT);
+                DBObjLimit limit = new DBObjLimit(SuperUser.SUPER_USER);
                 limit.setDataContext(getDataContext());
                 limit.setField(DBObjLimit.DB_OBJECT_NAME, thisObj.myClassName);
                 if (limit.find()) {
@@ -4332,7 +4333,7 @@
                 //Default expiration of valid values = 15 minutes
                 //
                 long expiration = 60 * 1000 * 15;
-                DBObjLimit limit = new DBObjLimit(SecuredDBObject.SYSTEM_ACCOUNT);
+                DBObjLimit limit = new DBObjLimit(SuperUser.SUPER_USER);
                 limit.setField("DBObjectName", thisObj.myClassName);
                 if (limit.find()) {
                     String ttl = limit.getField("TTL");
@@ -4876,7 +4877,7 @@
             long num = count();
             long target = num * ( Integer.parseInt(percent) / 100 );
             target = Math.max(50, target);
-            DBObjLimit dbl = new DBObjLimit(SecuredDBObject.SYSTEM_ACCOUNT);
+            DBObjLimit dbl = new DBObjLimit(SuperUser.SUPER_USER);
             dbl.setField(DBObjLimit.DB_OBJECT_NAME, getClass().getName());
             boolean found = dbl.find();
             if (!found) {
@@ -7827,7 +7828,7 @@
      * cache limit dbobject.
      */
     public void setCacheLimit(int maxNumInstances) throws DBException {
-        DBObjLimit dbl = new DBObjLimit(SecuredDBObject.SYSTEM_ACCOUNT);
+        DBObjLimit dbl = new DBObjLimit(SuperUser.SUPER_USER);
         dbl.setField(DBObjLimit.DB_OBJECT_NAME, myClassName);
         boolean found = dbl.find();
         if ( !found ) {
@@ -7853,7 +7854,7 @@
      * to the database table.
      */
     public void setCacheLimit(int maxNumInstances, int minutesToLive) throws DBException {
-        DBObjLimit dbl = new DBObjLimit(SecuredDBObject.SYSTEM_ACCOUNT);
+        DBObjLimit dbl = new DBObjLimit(SuperUser.SUPER_USER);
         dbl.setField(DBObjLimit.DB_OBJECT_NAME, myClassName);
         boolean found = dbl.find();
         if ( !found ) {
Index: SecuredDBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java,v
retrieving revision 1.60
retrieving revision 1.61
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java -u -r1.60 -r1.61
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java
@@ -226,9 +226,10 @@
      *
      * @param newUid Sets the UID for this DBObject.  Used for security checks.
      * @since Expresso 4.0
+     * @deprecated as per interface specification.
      */
     public void setRequestingUid(int newUid) {
-        if (newUid == SYSTEM_ACCOUNT) {
+        if (newUid == SuperUser.SYSTEM_UID) {
             userSecurity = SuperUser.SUPER_USER;
         } else {
             try {
@@ -293,6 +294,7 @@
      *               as SecuredDBObject.SYSTEM_ACCOUNT,
      *               t can only be used from within a method.
      * @throws DBException If the object cannot be created
+     * @deprecated Since 5.6.1 User SecuredDBobject(ReadOnlyUser) instead.
      */
     public SecuredDBObject(int newUid)
             throws DBException {
@@ -302,6 +304,20 @@
 
 
     /**
+     * Constructor that replaces SecuredDBobject(int) to create a dbobject
+     * that sets Security credentials as well.
+     * @param userSecurityContext ReadOnlyUser.  You can often get this
+     * from RequestRegistry
+     * @throws DBException upon construction error.
+     */
+    public SecuredDBObject(ReadOnlyUser userSecurityContext) throws DBException {
+        super();
+        setRequestingUser(userSecurityContext);
+    }
+
+
+
+    /**
      * Constructor: Specify a DB connection AND user id
      *
      * @param theConnection A DBConnection that this object should
@@ -347,6 +363,9 @@
      * @param dbKey   db/Context key for the context being requested
      * @param theUser User id of the user requesting access
      * @throws DBException upon construction error.
+     * @deprecated No Direct Alternate Constructor offered.  RequestRegistry
+     * will automatically set the current dbKey automatically during
+     * default constructor.
      */
     public SecuredDBObject(String dbKey, int theUser)
             throws DBException {
@@ -476,25 +495,35 @@
             throws SecurityException, DBException {
 
         ReadOnlyUser userToTest = this.getRequestingUser();
-        int uidToTest = userToTest.getUid();
+
 
         if (log.isDebugEnabled()) {
             log.debug("Checking permission for function '" +
-                    requestedFunction + "' for user " + uidToTest);
+                    requestedFunction + "' for user " + userToTest.getUid());
         }
-        if (uidToTest == 0) {
+
+        if (userToTest.getUid() == 0) {
             throw new DBException("User not specified. Must have a " +
                     "valid user id to access database object '" +
                     getMetaData().getDescription() + "'");
         }
+
         /* User 'SYSTEM' or 'Admin' is always allowed permissions */
-        if (uidToTest == SYSTEM_ACCOUNT || User.getAdminId(getDataContext()) == uidToTest) {
+        if (userToTest == SuperUser.SUPER_USER) {
             if (log.isDebugEnabled()) {
                 log.debug("User was SYSTEM - permission granted");
             }
 
             return;
         }
+
+        if (userToTest.isAdmin()) {
+            if (log.isDebugEnabled()) {
+                log.debug("User was 'Admin' - permission granted");
+            }
+            return;
+        }
+
         try {
             CacheSystem cs = CacheManager.getCacheSystem(getDataContext());
             if (cs != null) {
@@ -506,7 +535,7 @@
             ValidValue sec = null;
             if (cs != null) {
                 sec = (ValidValue) cs.getItem(CACHE_NAME,
-                        uidToTest + "|" +
+                        userToTest.getUid() + "|" +
                         getClass().getName());
             }
 
@@ -576,7 +605,7 @@
                 } /* for each group this user belongs to */
 
 
-                sec = new ValidValue(uidToTest + "|" + getClass().getName(),
+                sec = new ValidValue(userToTest.getUid() + "|" + getClass().getName(),
                         currentSecurity.toString());
 
                 if (cs != null) {
@@ -594,7 +623,7 @@
                 }
             } else {
                 if (log.isDebugEnabled()) {
-                    log.debug("User '" + uidToTest + "' in db/context '" +
+                    log.debug("User '" + userToTest.getUid() + "' in db/context '" +
                             getDataContext() + "' who requested function '" +
                             requestedFunction + "' on database object '" +
                             getClass().getName() +
@@ -607,7 +636,7 @@
                 return;
             }
             if (log.isDebugEnabled()) {
-                log.debug("User '" + uidToTest + "' in db/context '" + getDataContext() +
+                log.debug("User '" + userToTest.getUid() + "' in db/context '" + getDataContext() +
                         "' is denied permission to perform function '" +
                         requestedFunction + "' on database object '" +
                         getClass().getName() + "'. Security string is '" +
@@ -631,7 +660,7 @@
             }
 
             String[] args = new String[4];
-            args[0] = "'" + userToTest.getLoginName() + " (" + uidToTest + ")'";
+            args[0] = "'" + userToTest.getLoginName() + " (" + userToTest.getUid() + ")'";
             args[1] = "'" + permString + "'";
             args[2] = "'" + getMetaData().getDescription() + "'";
             args[3] = "'" + getDataContext() + "'";
@@ -647,9 +676,10 @@
      * Retrieve the uid of the 'System Account'
      *
      * @return usually -1.  May vary depending on the implementation.
+     * @deprecated Use SuperUser.SYSTEM_UID instead.
      */
     public int getSystemUid() {
-        return SecuredDBObject.SYSTEM_ACCOUNT;
+        return SuperUser.SYSTEM_UID;
     }
 
     /**
@@ -907,7 +937,7 @@
 
         ReadOnlyUser user = this.getRequestingUser();
 
-        if (user.getUid() == SYSTEM_ACCOUNT) {
+        if (user == SuperUser.SUPER_USER) {
             return true;
         }
 
@@ -936,13 +966,12 @@
         boolean result = false;
 
         ReadOnlyUser user = this.getRequestingUser();
-        int userId = user.getUid();
 
-        if (userId == SYSTEM_ACCOUNT) {
+        if (user == SuperUser.SUPER_USER) {
             return true;
         }
 
-        if (user.getLoginName().equals(User.ADMIN_USER)) {
+        if (user.isAdmin()) {
             return true;
         }
 
@@ -967,13 +996,12 @@
         boolean result = false;
 
         ReadOnlyUser user = this.getRequestingUser();
-        int userId = user.getUid();
 
-        if (userId == SYSTEM_ACCOUNT) {
+        if (user == SuperUser.SUPER_USER) {
             return true;
         }
 
-        if (user.getLoginName().equals(User.ADMIN_USER)) {
+        if (user.isAdmin()) {
             return true;
         }
 
@@ -1001,13 +1029,12 @@
         boolean result = false;
 
         ReadOnlyUser user = this.getRequestingUser();
-        int userId = user.getUid();
 
-        if (userId == SYSTEM_ACCOUNT) {
+        if (user == SuperUser.SUPER_USER) {
             return true;
         }
 
-        if (user.getLoginName().equals(User.ADMIN_USER)) {
+        if (user.isAdmin()) {
             return true;
         }
 
Index: RowSecuredDBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/RowSecuredDBObject.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/RowSecuredDBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/RowSecuredDBObject.java -u -r1.44 -r1.45
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/RowSecuredDBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/RowSecuredDBObject.java
@@ -221,6 +221,7 @@
      * @param theUser requesting user
      * @throws DBException upon database communication error
      * @todo after expresso v.5.7, change impl to throw exception if servlet filter is not found. Introducing this in v5.6, so legacy does not want exceptions     *
+     * @deprecated use RowSecuredDBobject(ReadOnlyUser) instead.
      */
     public RowSecuredDBObject(int theUser) throws DBException {
         super(theUser);
@@ -242,9 +243,9 @@
      * @throws DBException
      */
     public RowSecuredDBObject(ReadOnlyUser userCredentials) throws DBException {
-        super();
+        super(userCredentials);
         this.setDataContext(RequestRegistry.getDataContext());
-        this.setRequestingUser(userCredentials);
+        checkKeyLength();
     }
 
     /**
@@ -410,6 +411,16 @@
             throws DBException {
         boolean result = false;
 
+        /**
+         * If we're superuser then for sure we're set.
+         */
+        if (getRequestingUser() == SuperUser.SUPER_USER) {
+            return true;
+        } else if (getRequestingUser().isAdmin()) {
+            return true;
+        }
+
+
         if (SEARCH.equals(requestedFunction)) {
             result = canRequesterRead();
         } else if (UPDATE.equals(requestedFunction) ||
@@ -456,7 +467,7 @@
             RowSecuredDBObject rowSecureDBObject = (RowSecuredDBObject) iterator.next();
 
             // key point: this is not set by superclass
-            rowSecureDBObject.setRequestingUid(getRequestingUser().getUid());
+            rowSecureDBObject.setRequestingUser(getRequestingUser());
 
             try {
                 if (rowSecureDBObject.isRowAllowed(requestedFunction)) {
@@ -907,7 +918,7 @@
         // here is the inserted part of override
         if (obj instanceof RowSecuredDBObject) {
             RowSecuredDBObject row = (RowSecuredDBObject) obj;
-            row.setRequestingUid(getRequestingUid());
+            row.setRequestingUser(getRequestingUser());
         }
 
         super.checkDeleteDetailPerm(obj);
Index: Schema.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/Schema.java,v
retrieving revision 1.52
retrieving revision 1.53
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/Schema.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/Schema.java -u -r1.52 -r1.53
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/Schema.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/Schema.java
@@ -96,6 +96,7 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -446,7 +447,7 @@
             StringTokenizer stk = new StringTokenizer(oneHolder, "|");
 
             try {
-                Setup oneSetup = new Setup(SecuredDBObject.SYSTEM_ACCOUNT);
+                Setup oneSetup = new Setup(SuperUser.SUPER_USER);
                 oneSetup.setField("SchemaClass", stk.nextToken());
                 oneSetup.setField("SetupCode", stk.nextToken());
                 oneSetup.setField("Descrip", stk.nextToken());
@@ -647,7 +648,7 @@
                     if (getRequestingUser() != 0) {
                         ((SecuredDBObject) oneDBObject).setRequestingUid(getRequestingUser());
                     } else {
-                        ((SecuredDBObject) oneDBObject).setRequestingUid(SecuredDBObject.SYSTEM_ACCOUNT);
+                        ((SecuredDBObject) oneDBObject).setRequestingUser(SuperUser.SUPER_USER);
                     }
                 }
 
Index: CacheUtils.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/CacheUtils.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/CacheUtils.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/CacheUtils.java -u -r1.18 -r1.19
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/CacheUtils.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/CacheUtils.java
@@ -339,7 +339,7 @@
      * record from database if necessary.
      * All PK (primary keys) must be provided in a single parameter, in format like "getKey()".
      * If the dbobjClass is a subclass of SecurDBObject, requesting UID is set via the RequestRegistry
-     * before any DB retrieval. However, simple SecuredDBObject subclasses use the default 'admin' privileges. 
+     * before any DB retrieval. However, simple SecuredDBObject subclasses use the default 'admin' privileges.
      *
      * @see DBObject#getKey()
      * @param dbobjClass class of desired DBObject
@@ -366,7 +366,7 @@
             try {
                 DBObject o = (DBObject) dbobjClass.newInstance();
                 if ( o instanceof SecurDBObject ) {
-                    ((SecuredDBObject) o).setRequestingUid(RequestRegistry.getUser().getUid());
+                    ((SecuredDBObject) o).setRequestingUser(RequestRegistry.getUser());
                 }
                 o.setKey(keyValues);
                 if ( o.find() ) {
Index: DBSequence.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBSequence.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBSequence.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBSequence.java -u -r1.18 -r1.19
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBSequence.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBSequence.java
@@ -80,6 +80,7 @@
 
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -149,6 +150,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public DBSequence(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * @throws DBException
      */
     public void add()
@@ -451,4 +464,4 @@
 
 } /* DBSequence */
 
-/* DBSequence */
\ No newline at end of file
+/* DBSequence */
Index: AutoDBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/AutoDBObject.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/AutoDBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/AutoDBObject.java -u -r1.20 -r1.21
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/AutoDBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/AutoDBObject.java
@@ -75,6 +75,7 @@
 import java.sql.DatabaseMetaData;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -117,10 +118,23 @@
      *
      * @param uid the user ID or -1 if System privileges
      * @throws DBException upon error
+     * @deprecated since Expresso 5.6.1 Use ReadOnlyUser constructor instead.
      */
     public AutoDBObject(int uid)
             throws DBException {
         super(uid);
+    }
+
+    /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public AutoDBObject(ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
     }
 
     /**
Index: SecurDBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecurDBObject.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecurDBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecurDBObject.java -u -r1.2 -r1.3
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecurDBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecurDBObject.java
@@ -154,6 +154,7 @@
      *               as SecuredDBObject.SYSTEM_ACCOUNT,
      *               t can only be used from within a method.
      * @throws DBException If the object cannot be created
+     * @deprecated as Per Interface spec.  Pass ReadOnlyUsers Instead.
      */
     public SecurDBObject(int newUid)
             throws DBException {
Index: Job.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/job/Job.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/job/Job.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/job/Job.java -u -r1.36 -r1.37
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/job/Job.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/job/Job.java
@@ -90,6 +90,7 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 /**
  * A Job is an asynchronous task who's results will generally be emailed to
@@ -655,7 +656,7 @@
     protected boolean hasParameters()
             throws DBException {
         if (m_jobParamsNum == -1) {
-            JobQueueParam jqp = new JobQueueParam(SecuredDBObject.SYSTEM_ACCOUNT);
+            JobQueueParam jqp = new JobQueueParam(SuperUser.SUPER_USER);
             jqp.setDataContext(getDataContext());
             jqp.setField(JobQueueParam.FLD_JOB_NUMBER, getJobNumber());
             m_jobParamsEntries = jqp.searchAndRetrieveList();
Index: Log.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/logging/Log.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/logging/Log.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/logging/Log.java -u -r1.13 -r1.14
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/logging/Log.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/logging/Log.java
@@ -79,6 +79,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -151,7 +152,7 @@
             if (checkLog()) {
                 myConnection = myPool.getConnection(myName);
 
-                LogEntry myLog = new LogEntry(SecuredDBObject.SYSTEM_ACCOUNT);
+                LogEntry myLog = new LogEntry(SuperUser.SUPER_USER);
                 myConnection.executeUpdate("DELETE FROM " +
                         myLog.getJDBCMetaData().getTargetSQLTable(myLog.getDataContext()));
             } else {
@@ -212,7 +213,7 @@
                 try {
                     myConnection = myPool.getConnection(myName);
 
-                    LogEntry myLog = new LogEntry(SecuredDBObject.SYSTEM_ACCOUNT);
+                    LogEntry myLog = new LogEntry(SuperUser.SUPER_USER);
                     myLog.setField("MessageText", msg);
                     myLog.setField("MessageLevel", "" + newLevel);
                     myLog.add();
@@ -258,7 +259,7 @@
                 try {
                     myConnection = myPool.getConnection(myName);
 
-                    LogEntry myLog = new LogEntry(SecuredDBObject.SYSTEM_ACCOUNT);
+                    LogEntry myLog = new LogEntry(SuperUser.SUPER_USER);
                     myLog.setField("ObjectName", objectName);
                     myLog.setField("MessageText", msg);
                     myLog.setField("MessageLevel", "" + newLevel);
@@ -306,7 +307,7 @@
                 try {
                     myConnection = myPool.getConnection(myName);
 
-                    LogEntry myLog = new LogEntry(SecuredDBObject.SYSTEM_ACCOUNT);
+                    LogEntry myLog = new LogEntry(SuperUser.SUPER_USER);
                     myLog.setField("ObjectName", objectName);
                     myLog.setField("MessageText", msg);
                     myLog.setField("MessageColor", encode(color));
@@ -358,7 +359,7 @@
                 try {
                     myConnection = myPool.getConnection(myName);
 
-                    LogEntry myLog = new LogEntry(SecuredDBObject.SYSTEM_ACCOUNT);
+                    LogEntry myLog = new LogEntry(SuperUser.SUPER_USER);
                     myLog.setField("ObjectName", objectName);
                     myLog.setField("MessageText", msg);
                     myLog.setField("MessageColor", encode(color));
@@ -411,7 +412,7 @@
             try {
                 myConnection = myPool.getConnection(myName);
 
-                LogEntry myLog = new LogEntry(SecuredDBObject.SYSTEM_ACCOUNT);
+                LogEntry myLog = new LogEntry(SuperUser.SUPER_USER);
                 ByteArrayOutputStream bos = new ByteArrayOutputStream();
                 e.printStackTrace(new PrintStream(bos));
                 myLog.setField("MessageText", bos.toString());
@@ -470,7 +471,7 @@
             try {
                 myConnection = myPool.getConnection(myName);
 
-                LogEntry myLog = new LogEntry(SecuredDBObject.SYSTEM_ACCOUNT);
+                LogEntry myLog = new LogEntry(SuperUser.SUPER_USER);
                 ByteArrayOutputStream bos = new ByteArrayOutputStream();
                 e.printStackTrace(new PrintStream(bos));
                 myLog.setField("MessageText", bos.toString());
Index: RecordPaginator.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/RecordPaginator.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/RecordPaginator.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/RecordPaginator.java -u -r1.15 -r1.16
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/RecordPaginator.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/RecordPaginator.java
@@ -78,6 +78,7 @@
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -378,7 +379,7 @@
             throws DBException {
 
         /* Now see if there is a "page limit" for this object */
-        DBObjLimit dl = new DBObjLimit(SecuredDBObject.SYSTEM_ACCOUNT);
+        DBObjLimit dl = new DBObjLimit(SuperUser.SUPER_USER);
         dl.setDataContext(dbObj.getDataContext());
         dl.setField("DBObjectName", ((Object) dbObj).getClass().getName());
 
@@ -428,7 +429,7 @@
             throws DBException {
 
         /* Now see if there is a "page limit" for this object */
-        DBObjLimit dl = new DBObjLimit(SecuredDBObject.SYSTEM_ACCOUNT);
+        DBObjLimit dl = new DBObjLimit(SuperUser.SUPER_USER);
         dl.setDataContext(dbObj.getDataContext());
         dl.setField("DBObjectName", ((Object) dbObj).getClass().getName());
 
@@ -491,4 +492,4 @@
             setPageNumber(1);
         }
     }
-}
\ No newline at end of file
+}
Index: ConfigManager.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/ConfigManager.java,v
retrieving revision 1.83
retrieving revision 1.84
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/ConfigManager.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/ConfigManager.java -u -r1.83 -r1.84
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/ConfigManager.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/misc/ConfigManager.java
@@ -466,7 +466,7 @@
                     if (oneContext.hasSetupTables()) {
 
                         try {
-                            SchemaList sl = new SchemaList(SecuredDBObject.SYSTEM_ACCOUNT);
+                            SchemaList sl = new SchemaList(SuperUser.SUPER_USER);
                             sl.setDataContext(oneDBName);
                             sl.count(); /** count in order to see if table is ok **/
                         } catch (DBException e) {
@@ -483,7 +483,7 @@
                             expressoInitialized = true;
                         }
 
-                        SchemaList sl = new SchemaList(SecuredDBObject.SYSTEM_ACCOUNT);
+                        SchemaList sl = new SchemaList(SuperUser.SUPER_USER);
                         sl.setDataContext(oneDBName);
                         ArrayList al = sl.searchAndRetrieveList();
 
@@ -1273,7 +1273,7 @@
                 new MutableRequestRegistry(oneKey, SuperUser.SUPER_USER);
 
                 try {
-                    SchemaList sl = new SchemaList(SecuredDBObject.SYSTEM_ACCOUNT);
+                    SchemaList sl = new SchemaList(SuperUser.SUPER_USER);
                     sl.setDataContext(oneKey);
                     sl.count();
                 } catch (DBException e) {
Index: RequestRegistryFilter.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/registry/RequestRegistryFilter.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/registry/RequestRegistryFilter.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/registry/RequestRegistryFilter.java -u -r1.6 -r1.7
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/registry/RequestRegistryFilter.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/registry/RequestRegistryFilter.java
@@ -141,7 +141,7 @@
                 } catch (DBException ex1) {
                     //We have a potential situation where the User
                     //table might not exist yet.
-                    DataObject dao = new DefaultUserInfo(Securable.SYSTEM_ACCOUNT);
+                    DataObject dao = new DefaultUserInfo(SuperUser.SUPER_USER);
                     dao.setDataContext(cl.getDBName());
                     try {
                         dao.count();
Index: User.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/User.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/User.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/User.java -u -r1.54 -r1.55
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/User.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/User.java
@@ -873,7 +873,7 @@
     public void postLogin()
             throws DBException, LogException {
         UserInfo myInfo = getUserInfo();
-        UserGroup oneGroup = new UserGroup(SecuredDBObject.SYSTEM_ACCOUNT);
+        UserGroup oneGroup = new UserGroup(SuperUser.SUPER_USER);
         oneGroup.setDataContext(getDataContext());
 
         String theEvent = null;
Index: SuperUser.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/SuperUser.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/SuperUser.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/SuperUser.java -u -r1.4 -r1.5
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/SuperUser.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/security/SuperUser.java
@@ -63,7 +63,6 @@
 
 package com.jcorporate.expresso.core.security;
 
-import com.jcorporate.expresso.core.dataobjects.Securable;
 import com.jcorporate.expresso.core.db.DBException;
 
 /**
@@ -75,18 +74,33 @@
  * @author Michael Rimov
  * @version 1.0
  */
-public class SuperUser extends User {
-    protected SuperUser() {
+final public class SuperUser extends User {
+
+    /**
+     * The one and only instance of the super user.  You can check for SUPER_USER
+     * by comparing object references instead of per field checks.  ie:
+     * <tt>User myUser .... <br/>if (myUser == SuperUser.SUPER_USER){} </tt>
+     */
+    public static final User SUPER_USER;
+
+    /**
+     * The System Uid.  Used to be Securable.SYSTEM_ACCOUNT
+     */
+    public static final int SYSTEM_UID = -1;
+
+    /**
+     * Private Constructor -- do not call.
+     */
+    private SuperUser() {
         super();
     }
 
-    public static final User SUPER_USER;
 
     static {
         try {
             SUPER_USER = new User(new MapBasedUserInfo());
             SUPER_USER.setDBName("default");
-            SUPER_USER.setUid(Securable.SYSTEM_ACCOUNT);
+            SUPER_USER.setUid(SYSTEM_UID);
             SUPER_USER.setLoginName("$NONE$");
             //We need to do this JUST IN CASE somebody tries to log
             //in with it.
Index: ControllerDefault.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerDefault.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerDefault.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerDefault.java -u -r1.12 -r1.13
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerDefault.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerDefault.java
@@ -69,6 +69,7 @@
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
 import com.jcorporate.expresso.core.misc.StringUtil;
 import org.apache.log4j.Logger;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -100,6 +101,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public ControllerDefault(ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -189,4 +202,4 @@
 
 }
 
-/* ControllerDefault */
\ No newline at end of file
+/* ControllerDefault */
Index: RegistrationDBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDBObject.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDBObject.java -u -r1.14 -r1.15
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDBObject.java
@@ -74,6 +74,8 @@
 import org.apache.log4j.Logger;
 
 import java.util.Iterator;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -148,6 +150,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public RegistrationDBObject(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -218,7 +232,7 @@
                     "User '+ " + user.getLoginName() + " specifies registration domain name = '" + user.getRegistrationDomain() + "' but cannot find this domain.");
         }
 
-        RegistrationObjectMap rom = new RegistrationObjectMap(SecuredDBObject.SYSTEM_ACCOUNT);
+        RegistrationObjectMap rom = new RegistrationObjectMap(SuperUser.SUPER_USER);
         rom.setDataContext(user.getDataContext());
         rom.setField("RegDomId", rd.getField("RegDomId"));
 
Index: JobSecurity.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobSecurity.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobSecurity.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobSecurity.java -u -r1.13 -r1.14
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobSecurity.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobSecurity.java
@@ -75,6 +75,8 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -108,6 +110,19 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public JobSecurity(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -143,7 +158,7 @@
      */
     protected void checkAllRefs()
             throws DBException {
-        checkRef("GroupName", new UserGroup(SecuredDBObject.SYSTEM_ACCOUNT),
+        checkRef("GroupName", new UserGroup(SuperUser.SUPER_USER),
                 "Invalid " + getString(getMetaData().getDescription("GroupName")));
     } /* checkAllRefs() */
 
@@ -185,7 +200,7 @@
             throws DBException {
         if (fieldName.equals("JobClass")) {
             if (jobList == null) {
-                SchemaList myList = new SchemaList(SecuredDBObject.SYSTEM_ACCOUNT);
+                SchemaList myList = new SchemaList(SuperUser.SUPER_USER);
                 myList.setDataContext(getDataContext());
 
                 SchemaList oneList = null;
@@ -237,4 +252,4 @@
 
 } /* JobSecurity */
 
-/* JobSecurity */
\ No newline at end of file
+/* JobSecurity */
Index: Setup.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Setup.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Setup.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Setup.java -u -r1.33 -r1.34
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Setup.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Setup.java
@@ -83,6 +83,8 @@
 import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Iterator;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -142,6 +144,19 @@
         super(uid);
     }
 
+
+    /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public Setup(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
     /**
      * For using DBObjects within Controllers.  Initializes based upon the
      * current user and the requested db. [Of course this can be modified later]
@@ -301,7 +316,7 @@
         }
 
         if (!isCaching) {
-            Setup sl = new Setup(SecuredDBObject.SYSTEM_ACCOUNT);
+            Setup sl = new Setup(SuperUser.SUPER_USER);
             sl.setDataContext(dbName);
             sl.setField(SETUP_CODE, setupCode);
             sl.setField(SCHEMA_CLASS, schemaName);
@@ -607,7 +622,7 @@
                                 false);
                     }
 
-                    Setup sl = new Setup(SecuredDBObject.SYSTEM_ACCOUNT);
+                    Setup sl = new Setup(SuperUser.SUPER_USER);
                     sl.setDataContext(oneConfigKey);
 
                     Setup oneSetup = null;
Index: LogEntry.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/LogEntry.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/LogEntry.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/LogEntry.java -u -r1.14 -r1.15
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/LogEntry.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/LogEntry.java
@@ -73,6 +73,8 @@
 import com.jcorporate.expresso.core.dbobj.RequestContext;
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
 import com.jcorporate.expresso.core.misc.DateTime;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -103,6 +105,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public LogEntry(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -133,7 +147,7 @@
             setField("ObjectName", "unknown");
         }
         if (getField("ExpUid").equals("")) {
-            setField("ExpUid", SecuredDBObject.SYSTEM_ACCOUNT);
+            setField("ExpUid", SuperUser.SUPER_USER.getUid());
         }
         if (getField("MessageText").equals("")) {
             setField("MessageText", "No Message");
Index: JobQueueParam.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobQueueParam.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobQueueParam.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobQueueParam.java -u -r1.10 -r1.11
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobQueueParam.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobQueueParam.java
@@ -67,6 +67,7 @@
 import com.jcorporate.expresso.core.db.DBException;
 import com.jcorporate.expresso.core.dbobj.RequestContext;
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -108,6 +109,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public JobQueueParam(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -142,4 +155,4 @@
 
 } /* JobQueueParam */
 
-/* JobQueueParam */
\ No newline at end of file
+/* JobQueueParam */
Index: JobHandlerRegistry.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerRegistry.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerRegistry.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerRegistry.java -u -r1.11 -r1.12
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerRegistry.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerRegistry.java
@@ -66,6 +66,7 @@
 import com.jcorporate.expresso.core.controller.ControllerRequest;
 import com.jcorporate.expresso.core.db.DBException;
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -159,6 +160,18 @@
      */
     public JobHandlerRegistry(int uid) throws DBException {
         super(uid);
+    }
+
+    /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public JobHandlerRegistry(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
     }
 
     /**
Index: UserGroup.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserGroup.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserGroup.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserGroup.java -u -r1.25 -r1.26
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserGroup.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserGroup.java
@@ -73,6 +73,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -127,6 +129,19 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public UserGroup(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -154,27 +169,27 @@
      */
     protected void checkAllReferredToBy()
             throws DBException {
-        referredToBy(new DBObjSecurity(SecuredDBObject.SYSTEM_ACCOUNT),
+        referredToBy(new DBObjSecurity(SuperUser.SUPER_USER),
                 GROUP_NAME_FIELD,
                 "This Group (" + getField(GROUP_NAME_FIELD) +
                 ") is in use by a Database Object security entry");
-        referredToBy(new ControllerSecurity(SecuredDBObject.SYSTEM_ACCOUNT),
+        referredToBy(new ControllerSecurity(SuperUser.SUPER_USER),
                 GROUP_NAME_FIELD,
                 "This Group (" + getField(GROUP_NAME_FIELD) +
                 ") is in use by a Controller security entry");
-        referredToBy(new JobSecurity(SecuredDBObject.SYSTEM_ACCOUNT),
+        referredToBy(new JobSecurity(SuperUser.SUPER_USER),
                 GROUP_NAME_FIELD,
                 "This Group (" + getField(GROUP_NAME_FIELD) +
                 ") is in use by a Job security entry");
-        referredToBy(new GroupMembers(SecuredDBObject.SYSTEM_ACCOUNT),
+        referredToBy(new GroupMembers(SuperUser.SUPER_USER),
                 GROUP_NAME_FIELD,
                 "This Group (" + getField(GROUP_NAME_FIELD) +
                 ") still has members ");
-        referredToBy(new GroupNest(SecuredDBObject.SYSTEM_ACCOUNT),
+        referredToBy(new GroupNest(SuperUser.SUPER_USER),
                 GroupNest.FLD_GROUPNAME,
                 "This Group (" + getField(GROUP_NAME_FIELD) +
                 ") is in use by a Group Member Nesting entry");
-        referredToBy(new GroupNest(SecuredDBObject.SYSTEM_ACCOUNT),
+        referredToBy(new GroupNest(SuperUser.SUPER_USER),
                 GroupNest.FLD_MEMBEROF,
                 "This Group (" + getField(GROUP_NAME_FIELD) +
                 ") is in use by a Group Member Nesting entry");
@@ -187,7 +202,7 @@
      */
     public void delete()
             throws DBException {
-        GroupMembers groupMList = new GroupMembers(SecuredDBObject.SYSTEM_ACCOUNT);
+        GroupMembers groupMList = new GroupMembers(SuperUser.SUPER_USER);
         groupMList.setDataContext(getDataContext());
         groupMList.setField(GROUP_NAME_FIELD, getField(GROUP_NAME_FIELD));
 
@@ -320,4 +335,4 @@
         UserGroup search = new UserGroup();
         return search.searchAndRetrieveList();
     }
-} /* UserGroup */
\ No newline at end of file
+} /* UserGroup */
Index: ValidationQueueParam.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueueParam.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueueParam.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueueParam.java -u -r1.10 -r1.11
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueueParam.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueueParam.java
@@ -67,6 +67,7 @@
 import com.jcorporate.expresso.core.db.DBException;
 import com.jcorporate.expresso.core.dbobj.RequestContext;
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -111,6 +112,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public ValidationQueueParam(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -151,4 +164,4 @@
                 "com.jcorporate.expresso.services.dbobj.ValidationQueue");
         addKey(FLD_PARAM_NUM);
     }
-}
\ No newline at end of file
+}
Index: UserPreferenceDef.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceDef.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceDef.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceDef.java -u -r1.11 -r1.12
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceDef.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceDef.java
@@ -67,6 +67,7 @@
 import com.jcorporate.expresso.core.controller.ControllerRequest;
 import com.jcorporate.expresso.core.db.DBException;
 import com.jcorporate.expresso.core.servlet.CheckLogin;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -115,6 +116,19 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public UserPreferenceDef(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -218,4 +232,4 @@
         oneDef.addIfNeeded();
 
     } /* populateDefaultValues() */
-}
\ No newline at end of file
+}
Index: SchemaList.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/SchemaList.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/SchemaList.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/SchemaList.java -u -r1.18 -r1.19
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/SchemaList.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/SchemaList.java
@@ -77,6 +77,7 @@
 import org.apache.log4j.Logger;
 
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -142,6 +143,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public SchemaList(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -260,4 +273,4 @@
 
 } /* SchemaList */
 
-/* SchemaList */
\ No newline at end of file
+/* SchemaList */
Index: RegistrationDomain.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDomain.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDomain.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDomain.java -u -r1.20 -r1.21
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDomain.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDomain.java
@@ -75,6 +75,8 @@
 
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -89,7 +91,7 @@
  * @author Shash Chatterjee
  */
 public class RegistrationDomain extends SecuredDBObject {
-    
+
     /**
      * Field Names for the REGDOMAIN table
      */
@@ -106,7 +108,7 @@
     public static final String FLD_APPROVERS = "Approvers";
     public static final String FLD_NOTREGGRP = "NotRegGrp";
     public static final String FLD_NOTAPPROVEDGRP = "NotApprovedGrp";
-    
+
     /**
      * Default constructor
      *
@@ -129,6 +131,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public RegistrationDomain(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the
      * current user and the requested db. [Of course this can be modified
      * later]
@@ -254,7 +268,7 @@
      */
     public static RegistrationDomain buildDefaultRegistrationDomain(String dbContext) throws DBException {
         String regDomain = Setup.getValueRequired(dbContext, "defaultRegDomain");
-        RegistrationDomain rd = new RegistrationDomain(SecuredDBObject.SYSTEM_ACCOUNT);
+        RegistrationDomain rd = new RegistrationDomain(SuperUser.SUPER_USER);
         rd.setDataContext(dbContext);
         rd.setField(FLD_NAME, regDomain);
 
@@ -373,7 +387,7 @@
      * @throws DBException If there is a problem checking the integrity
      */
     protected void checkAllRefs() throws DBException {
-        checkRef(FLD_GROUPNAME, new UserGroup(SecuredDBObject.SYSTEM_ACCOUNT),
+        checkRef(FLD_GROUPNAME, new UserGroup(SuperUser.SUPER_USER),
                 "Invalid " + getString(getMetaData().getDescription(FLD_GROUPNAME)));
     }
     /* checkAllRefs() */
Index: ControllerSecurity.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerSecurity.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerSecurity.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerSecurity.java -u -r1.12 -r1.13
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerSecurity.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ControllerSecurity.java
@@ -68,6 +68,7 @@
 import com.jcorporate.expresso.core.db.DBException;
 import com.jcorporate.expresso.core.dbobj.RequestContext;
 import com.jcorporate.expresso.core.servlet.StdServlet;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -112,6 +113,19 @@
             throws DBException {
         super(uid);
     }
+
+    /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public ControllerSecurity(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
 
     /**
      * For using DBObjects within Controllers.  Initializes based upon the current
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.28
retrieving revision 1.29
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/GroupMembers.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/GroupMembers.java -u -r1.28 -r1.29
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/GroupMembers.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/GroupMembers.java
@@ -76,6 +76,8 @@
 
 import java.util.Date;
 import java.util.Iterator;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -137,6 +139,19 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public GroupMembers(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -181,7 +196,7 @@
                     maxDepth + " levels.");
         }
 
-        GroupNest gnl = new GroupNest(SecuredDBObject.SYSTEM_ACCOUNT);
+        GroupNest gnl = new GroupNest(SuperUser.SUPER_USER);
         gnl.setDataContext(getDataContext());
 
         GroupNest oneNest = null;
@@ -191,7 +206,7 @@
              enl.hasNext();) {
             oneNest = (GroupNest) enl.next();
 
-            GroupMembers newMember = new GroupMembers(SecuredDBObject.SYSTEM_ACCOUNT);
+            GroupMembers newMember = new GroupMembers(SuperUser.SUPER_USER);
             newMember.setDataContext(getDataContext());
 
             /* check to see if the user is a member of the nested group. */
@@ -366,4 +381,4 @@
     public void setUID(int uid) throws DBException {
         setField(EXPUID, uid);
     }
-} /* GroupMembers */
\ No newline at end of file
+} /* GroupMembers */
Index: DBObjLimit.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjLimit.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjLimit.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjLimit.java -u -r1.23 -r1.24
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjLimit.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjLimit.java
@@ -79,6 +79,8 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -118,6 +120,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public DBObjLimit(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -169,7 +183,7 @@
             throws DBException {
         if (fieldName.equals(DB_OBJECT_NAME)) {
             if (dbObjList == null) {
-                SchemaList myList = new SchemaList(SecuredDBObject.SYSTEM_ACCOUNT);
+                SchemaList myList = new SchemaList(SuperUser.SUPER_USER);
                 myList.setDataContext(getDataContext());
 
                 SchemaList oneList = null;
Index: DBObjImpl.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjImpl.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjImpl.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjImpl.java -u -r1.14 -r1.15
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjImpl.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjImpl.java
@@ -75,6 +75,8 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -108,6 +110,17 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public DBObjImpl(ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -157,7 +170,7 @@
             throws DBException {
         if (fieldName.equals("DBObjectName")) {
             if (dbObjList == null) {
-                SchemaList myList = new SchemaList(SecuredDBObject.SYSTEM_ACCOUNT);
+                SchemaList myList = new SchemaList(SuperUser.SUPER_USER);
                 myList.setDataContext(getDataContext());
 
                 SchemaList oneList = null;
@@ -219,4 +232,4 @@
 
 } /* DBObjImpl */
 
-/* DBObjImpl */
\ No newline at end of file
+/* DBObjImpl */
Index: MediaDBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MediaDBObject.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MediaDBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MediaDBObject.java -u -r1.9 -r1.10
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MediaDBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MediaDBObject.java
@@ -81,6 +81,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.sql.SQLException;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 /**
  * A MediaDBObject is a DBObject intended to be used for storage of media objects
@@ -208,6 +209,18 @@
     public MediaDBObject(int newUid)
             throws DBException {
         super(newUid);
+    }
+
+    /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public MediaDBObject(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
     }
 
     /**
Index: DBObjSecurity.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjSecurity.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjSecurity.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjSecurity.java -u -r1.17 -r1.18
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjSecurity.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBObjSecurity.java
@@ -75,6 +75,8 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -116,6 +118,19 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public DBObjSecurity(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -131,7 +146,7 @@
      */
     protected void checkAllRefs()
             throws DBException {
-        checkRef(GROUP_NAME, new UserGroup(SecuredDBObject.SYSTEM_ACCOUNT),
+        checkRef(GROUP_NAME, new UserGroup(SuperUser.SUPER_USER),
                 "Invalid " + getString(getMetaData().getDescription(GROUP_NAME)));
     } /* checkAllRefs() */
 
@@ -188,7 +203,7 @@
             return myValues;
         } else if (fieldName.equals(DBOBJECT_NAME)) {
             if (dbObjList == null) {
-                SchemaList myList = new SchemaList(SecuredDBObject.SYSTEM_ACCOUNT);
+                SchemaList myList = new SchemaList(SuperUser.SUPER_USER);
                 myList.setDataContext(getDataContext());
 
                 SchemaList oneList = null;
Index: RegistrationObjectMap.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationObjectMap.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationObjectMap.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationObjectMap.java -u -r1.11 -r1.12
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationObjectMap.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationObjectMap.java
@@ -70,6 +70,8 @@
 import com.jcorporate.expresso.core.dbobj.ValidValue;
 
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -113,6 +115,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public RegistrationObjectMap(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -161,7 +175,7 @@
     protected void checkAllRefs()
             throws DBException {
         checkRef("RegDomId",
-                new RegistrationDomain(SecuredDBObject.SYSTEM_ACCOUNT),
+                new RegistrationDomain(SuperUser.SUPER_USER),
                 "Invalid " + getString(getMetaData().getDescription("RegDomId")));
     } /* checkAllRefs() */
 
@@ -242,4 +256,4 @@
 
         super.update();
     }
-}
\ No newline at end of file
+}
Index: ValidationQueue.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueue.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueue.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueue.java -u -r1.19 -r1.20
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueue.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/ValidationQueue.java
@@ -74,6 +74,8 @@
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -133,6 +135,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public ValidationQueue(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * Constructor that sets the connection on create
      *
      * @param conn The dbConnection object to associate with this object
@@ -269,7 +283,7 @@
         myParams = new Vector(3);
         valuesCoded = new Hashtable(3);
 
-        ValidationQueueParam paramList = new ValidationQueueParam(SecuredDBObject.SYSTEM_ACCOUNT);
+        ValidationQueueParam paramList = new ValidationQueueParam(SuperUser.SUPER_USER);
         paramList.setDataContext(getDataContext());
         paramList.setField(ValidationQueueParam.FLD_QUEUE_ID, getField(FLD_ID));
 
@@ -321,4 +335,4 @@
         addDetail(com.jcorporate.expresso.services.dbobj.ValidationQueueParam.class.getName(),
                 FLD_ID, ValidationQueueParam.FLD_QUEUE_ID);
     }
-}
\ No newline at end of file
+}
Index: MimeTypes.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MimeTypes.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MimeTypes.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MimeTypes.java -u -r1.19 -r1.20
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MimeTypes.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/MimeTypes.java
@@ -82,6 +82,8 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -142,6 +144,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public MimeTypes(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -258,7 +272,7 @@
             throw new DBException("Unable to locate MIME type for filename: " + fileName);
         }
 
-        MimeTypes mt = new MimeTypes(SecuredDBObject.SYSTEM_ACCOUNT);
+        MimeTypes mt = new MimeTypes(SuperUser.SUPER_USER);
         if (StringUtil.isBlankOrNull(dataContext)) {
             mt.setDataContext("default");
         } else {
@@ -291,7 +305,7 @@
      */
     public static MimeTypes getMimeTypeFromMimeId(int mimeNumber, String dataContext)
             throws DBException {
-        MimeTypes mt = new MimeTypes(SecuredDBObject.SYSTEM_ACCOUNT);
+        MimeTypes mt = new MimeTypes(SuperUser.SUPER_USER);
         if (StringUtil.isBlankOrNull(dataContext)) {
             mt.setDataContext("default");
         } else {
@@ -327,7 +341,7 @@
                 }
 
                 try {
-                    MimeTypes mt = new MimeTypes(SecuredDBObject.SYSTEM_ACCOUNT);
+                    MimeTypes mt = new MimeTypes(SuperUser.SUPER_USER);
                     if (dataContext != null && dataContext.length() > 0) {
                         mt.setDataContext(dataContext);
                     }
Index: Event.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Event.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Event.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Event.java -u -r1.20 -r1.21
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Event.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/Event.java
@@ -84,6 +84,8 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -120,6 +122,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public Event(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -146,7 +160,7 @@
     public Event(String dbName, String theEvent, String theMessage,
                  boolean success)
             throws DBException, LogException {
-        this(SecuredDBObject.SYSTEM_ACCOUNT);
+        this(SuperUser.SUPER_USER);
         setDataContext(dbName);
         setField("Event", theEvent);
 
@@ -189,7 +203,7 @@
      */
     public void sendMail(Vector theMessage, boolean success)
             throws DBException, LogException {
-        EventMail myEventMails = new EventMail(SecuredDBObject.SYSTEM_ACCOUNT);
+        EventMail myEventMails = new EventMail(SuperUser.SUPER_USER);
         myEventMails.setDataContext(getDataContext());
 
         EventMail oneEventMail = null;
Index: DefaultUserInfo.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DefaultUserInfo.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DefaultUserInfo.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DefaultUserInfo.java -u -r1.53 -r1.54
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DefaultUserInfo.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DefaultUserInfo.java
@@ -98,6 +98,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
+import com.jcorporate.expresso.core.security.SuperUser;
 
 
 /**
@@ -257,6 +259,19 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public DefaultUserInfo(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+
+    /**
      * constructor for db transactions
      *
      * @param localConnection the DB connection which should be used, typically because of an ongoing transaction
@@ -867,7 +882,7 @@
      */
     public void postLogin()
             throws DBException, LogException {
-        UserGroup oneGroup = new UserGroup(SecuredDBObject.SYSTEM_ACCOUNT);
+        UserGroup oneGroup = new UserGroup(SuperUser.SUPER_USER);
         oneGroup.setDataContext(getDataContext());
 
         String theEvent = null;
Index: DBMessage.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBMessage.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBMessage.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBMessage.java -u -r1.10 -r1.11
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBMessage.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBMessage.java
@@ -67,6 +67,7 @@
 import com.jcorporate.expresso.core.controller.ControllerRequest;
 import com.jcorporate.expresso.core.db.DBException;
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -99,6 +100,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public DBMessage(ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -131,4 +144,4 @@
 
 } /* DBMessage */
 
-/* DBMessage */
\ No newline at end of file
+/* DBMessage */
Index: CacheSync.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/CacheSync.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/CacheSync.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/CacheSync.java -u -r1.10 -r1.11
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/CacheSync.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/CacheSync.java
@@ -70,6 +70,7 @@
 import com.jcorporate.expresso.core.dbobj.ValidValue;
 
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -96,6 +97,7 @@
      *
      * @param uid the expresso integer uid
      * @throws DBException upon initialization error
+     * @deprecated Since Expresso 5.6
      */
     public CacheSync(int uid)
             throws DBException {
@@ -103,6 +105,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public CacheSync(ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -163,4 +177,4 @@
 
 } /* CacheSync */
 
-/* CacheSync */
\ No newline at end of file
+/* CacheSync */
Index: UserPreferenceVal.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceVal.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceVal.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceVal.java -u -r1.9 -r1.10
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceVal.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreferenceVal.java
@@ -67,6 +67,7 @@
 import com.jcorporate.expresso.core.db.DBException;
 import com.jcorporate.expresso.core.dbobj.RequestContext;
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -100,6 +101,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public UserPreferenceVal(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -144,4 +157,4 @@
 
 } /* UserPrefereceVal */
 
-/* UserPrefereceVal */
\ No newline at end of file
+/* UserPrefereceVal */
Index: UserPreference.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreference.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreference.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreference.java -u -r1.14 -r1.15
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreference.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/UserPreference.java
@@ -70,6 +70,7 @@
 import com.jcorporate.expresso.core.security.UserListener;
 
 import java.util.Iterator;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -117,6 +118,19 @@
             throws DBException {
         super(uid);
     }
+
+    /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public UserPreference(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
 
     /**
      * For using DBObjects within Controllers.  Initializes based upon the current
Index: DBOtherMap.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBOtherMap.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBOtherMap.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBOtherMap.java -u -r1.12 -r1.13
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBOtherMap.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/DBOtherMap.java
@@ -68,6 +68,7 @@
 import com.jcorporate.expresso.core.dbobj.RequestContext;
 import com.jcorporate.expresso.core.dbobj.SecuredDBObject;
 import com.jcorporate.expresso.core.misc.ConfigManager;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 
 /**
@@ -105,6 +106,18 @@
     }
 
     /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public DBOtherMap(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
+    }
+
+    /**
      * For using DBObjects within Controllers.  Initializes based upon the current
      * user and the requested db. [Of course this can be modified later]
      *
@@ -196,4 +209,4 @@
 
 } /* DBOtherMap */
 
-/* DBOtherMap */
\ No newline at end of file
+/* DBOtherMap */
Index: JobHandlerControl.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerControl.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerControl.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerControl.java -u -r1.14 -r1.15
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerControl.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobHandlerControl.java
@@ -72,6 +72,7 @@
 import com.jcorporate.expresso.core.misc.DateTime;
 
 import java.util.Vector;
+import com.jcorporate.expresso.core.security.ReadOnlyUser;
 
 /**
  * applies operations (commands) to all jobs running on a server.
@@ -113,6 +114,18 @@
     public JobHandlerControl(int uid)
             throws DBException {
         super(uid);
+    }
+
+    /**
+     * Constructs this data object using the specified user security
+     * context.  You can often get this parameter using the <tt>RequestRegistry</tt>
+     * objects.  Use this constructor instead of the old integer uid constructor
+     * since ultimately it results in performance gains for the application.
+     * @param userSecuityContext ReadOnlyUser  user security credentials.
+     * @throws DBException upon construction error.
+     */
+    public JobHandlerControl(final ReadOnlyUser userSecuityContext) throws DBException {
+        super(userSecuityContext);
     }
 
     /**
Index: JobQueue.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobQueue.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobQueue.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/JobQueue.j