Package com.flower.docs.domain.search
Class SearchResults<T>
- java.lang.Object
-
- com.flower.docs.domain.search.SearchResults<T>
-
- Type Parameters:
T
- The type of objects
- All Implemented Interfaces:
java.io.Serializable
public class SearchResults<T> extends java.lang.Object implements java.io.Serializable
Stands for objects of a search. This object allows to encapsulate both the objects of a search and the total number which can be different according to pagination- Author:
- Christopher Laszczuk
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SearchResults()
SearchResults(java.util.List<T> objects, long found)
SearchResults(java.util.List<T> objects, long found, long duration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDuration()
long
getFound()
Gets the total number of found resultsjava.util.List<T>
getObjects()
Gets the objects of represented searchvoid
setDuration(long duration)
void
setFound(long found)
void
setObjects(java.util.List<T> results)
java.lang.String
toString()
-
-
-
Method Detail
-
getObjects
public java.util.List<T> getObjects()
Gets the objects of represented search- Returns:
- A list of search objects
-
setObjects
public void setObjects(java.util.List<T> results)
-
getFound
public long getFound()
Gets the total number of found results- Returns:
- The found number
-
setFound
public void setFound(long found)
-
getDuration
public long getDuration()
-
setDuration
public void setDuration(long duration)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-