@@ -1517,15 +1517,19 @@ private Pair<List<ProjectJoinVO>, Integer> listProjectsInternal(ListProjectsCmd
15171517 }
15181518
15191519 if (accountId != null ) {
1520- sb .and ("accountId" , sb .entity ().getAccountId (), SearchCriteria .Op .EQ );
1520+ if (userId == null ) {
1521+ sb .and ().op ("accountId" , sb .entity ().getAccountId (), SearchCriteria .Op .EQ );
1522+ sb .and ("userIdNull" , sb .entity ().getUserId (), Op .NULL );
1523+ sb .cp ();
1524+ } else {
1525+ sb .and ("accountId" , sb .entity ().getAccountId (), SearchCriteria .Op .EQ );
1526+ }
15211527 }
15221528
15231529 if (userId != null ) {
15241530 sb .and ().op ("userId" , sb .entity ().getUserId (), Op .EQ );
15251531 sb .or ("userIdNull" , sb .entity ().getUserId (), Op .NULL );
15261532 sb .cp ();
1527- } else {
1528- sb .and ("userIdNull" , sb .entity ().getUserId (), Op .NULL );
15291533 }
15301534
15311535 SearchCriteria <ProjectJoinVO > sc = sb .create ();
@@ -2585,6 +2589,7 @@ private Pair<List<ImageStoreJoinVO>, Integer> searchForImageStoresInternal(ListI
25852589 Object keyword = cmd .getKeyword ();
25862590 Long startIndex = cmd .getStartIndex ();
25872591 Long pageSize = cmd .getPageSizeVal ();
2592+ Boolean readonly = cmd .getReadonly ();
25882593
25892594 Filter searchFilter = new Filter (ImageStoreJoinVO .class , "id" , Boolean .TRUE , startIndex , pageSize );
25902595
@@ -2597,6 +2602,7 @@ private Pair<List<ImageStoreJoinVO>, Integer> searchForImageStoresInternal(ListI
25972602 sb .and ("protocol" , sb .entity ().getProtocol (), SearchCriteria .Op .EQ );
25982603 sb .and ("provider" , sb .entity ().getProviderName (), SearchCriteria .Op .EQ );
25992604 sb .and ("role" , sb .entity ().getRole (), SearchCriteria .Op .EQ );
2605+ sb .and ("readonly" , sb .entity ().isReadonly (), Op .EQ );
26002606
26012607 SearchCriteria <ImageStoreJoinVO > sc = sb .create ();
26022608 sc .setParameters ("role" , DataStoreRole .Image );
@@ -2625,6 +2631,9 @@ private Pair<List<ImageStoreJoinVO>, Integer> searchForImageStoresInternal(ListI
26252631 if (protocol != null ) {
26262632 sc .setParameters ("protocol" , protocol );
26272633 }
2634+ if (readonly != null ) {
2635+ sc .setParameters ("readonly" , readonly );
2636+ }
26282637
26292638 // search Store details by ids
26302639 Pair <List <ImageStoreJoinVO >, Integer > uniqueStorePair = _imageStoreJoinDao .searchAndCount (sc , searchFilter );
0 commit comments