Package com.hp.ucmdb.api.topology
Interface PropertiesConditionable<E>
- Type Parameters:
E
- the extending element type, used for method chaining.
- All Known Subinterfaces:
DirectLink
,IndirectLinkStepFromPart
,IndirectLinkStepLinkPart
,IndirectLinkStepToPart
,ModelCreateFilterElement
,ModelUpdateFilterElement
,QueryNode
,QueryNodeRestrictions
,ReachableSetStepFromPart
,ReachableSetStepLinkPart
,ReachableSetStepToPart
public interface PropertiesConditionable<E>
Indicates that the extending element can have a properties condition.
Properties conditions are modeled as an expression tree using the logical operators and/or/not. For example, a
property condition may be "(A and not(B)) or (C and not(B))" where A, B and C are individual properties conditions
such as "property 'data_name' not equal to 'network'".
A property condition tree can be built using the
property condition builder
.
When the tree is complete, it can be assigned to the element using the withPropertiesConditions(com.hp.ucmdb.api.topology.ConditionExpression<com.hp.ucmdb.api.topology.CompletePropertyCondition, com.hp.ucmdb.api.topology.PropertiesConditionOperand>)
method.
An existing properties condition tree can be be retrieved using the propertiesCondition()
method. This method
returns null if there are no properties conditions set for the element.
Two 'shortcut' methods, property(String)
and property(String, Operator, Object)
, are available.
These methods add the resulting property condition as an "and" to the existing properties condition tree (or create
a new tree if none existed yet).- Since:
- UCMDB 9.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the properties condition defined on this element.Returns a builder that can be used to build properties expression trees.Creates an incomplete property condition that, when completed, will be added as an "and" to the property conditions expression tree.Creates a property condition and adds it as an "and" to the property conditions expression tree.Creates a property condition and adds it as an "and" to the property conditions expression tree.withPropertiesConditions
(ConditionExpression<CompletePropertyCondition, PropertiesConditionOperand> propertiesConditionExpression) Sets the properties condition of this element to the specified condition.
-
Method Details
-
withPropertiesConditions
E withPropertiesConditions(ConditionExpression<CompletePropertyCondition, PropertiesConditionOperand> propertiesConditionExpression) Sets the properties condition of this element to the specified condition.- Parameters:
propertiesConditionExpression
- the properties condition to use for this element.- Returns:
- the element for method chaining.
- See Also:
-
propertiesCondition
ConditionExpression<CompletePropertyCondition,PropertiesConditionOperand> propertiesCondition()Returns the properties condition defined on this element.- Returns:
- The properties condition defined on this element.
Return
null
if there are on conditions defined. - See Also:
-
propertiesConditionBuilder
PropertyConditionBuilder propertiesConditionBuilder()Returns a builder that can be used to build properties expression trees.- Returns:
- A builder that can be used to build properties expression trees.
- See Also:
-
property
Creates an incomplete property condition that, when completed, will be added as an "and" to the property conditions expression tree.- Parameters:
propertyName
- the property this condition should refer to.- Returns:
- an incomplete property condition that needs operator and value to be completed.
- See Also:
-
property
Creates a property condition and adds it as an "and" to the property conditions expression tree.- Parameters:
propertyName
- the property name to create the condition on.operator
- the operator to use.value
- the value of the property condition, must be of the "correct" type or assignable. Some operators can recieve null as empty values.- Returns:
- the element for method chaining.
- See Also:
-
property
Creates a property condition and adds it as an "and" to the property conditions expression tree.- Parameters:
propertyName
- the property name to create the condition on.operator
- the operator to use.value
- the value of the property condition, must be of the "correct" type or assignable. Some operators can recieve null as empty values.conditionName
- the condition name. May be null. SeeCompletePropertyCondition.withConditionName(String)
for details.- Returns:
- the current object for method chaining.
- See Also:
-