]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5943: Added comments, pseudocode for adding an inAuthority restriction to...
authorAron Roberts <aron@socrates.berkeley.edu>
Thu, 28 Mar 2013 02:09:15 +0000 (19:09 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Thu, 28 Mar 2013 02:09:15 +0000 (19:09 -0700)
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java

index 64f90839e30291e3ffd09a8da1421d9b12b5fd59..a4be744c9dc3ce8c38c6a56eb3acde5a86167d7c 100644 (file)
@@ -936,6 +936,25 @@ public class RepositoryJavaClientImpl implements RepositoryClient<PoxPayloadIn,
                 + " WHERE (tg.termdisplayname ILIKE ?) "
                 + "   AND (misc.lifecyclestate <> 'deleted') ";
         
+                
+        // FIXME: Need to add a WHERE clause restriction on inAuthority
+        
+        // FIXME: Need to handle the '_ALL_' case for inAuthority by removing
+        // that restriction (see AuthorityResource.getAuthorityItemList())
+        
+/*
+        Pseudo-code-like continuation
+        String inAuthority = handler.getJDBCQueryParams().get(IN_AUTHORITY_PARAM);
+        if (Tools.notBlank(inAuthority) {
+            if (!inAuthority.equals.(AuthorityResource.PARENT_WILDCARD)) {
+                sql = sql + " AND (commonschema.inauthority = '" + handler.getInAuthorityValue() + "') ";
+            }
+        }
+*/
+        
+        // FIXME: We might also consider skipping the JOIN on the common schema table
+        // in the '_ALL_' case, where we are not restricting by inAuthority value
+        
         PreparedStatementBuilder jdbcFilterBuilder = new PreparedStatementBuilder(sql){
             @Override
             protected void preparePrepared(PreparedStatement preparedStatement)