@Override public int getResultCount() { int count = 0; Set<IdentityStore<?>> identityStores = this.storeSelector.getStoresForIdentityQuery(this.context, this.getIdentityType()); for (IdentityStore<?> store : identityStores) { count = count + store.countQueryResults(this.context, this); } return count; }
@Override public int getResultCount() { int count = 0; Set<IdentityStore<?>> identityStores = this.storeSelector.getStoresForIdentityQuery(this.context, this.getIdentityType()); for (IdentityStore<?> store : identityStores) { count = count + store.countQueryResults(this.context, this); } return count; }
@Override public List<T> getResultList() { // remove this statement once deprecated methods on IdentityQuery are removed if (this.sortParameters != null) { for (QueryParameter parameter : this.sortParameters) { if (isSortAscending()) { sortBy(this.queryBuilder.asc(parameter)); } else { sortBy(this.queryBuilder.desc(parameter)); } } } List<T> result = new ArrayList<T>(); try { Set<IdentityStore<?>> identityStores = this.storeSelector.getStoresForIdentityQuery(this.context, this.getIdentityType()); AttributeStore<?> attributeStore = this.storeSelector.getStoreForAttributeOperation(context); for (IdentityStore<?> store : identityStores) { for (T identityType : store.fetchQueryResults(this.context, this)) { configureDefaultPartition(this.context, identityType, store, this.partitionManager); if (attributeStore != null) { attributeStore.loadAttributes(this.context, identityType); } result.add(identityType); } } } catch (Exception e) { throw MESSAGES.queryIdentityTypeFailed(this, e); } return result; }
@Override public List<T> getResultList() { // remove this statement once deprecated methods on IdentityQuery are removed if (this.sortParameters != null) { for (QueryParameter parameter : this.sortParameters) { if (isSortAscending()) { sortBy(this.queryBuilder.asc(parameter)); } else { sortBy(this.queryBuilder.desc(parameter)); } } } List<T> result = new ArrayList<T>(); try { Set<IdentityStore<?>> identityStores = this.storeSelector.getStoresForIdentityQuery(this.context, this.getIdentityType()); AttributeStore<?> attributeStore = this.storeSelector.getStoreForAttributeOperation(context); for (IdentityStore<?> store : identityStores) { for (T identityType : store.fetchQueryResults(this.context, this)) { configureDefaultPartition(this.context, identityType, store, this.partitionManager); if (attributeStore != null) { attributeStore.loadAttributes(this.context, identityType); } result.add(identityType); } } } catch (Exception e) { throw MESSAGES.queryIdentityTypeFailed(this, e); } return result; }