Examples of PresentationControlParameters


Examples of org.wijiscommons.ssaf.schema.search.PresentationControlParameters

               
                int recordCount = solrSearchResult.size();

                SearchResult searchResult = new SearchResult();
               
                PresentationControlParameters presentationControlParameters =
                    new PresentationControlParameters();
               
                if (recordCount == (rows + 1))
                {
                    presentationControlParameters.setMoreRecordsAvailable(true);
                    solrSearchResult.remove(recordCount - 1);
                    recordCount = recordCount - 1;
                }
               
                if (solrSearchResult.size() > 0)
                {
                    List<String> pointerLocations =
                        getPointerLocations(solrSearchResult);

                    // Get Pointers
                    Pointers pointers = getPointers(pointerLocations);

                    searchResult.setPointers(pointers);
                }
                else
                {
                    searchResult.setEmpty(new Empty());
                }
       
        // Set SearchResults
        searchResult.setSearchItems(searchItems);
       
        presentationControlParameters.setReturnedRecordCount(BigInteger
                        .valueOf(recordCount));
                presentationControlParameters.setTotalRecordCount(BigInteger
                        .valueOf(solrSearchResult.getNumFound()));
                presentationControlParameters
                        .setRequestedStartOffset(BigInteger
                                .valueOf(startOffSet));
        presentationControlParameters.setRequestedEndOffset(BigInteger
                        .valueOf(endOffset));

                presentationControlParameters.getSort().addAll(
                    searchRequest.getPresentationControlParameters().getSort() );
        searchResult
                        .setPresentationControlParameters(presentationControlParameters);
        // Return Document
                return marshal(searchResult);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.