Package org.apache.sling.cms.reference.models

## Class Search

- java.lang.Object
- - org.apache.sling.cms.reference.models.Search

    @Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class)
    public class Search
    extends Object

Model for retrieving search results and pagination based on a search of the Sling CMS repository.

### Field Summary

Fields
`static String` `TERM_PARAMETER`

### Constructor Summary

Constructors
`Search​(org.apache.sling.api.SlingHttpServletRequest request, int limit, SearchService searchService, String basePath)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getCount()`
`int` `getCurrentPage()`
`int` `getEnd()`
`Integer[]` `getPages()`
`List<org.apache.sling.api.resource.Resource>` `getResults()`
`int` `getStart()`
`String` `getTerm()`
`boolean` `isFirst()`
`boolean` `isLast()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### TERM_PARAMETER

    public static final String TERM_PARAMETER

See Also:
  Constant Field Values

### Constructor Detail

#### Search

    @Inject
    public Search​(org.apache.sling.api.SlingHttpServletRequest request,
                  @Named("limit")
                  int limit,
                  SearchService searchService,
                  @Named("basePath")
                  String basePath)

### Method Detail

#### getCount

    public int getCount()

#### getCurrentPage

    public int getCurrentPage()

#### getEnd

    public int getEnd()

#### getPages

    public Integer[] getPages()

#### getResults

    public List<org.apache.sling.api.resource.Resource> getResults()

#### getStart

    public int getStart()

#### getTerm

    public String getTerm()

#### isFirst

    public boolean isFirst()

#### isLast

    public boolean isLast()