org.rhq.helpers.perftest.support.jpa
Class ConfigurableDependencyInclusionResolver
java.lang.Object
org.rhq.helpers.perftest.support.jpa.ConfigurableDependencyInclusionResolver
- All Implemented Interfaces:
- DependencyInclusionResolver
public class ConfigurableDependencyInclusionResolver
- extends Object
- implements DependencyInclusionResolver
An implementation of DependencyInclusionResolver interface that can be configured
to include/exclude relationships by being provided a dependency graph in the form of ExportConfiguration instance.
- Author:
- Lukas Krejci
|
Method Summary |
boolean |
isValid(Edge edge)
An edge (relationship) is considered valid based on the dependency graph provided in this instance's
constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurableDependencyInclusionResolver
public ConfigurableDependencyInclusionResolver(ExportConfiguration edg)
- Parameters:
edg - the dependency graph of allowed entities and relations among them.
isValid
public boolean isValid(Edge edge)
- An edge (relationship) is considered valid based on the dependency graph provided in this instance's
constructor.
These are the naming conventions used in the rules below:
An edge is considered valid if at least one of the following conditions is true:
- The configuration specifies to include all explicit dependent entities and the edge has a non-null
from field (i.e. the dependency is explicitly defined).
- The source entity specifies to include all fields (
Entity.isIncludeAllFields()).
- The target entity specifies to include all fields (
Entity.isIncludeAllFields()).
- The source relationship is defined.
- The target relationship is defined.
- Specified by:
isValid in interface DependencyInclusionResolver
- Parameters:
edge - the edge from the full entity dependency graph to check the validity of.
- Returns:
- true if valid (i.e. to be included in the output), false otherwise.
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.