org.rhq.core.domain.criteria
Interface DriftChangeSetCriteria

All Superinterfaces:
BaseCriteria
All Known Implementing Classes:
GenericDriftChangeSetCriteria, JPADriftChangeSetCriteria

public interface DriftChangeSetCriteria
extends BaseCriteria

This is the API for criteria based searching on DriftChangeSet.

Criteria based queries are used extensively throughout RHQ. To maintain a consistent querying approach, drift server plugins need to querying based on this API. The API is written in a way to support different plugin implementations as easily as possible.


Method Summary
 void addFilterCategory(DriftChangeSetCategory filterCategory)
          Allows for filtering on change set type.
 void addFilterCreatedAfter(Long filterCreatedAfter)
          Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.
 void addFilterCreatedBefore(Long filterCreatedBefore)
          Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.
 void addFilterDriftCategories(DriftCategory... filterDriftCategories)
          Allows for filtering on the type of drift contained in the change sets.
 void addFilterDriftDefinitionId(Integer filterDriftDefId)
           
 void addFilterDriftDirectory(String filterDriftDirectory)
          Allows for filtering on a specific directory.
 void addFilterDriftPath(String filterDriftPath)
          Allows for filtering on a specific path.
 void addFilterEndVersion(String filterEndVersion)
          Allows for searching for change sets by version range.
 void addFilterId(String filterId)
           
 void addFilterResourceId(Integer filterResourceId)
           
 void addFilterStartVersion(String filterStartVersion)
          Allows for searching for change sets by version range.
 void addFilterVersion(String filterVersion)
           
 void addSortVersion(PageOrdering sortVersion)
          Allows for sorting on change set version
 void fetchDrifts(boolean fetchDrifts)
           
 DriftChangeSetCategory getFilterCategory()
           
 Long getFilterCreatedAfter()
           
 Long getFilterCreatedBefore()
           
 List<DriftCategory> getFilterDriftCategories()
           
 Integer getFilterDriftDefinitionId()
           
 String getFilterDriftDirectory()
           
 String getFilterDriftPath()
           
 String getFilterEndVersion()
           
 String getFilterId()
           
 Integer getFilterResourceId()
           
 String getFilterStartVersion()
           
 String getFilterVersion()
           
 PageOrdering getSortVersion()
           
 boolean isFetchDrifts()
           
 
Methods inherited from interface org.rhq.core.domain.criteria.BaseCriteria
getPageControlOverrides, isStrict, setPageControl, setStrict
 

Method Detail

addFilterId

void addFilterId(String filterId)
Parameters:
filterId - The change set id

getFilterId

String getFilterId()
Returns:
The change set id filter or null if not set

addFilterVersion

void addFilterVersion(String filterVersion)
Parameters:
filterVersion - The change set version.

getFilterVersion

String getFilterVersion()
Returns:
The change set version filter or null if not set

addFilterStartVersion

void addFilterStartVersion(String filterStartVersion)
Allows for searching for change sets by version range.

Parameters:
filterStartVersion - The starting version of the change set(s). This should be inclusive.

getFilterStartVersion

String getFilterStartVersion()
Returns:
The starting version or null if not set

addFilterEndVersion

void addFilterEndVersion(String filterEndVersion)
Allows for searching for change sets by version range.

Parameters:
filterEndVersion - The ending version of the change set(s). This should be inclusive.

getFilterEndVersion

String getFilterEndVersion()
Returns:
The ending version or null if not set.

addFilterCreatedAfter

void addFilterCreatedAfter(Long filterCreatedAfter)
Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.

Parameters:
filterCreatedAfter - The starting time of the range. This should be inclusive.

getFilterCreatedAfter

Long getFilterCreatedAfter()
Returns:
The starting creation timestamp or null if not set.

addFilterCreatedBefore

void addFilterCreatedBefore(Long filterCreatedBefore)
Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.

Parameters:
filterCreatedBefore - The ending time of the range. This should be inclusive.

getFilterCreatedBefore

Long getFilterCreatedBefore()
Returns:
The ending creation timestamp or null if not set.

addFilterResourceId

void addFilterResourceId(Integer filterResourceId)
Parameters:
filterResourceId - The id which uniquely identifies the resource to which the change set(s) belong. Note that persistence of resources is managed by the RHQ core server so it assumed that no other resource-specific information other than the id is maintained/tracked by drift server plugin implementations.

getFilterResourceId

Integer getFilterResourceId()
Returns:
The resource id filter or null if not set.

addFilterDriftDefinitionId

void addFilterDriftDefinitionId(Integer filterDriftDefId)
Parameters:
filterDriftDefId - The id which uniquely identifies the drift definition to which the change set(s) belong. Note that persistence of resources is managed by the RHQ core server so it assumed that no other resource-specific information other than the id is maintained/tracked by drift server plugin implementations.

getFilterDriftDefinitionId

Integer getFilterDriftDefinitionId()
Returns:
The drift definition id filter or null if not set.

addFilterCategory

void addFilterCategory(DriftChangeSetCategory filterCategory)
Allows for filtering on change set type. If not set, it can be assumed that the category is DriftChangeSetCategory.DRIFT which means that the query results should only include delta change sets.

Parameters:
filterCategory - The change set type filter

getFilterCategory

DriftChangeSetCategory getFilterCategory()
Returns:
The change set category (i.e., type) filter

addFilterDriftCategories

void addFilterDriftCategories(DriftCategory... filterDriftCategories)
Allows for filtering on the type of drift contained in the change sets. Each of the specified categories must found in a change set in order for it to be considered a match.

Parameters:
filterDriftCategories - Drift type or categories on which to filter.
See Also:
DriftCategory

getFilterDriftCategories

List<DriftCategory> getFilterDriftCategories()
Returns:
A list of DriftCategory filters or an empty list if not set.

addFilterDriftDirectory

void addFilterDriftDirectory(String filterDriftDirectory)
Allows for filtering on a specific directory. A change set should be considered a match only if it contains Drift with a directory that IS CASE SENSITIVE EQUAL TO the specified string. All substring matching should use the addFilterDriftPath(String). Setting this filter non-null will force BaseCriteria.setStrict(boolean) to true.

Parameters:
filterDriftDirectory - A directory substring on which to filter

getFilterDriftDirectory

String getFilterDriftDirectory()
Returns:
The drift directory substring filter

addFilterDriftPath

void addFilterDriftPath(String filterDriftPath)
Allows for filtering on a specific path. A change set should be considered a match only if it contains Drift with a path that contains the specified substring.

Parameters:
filterDriftPath - A path substring on which to filter

getFilterDriftPath

String getFilterDriftPath()
Returns:
The drift path substring filter

fetchDrifts

void fetchDrifts(boolean fetchDrifts)
Parameters:
fetchDrifts - set to true if the drifts that make up the change set should be loaded and returned with the change set.

isFetchDrifts

boolean isFetchDrifts()
Returns:
true if drifts are to be retrieved

addSortVersion

void addSortVersion(PageOrdering sortVersion)
Allows for sorting on change set version

Parameters:
sortVersion - Specifies whether the sort is ascending or descending

getSortVersion

PageOrdering getSortVersion()
Returns:
The type of sort by version or null if no sorting has been specified.


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.