org.rhq.core.domain.criteria
Class JPADriftChangeSetCriteria

java.lang.Object
  extended by org.rhq.core.domain.criteria.Criteria
      extended by org.rhq.core.domain.criteria.JPADriftChangeSetCriteria
All Implemented Interfaces:
Serializable, BaseCriteria, DriftChangeSetCriteria

public class JPADriftChangeSetCriteria
extends Criteria
implements DriftChangeSetCriteria

The JPA Drift Server plugin (the RHQ default) implementation of DriftChangeSetCriteria.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.rhq.core.domain.criteria.Criteria
Criteria.NonBindingOverrideFilter, Criteria.Restriction, Criteria.Type
 
Field Summary
 
Fields inherited from class org.rhq.core.domain.criteria.Criteria
filterOverrides, pageControlOverrides, sortOverrides
 
Constructor Summary
JPADriftChangeSetCriteria()
           
JPADriftChangeSetCriteria(DriftChangeSetCriteria changeSetCriteria)
           
 
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 addFilterDriftCategories(List<DriftCategory> filterDriftCategories)
           
 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(Integer filterEndVersion)
           
 void addFilterEndVersion(String filterEndVersion)
          Allows for searching for change sets by version range.
 void addFilterId(String filterId)
           
 void addFilterResourceId(Integer filterResourceId)
           
 void addFilterStartVersion(Integer filterStartVersion)
           
 void addFilterStartVersion(String filterStartVersion)
          Allows for searching for change sets by version range.
 void addFilterVersion(Integer filterVersion)
           
 void addFilterVersion(String filterVersion)
           
 void addSortVersion(PageOrdering sortVersion)
          Allows for sorting on change set version
 void fetchDriftDefinition(boolean fetchDriftDefinition)
           
 void fetchDrifts(boolean fetchDrifts)
           
 void fetchInitialDriftSet(boolean fetchInitialDriftSet)
           
 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()
           
 Class<JPADriftChangeSet> getPersistentClass()
           
 PageOrdering getSortVersion()
           
 boolean isFetchDrifts()
           
 boolean isFetchInitialDriftSet()
           
 
Methods inherited from class org.rhq.core.domain.criteria.Criteria
addRequiredPermissions, addSortField, clearPaging, getAlias, getJPQLFilterOverride, getJPQLSortOverride, getOrderingFieldNames, getPageControlOverrides, getPageNumber, getPageSize, getRequiredPermissions, getRestriction, getSearchExpression, hasCustomizedSorting, isCaseSensitive, isFiltersOptional, isInventoryManagerRequired, isSecurityManagerRequired, isStrict, setCaseSensitive, setFiltersOptional, setPageControl, setPaging, setRestriction, setSearchExpression, setStrict
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rhq.core.domain.criteria.BaseCriteria
getPageControlOverrides, isStrict, setPageControl, setStrict
 

Constructor Detail

JPADriftChangeSetCriteria

public JPADriftChangeSetCriteria()

JPADriftChangeSetCriteria

public JPADriftChangeSetCriteria(DriftChangeSetCriteria changeSetCriteria)
Method Detail

getPersistentClass

public Class<JPADriftChangeSet> getPersistentClass()
Specified by:
getPersistentClass in class Criteria

addFilterId

public void addFilterId(String filterId)
Specified by:
addFilterId in interface DriftChangeSetCriteria
Parameters:
filterId - The change set id

getFilterId

public String getFilterId()
Specified by:
getFilterId in interface DriftChangeSetCriteria
Returns:
The change set id filter or null if not set

addFilterVersion

public void addFilterVersion(Integer filterVersion)

addFilterVersion

public void addFilterVersion(String filterVersion)
Specified by:
addFilterVersion in interface DriftChangeSetCriteria
Parameters:
filterVersion - The change set version.

getFilterVersion

public String getFilterVersion()
Specified by:
getFilterVersion in interface DriftChangeSetCriteria
Returns:
The change set version filter or null if not set

addFilterStartVersion

public void addFilterStartVersion(Integer filterStartVersion)

addFilterStartVersion

public void addFilterStartVersion(String filterStartVersion)
Description copied from interface: DriftChangeSetCriteria
Allows for searching for change sets by version range.

Specified by:
addFilterStartVersion in interface DriftChangeSetCriteria
Parameters:
filterStartVersion - The starting version of the change set(s). This should be inclusive.

getFilterStartVersion

public String getFilterStartVersion()
Specified by:
getFilterStartVersion in interface DriftChangeSetCriteria
Returns:
The starting version or null if not set

addFilterEndVersion

public void addFilterEndVersion(Integer filterEndVersion)

addFilterEndVersion

public void addFilterEndVersion(String filterEndVersion)
Description copied from interface: DriftChangeSetCriteria
Allows for searching for change sets by version range.

Specified by:
addFilterEndVersion in interface DriftChangeSetCriteria
Parameters:
filterEndVersion - The ending version of the change set(s). This should be inclusive.

getFilterEndVersion

