You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/05/13 18:36:38 UTC

svn commit: rev 10626 - incubator/directory/rms/trunk/jdbc/src/java/org/apache/rms/jdbc/oracle

Author: akarasulu
Date: Thu May 13 09:36:36 2004
New Revision: 10626

Modified:
   incubator/directory/rms/trunk/jdbc/src/java/org/apache/rms/jdbc/oracle/PermissionConstraints.java
Log:

 o made some public constants private
 o factored out a constant for bit index limits



Modified: incubator/directory/rms/trunk/jdbc/src/java/org/apache/rms/jdbc/oracle/PermissionConstraints.java
==============================================================================
--- incubator/directory/rms/trunk/jdbc/src/java/org/apache/rms/jdbc/oracle/PermissionConstraints.java	(original)
+++ incubator/directory/rms/trunk/jdbc/src/java/org/apache/rms/jdbc/oracle/PermissionConstraints.java	Thu May 13 09:36:36 2004
@@ -37,22 +37,26 @@
 public class PermissionConstraints 
 {
     /** sql used to get the list of app perm indices in ascending order */
-    public static String PERM_INDICES_SQL = 
+    private static String PERM_INDICES_SQL =
         "SELECT PERM_INDEX FROM APP_PERMS WHERE APP_NAME = "
         + "? ORDER BY PERM_INDEX" ;
     /** sql used to insert a new permission into the APP_PERM table */
-    public static String INSERT_PERM_SQL = 
+    private static String INSERT_PERM_SQL =
         "INSERT INTO APP_PERMS (APP_NAME, PERM, PERM_INDEX) VALUES (?, ?, ?)" ;
     /** sql used to check if a perm index is in use */
-    public static String CHK_PERM_INDEX_SQL = 
+    private static String CHK_PERM_INDEX_SQL =
         "SELECT PERM_INDEX FROM APP_PERMS WHERE APP_NAME = "
         + "? AND PERM_INDEX = ?" ;
     /** selects all the grants of roles in an application */
-    public static final String ROLE_GRANTS_SQL = 
+    private static final String ROLE_GRANTS_SQL =
         "SELECT GRANTS FROM APP_ROLES WHERE APP_NAME = ? " ;
     /** selects all the grants and denials of user profiles for an app */
-    public static final String USER_VECTORS_SQL =
+    private static final String USER_VECTORS_SQL =
         "SELECT GRANTS, DENIALS FROM USER_APP_PROFILES WHERE APP_NAME = ? " ;
+    /** the maximum byte length for the raw data type */
+    private static final int RAW_MAX_BYTES = 2000 ;
+    /** the maximum bit index value */
+    private static final int INDEX_LIMIT = RAW_MAX_BYTES * 8 - 1  ;
 
 
     /**
@@ -113,7 +117,7 @@
             }
         }
         
-        if ( l_index >= 8000 )
+        if ( l_index >= INDEX_LIMIT )
         {
             return -1 ;
         }