Package org.intermine.objectstore.query
Class ResultsInfo
- java.lang.Object
- 
- org.intermine.objectstore.query.ResultsInfo
 
- 
 public class ResultsInfo extends java.lang.ObjectRepresents a result from the estimate() method of an ObjectStore.- Author:
- Matthew Wakeling
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intAT_LEASTDenotes that the known number of rows has a minimum which exceed the estimate.static intAT_MOSTDenotes that the known number of rows has a maximum, and the estimate exceeds it.protected longcompletestatic intESTIMATEDenotes that the result of getRows() is a pure estimate that is not contradicted by the min or maxprotected intmaxprotected intminprotected introwsstatic intSIZEDenotes that the result of getRows() is the known size of the results.protected longstart
 - 
Constructor SummaryConstructors Constructor Description ResultsInfo()No-arg constructor to allow serializationResultsInfo(long start, long complete, int rows)Constructs an instance of ResultsInfo with all new parameters, without min and max.ResultsInfo(long start, long complete, int rows, int min, int max)Constructs an instance of ResultsInfo with all new parameters.ResultsInfo(ResultsInfo old, int min, int max)Constructs an instance of ResultsInfo from another ResultsInfo and a new min and max.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)longgetComplete()Returns the estimated amount of time taken to produce the entire set of results.intgetMax()Returns the maximum possible number of rows in the results.intgetMin()Returns the minimum possible number of rows in the results.intgetRows()Returns the estimated number of rows in the results.longgetStart()Returns the estimated amount of time taken to produce the first row of the results.intgetStatus()Returns an integer describing the type of estimate getRows() returns.inthashCode()voidsetComplete(long complete)Sets the estimated amount of time taken to produce the entire set of results.voidsetMax(int max)Sets the maximum possible number of rows in the results.voidsetMin(int min)Sets the minimum possible number of rows in the results.voidsetRows(int rows)Sets the estimated number of rows in the results.voidsetStart(long start)Sets the estimated amount of time taken to produce the first row of the results.java.lang.StringtoString()
 
- 
- 
- 
Field Detail- 
startprotected long start 
 - 
completeprotected long complete 
 - 
minprotected int min 
 - 
rowsprotected int rows 
 - 
maxprotected int max 
 - 
SIZEpublic static final int SIZE Denotes that the result of getRows() is the known size of the results.- See Also:
- Constant Field Values
 
 - 
AT_MOSTpublic static final int AT_MOST Denotes that the known number of rows has a maximum, and the estimate exceeds it.- See Also:
- Constant Field Values
 
 - 
AT_LEASTpublic static final int AT_LEAST Denotes that the known number of rows has a minimum which exceed the estimate.- See Also:
- Constant Field Values
 
 - 
ESTIMATEpublic static final int ESTIMATE Denotes that the result of getRows() is a pure estimate that is not contradicted by the min or max- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ResultsInfopublic ResultsInfo() No-arg constructor to allow serialization
 - 
ResultsInfopublic ResultsInfo(long start, long complete, int rows)Constructs an instance of ResultsInfo with all new parameters, without min and max.- Parameters:
- start- the estimated amount of time required to fetch the first row of results, in milliseconds
- complete- the estimated amount of time required to fetch the full set of results, in milliseconds
- rows- the best current estimate of the number of rows that the results contains, neglecting information available about the minimum possible and maximum possible number
 
 - 
ResultsInfopublic ResultsInfo(long start, long complete, int rows, int min, int max)Constructs an instance of ResultsInfo with all new parameters.- Parameters:
- start- the estimated amount of time required to fetch the first row of results, in milliseconds
- complete- the estimated amount of time required to fetch the full set of results, in milliseconds
- rows- the best current estimate of the number of rows that the results contains, neglecting information available about the minimum possible and maximum possible number
- min- the minimum possible number of rows
- max- the maximum possible number of rows
 
 - 
ResultsInfopublic ResultsInfo(ResultsInfo old, int min, int max) Constructs an instance of ResultsInfo from another ResultsInfo and a new min and max.- Parameters:
- old- the old ResultsInfo object from which to copy data
- min- the minimum possible number of rows
- max- the maximum possible number of rows
 
 
- 
 - 
Method Detail- 
getStatuspublic int getStatus() Returns an integer describing the type of estimate getRows() returns.- Returns:
- SIZE, ESTIMATE, AT_MOST, AT_LEAST
 
 - 
getRowspublic int getRows() Returns the estimated number of rows in the results.- Returns:
- an int
 
 - 
setRowspublic void setRows(int rows) Sets the estimated number of rows in the results. NOTE: this method is only present to make this class a Bean.- Parameters:
- rows- the new rows variable
 
 - 
getStartpublic long getStart() Returns the estimated amount of time taken to produce the first row of the results.- Returns:
- a long of milliseconds
 
 - 
setStartpublic void setStart(long start) Sets the estimated amount of time taken to produce the first row of the results. NOTE: this method is only present to make this class a Bean.- Parameters:
- start- a long
 
 - 
getCompletepublic long getComplete() Returns the estimated amount of time taken to produce the entire set of results.- Returns:
- a long of milliseconds
 
 - 
setCompletepublic void setComplete(long complete) Sets the estimated amount of time taken to produce the entire set of results. NOTE: this method is only present to make this class a Bean.- Parameters:
- complete- a long
 
 - 
getMinpublic int getMin() Returns the minimum possible number of rows in the results.- Returns:
- an int
 
 - 
setMinpublic void setMin(int min) Sets the minimum possible number of rows in the results. NOTE: this method is only present to make this class a Bean.- Parameters:
- min- an int
 
 - 
getMaxpublic int getMax() Returns the maximum possible number of rows in the results.- Returns:
- an int
 
 - 
setMaxpublic void setMax(int max) Sets the maximum possible number of rows in the results. NOTE: this method is only present to make this class a Bean.- Parameters:
- max- an int
 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-