public String getFilterEndVersion()
Specified by:
getFilterEndVersion in interface DriftChangeSetCriteria
Returns:
The ending version or null if not set.

addFilterCreatedAfter

public void addFilterCreatedAfter(Long filterCreatedAfter)
Description copied from interface: DriftChangeSetCriteria
Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.

Specified by:
addFilterCreatedAfter in interface DriftChangeSetCriteria
Parameters:
filterCreatedAfter - The starting time of the range. This should be inclusive.

getFilterCreatedAfter

public Long getFilterCreatedAfter()
Specified by:
getFilterCreatedAfter in interface DriftChangeSetCriteria
Returns:
The starting creation timestamp or null if not set.

addFilterCreatedBefore

public void addFilterCreatedBefore(Long filterCreatedBefore)
Description copied from interface: DriftChangeSetCriteria
Allows for searching change sets by timestamp range where the timestamp corresponds to the creation time of the change set.

Specified by:
addFilterCreatedBefore in interface DriftChangeSetCriteria
Parameters:
filterCreatedBefore - The ending time of the range. This should be inclusive.

getFilterCreatedBefore

public Long getFilterCreatedBefore()
Specified by:
getFilterCreatedBefore in interface DriftChangeSetCriteria
Returns:
The ending creation timestamp or null if not set.

addFilterResourceId

public void addFilterResourceId(Integer filterResourceId)
Specified by:
addFilterResourceId in interface DriftChangeSetCriteria
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

public Integer getFilterResourceId()
Specified by:
getFilterResourceId in interface DriftChangeSetCriteria
Returns:
The resource id filter or null if not set.

addFilterDriftDefinitionId

public void addFilterDriftDefinitionId(Integer filterDriftDefId)
Specified by:
addFilterDriftDefinitionId in interface DriftChangeSetCriteria
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

public Integer getFilterDriftDefinitionId()
Specified by:
getFilterDriftDefinitionId in interface DriftChangeSetCriteria
Returns:
The drift definition id filter or null if not set.

addFilterCategory

public void addFilterCategory(DriftChangeSetCategory filterCategory)
Description copied from interface: DriftChangeSetCriteria
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.

Specified by:
addFilterCategory in interface DriftChangeSetCriteria
Parameters:
filterCategory - The change set type filter

getFilterCategory

public DriftChangeSetCategory getFilterCategory()
Specified by:
getFilterCategory in interface DriftChangeSetCriteria
Returns:
The change set category (i.e., type) filter

addFilterDriftCategories

public void addFilterDriftCategories(List<DriftCategory> filterDriftCategories)

addFilterDriftCategories

public void addFilterDriftCategories(DriftCategory... filterDriftCategories)
Description copied from interface: DriftChangeSetCriteria
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.

Specified by:
addFilterDriftCategories in interface DriftChangeSetCriteria
Parameters:
filterDriftCategories - Drift type or categories on which to filter.
See Also:
DriftCategory

getFilterDriftCategories

public List<DriftCategory> getFilterDriftCategories()
Specified by:
getFilterDriftCategories in interface DriftChangeSetCriteria
Returns:
A list of DriftCategory filters or an empty list if not set.

addFilterDriftDirectory

public void addFilterDriftDirectory(String filterDriftDirectory)
Description copied from interface: DriftChangeSetCriteria
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 DriftChangeSetCriteria.addFilterDriftPath(String). Setting this filter non-null will force BaseCriteria.setStrict(boolean) to true.

Specified by:
addFilterDriftDirectory in interface DriftChangeSetCriteria
Parameters:
filterDriftDirectory - A directory substring on which to filter

getFilterDriftDirectory

public String getFilterDriftDirectory()
Specified by:
getFilterDriftDirectory in interface DriftChangeSetCriteria
Returns:
The drift directory substring filter

addFilterDriftPath

public void addFilterDriftPath(String filterDriftPath)
Description copied from interface: DriftChangeSetCriteria
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.

Specified by:
addFilterDriftPath in interface DriftChangeSetCriteria
Parameters:
filterDriftPath - A path substring on which to filter

getFilterDriftPath

public String getFilterDriftPath()
Specified by:
getFilterDriftPath in interface DriftChangeSetCriteria
Returns:
The drift path substring filter

fetchDrifts

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

isFetchDrifts

public boolean isFetchDrifts()
Specified by:
isFetchDrifts in interface DriftChangeSetCriteria
Returns:
true if drifts are to be retrieved

fetchDriftDefinition

public void fetchDriftDefinition(boolean fetchDriftDefinition)

isFetchInitialDriftSet

public boolean isFetchInitialDriftSet()

fetchInitialDriftSet

public void fetchInitialDriftSet(boolean fetchInitialDriftSet)

addSortVersion

public void addSortVersion(PageOrdering sortVersion)
Description copied from interface: DriftChangeSetCriteria
Allows for sorting on change set version

Specified by:
addSortVersion in interface DriftChangeSetCriteria
Parameters:
sortVersion - Specifies whether the sort is ascending or descending

getSortVersion

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


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