java.lang.Object
org.jpo.datamodel.YearQuery
- All Implemented Interfaces:
Serializable
,Query
This class stores the parameters for a search and can return a List of the
search results.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a List of nodes which match the query criteria beneath the supplied node.getIndex
(int index) This method returns the SDMTN node for the indicated position in the group If there are more Thumbnails than nodes in the group it returns null.Method to get the lower date range of the search.int
On a group we return the number of children in the group.Returns a List of nodes which match the query criteria beneath the supplied node.getTitle()
returns a title for the search that can be used to display the search results under.Method to get the upper date range of the search.boolean
this method returns whether the supplied node matches the search criteria.void
refresh()
Forces the query to be re-executedvoid
setLowerDateRange
(Calendar lowerDateRange) Method to set the lower date range of the search.void
set the start node for the searchvoid
setUpperDateRange
(Calendar upperDateRange) Method to set the upper date range of the search.toString()
returns the title for the search that can be used to display the search results under.
-
Constructor Details
-
YearQuery
Constructor to create a new Query object.- Parameters:
year
- the year we want to search for
-
-
Method Details
-
setLowerDateRange
Method to set the lower date range of the search. If null the lower date will be ignored.- Parameters:
lowerDateRange
- Lower date range
-
getLowerDateRange
Method to get the lower date range of the search.- Returns:
- returns the lower date range
-
setUpperDateRange
Method to set the upper date range of the search. If null the upper date will be ignored.- Parameters:
upperDateRange
- The upper date range
-
getUpperDateRange
Method to get the upper date range of the search.- Returns:
- the upper date range
-
setStartNode
set the start node for the search- Parameters:
n
- node
-
getSearchResults
Returns a List of nodes which match the query criteria beneath the supplied node.- Returns:
- The List of nodes.
-
getNumberOfResults
public int getNumberOfResults()On a group we return the number of children in the group.- Specified by:
getNumberOfResults
in interfaceQuery
- Returns:
- the number of results
-
getIndex
This method returns the SDMTN node for the indicated position in the group If there are more Thumbnails than nodes in the group it returns null. -
extractSearchResults
Returns a List of nodes which match the query criteria beneath the supplied node.- Returns:
- The List of nodes.
-
refresh
public void refresh()Forces the query to be re-executed -
isMatch
this method returns whether the supplied node matches the search criteria.- Parameters:
n
- the Node which is to be tested.- Returns:
- true if the node matches the query, false if not.
-
getTitle
returns a title for the search that can be used to display the search results under. -
toString
returns the title for the search that can be used to display the search results under.
-