Class Hits
- java.lang.Object
-
- com.amazonaws.services.cloudsearchdomain.model.Hits
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Hits extends Object implements Serializable, Cloneable
The collection of documents that match the search request.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Hits()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Hits
clone()
boolean
equals(Object obj)
String
getCursor()
A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.Long
getFound()
The total number of documents that match the search request.List<Hit>
getHit()
A document that matches the search request.Long
getStart()
The index of the first matching document.int
hashCode()
void
setCursor(String cursor)
A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.void
setFound(Long found)
The total number of documents that match the search request.void
setHit(Collection<Hit> hit)
A document that matches the search request.void
setStart(Long start)
The index of the first matching document.String
toString()
Returns a string representation of this object; useful for testing and debugging.Hits
withCursor(String cursor)
A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.Hits
withFound(Long found)
The total number of documents that match the search request.Hits
withHit(Hit... hit)
A document that matches the search request.Hits
withHit(Collection<Hit> hit)
A document that matches the search request.Hits
withStart(Long start)
The index of the first matching document.
-
-
-
Method Detail
-
setFound
public void setFound(Long found)
The total number of documents that match the search request.
- Parameters:
found
- The total number of documents that match the search request.
-
getFound
public Long getFound()
The total number of documents that match the search request.
- Returns:
- The total number of documents that match the search request.
-
withFound
public Hits withFound(Long found)
The total number of documents that match the search request.
- Parameters:
found
- The total number of documents that match the search request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStart
public void setStart(Long start)
The index of the first matching document.
- Parameters:
start
- The index of the first matching document.
-
getStart
public Long getStart()
The index of the first matching document.
- Returns:
- The index of the first matching document.
-
withStart
public Hits withStart(Long start)
The index of the first matching document.
- Parameters:
start
- The index of the first matching document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCursor
public void setCursor(String cursor)
A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.
- Parameters:
cursor
- A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.
-
getCursor
public String getCursor()
A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.
- Returns:
- A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.
-
withCursor
public Hits withCursor(String cursor)
A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.
- Parameters:
cursor
- A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getHit
public List<Hit> getHit()
A document that matches the search request.
- Returns:
- A document that matches the search request.
-
setHit
public void setHit(Collection<Hit> hit)
A document that matches the search request.
- Parameters:
hit
- A document that matches the search request.
-
withHit
public Hits withHit(Hit... hit)
A document that matches the search request.
NOTE: This method appends the values to the existing list (if any). Use
setHit(java.util.Collection)
orwithHit(java.util.Collection)
if you want to override the existing values.- Parameters:
hit
- A document that matches the search request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withHit
public Hits withHit(Collection<Hit> hit)
A document that matches the search request.
- Parameters:
hit
- A document that matches the search request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-