com.hp.ucmdb.api.topology
Interface PropertiesConditionable<E>

Type Parameters:
E - the extending element type, used for method chaining.
All Known Subinterfaces:
DirectLink, ModelCreateFilterElement, ModelUpdateFilterElement, QueryNode, QueryNodeRestrictions

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) 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:
ConditionExpression, ConditionExpressionBuilder

Method Summary
 ConditionExpression<CompletePropertyCondition,PropertiesConditionOperand> propertiesCondition()
          Returns the properties condition defined on this element.
 PropertyConditionBuilder propertiesConditionBuilder()
          Returns a builder that can be used to build properties expression trees.
 IncompletePropertyCondition property(java.lang.String propertyName)
          Creates an incomplete property condition that, when completed, will be added as an "and" to the property conditions expression tree.
 E property(java.lang.String propertyName, Operator operator, java.lang.Object value)
          Creates a property condition and adds it as an "and" to the property conditions expression tree.
 E property(java.lang.String propertyName, Operator operator, java.lang.Object value, java.lang.String conditionName)
          Creates a property condition and adds it as an "and" to the property conditions expression tree.
 E withPropertiesConditions(ConditionExpression<CompletePropertyCondition,PropertiesConditionOperand> propertiesConditionExpression)
          Sets the properties condition of this element to the specified condition.
 

Method Detail

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:
PropertiesConditionable

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:
PropertiesConditionable

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:
withPropertiesConditions(com.hp.ucmdb.api.topology.ConditionExpression), PropertiesConditionable

property

IncompletePropertyCondition property(java.lang.String propertyName)
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:
PropertiesConditionable

property

E property(java.lang.String propertyName,
           Operator operator,
           java.lang.Object value)
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:
PropertiesConditionable

property

@NotFinalAPI
E property(java.lang.String propertyName,
                       Operator operator,
                       java.lang.Object value,
                       java.lang.String conditionName)
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. See CompletePropertyCondition.withConditionName(String) for details.
Returns:
the current object for method chaining.
See Also:
PropertiesConditionable


Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.