GenericObject - getBlObjectsByPropertyCondition

GenericObject - getBlObjectsByPropertyCondition

Description :

This command retrieves all the class instances that match the condition specified by the conditionKey. You can create a conditionKey by using using the Condition : createPropertyConditionCLI command.

Return type : java.util.List

Command Input :

Variable Name

Variable Type

Description

conditionKey

DBKey

DBKey of the condition to be used.

index

Integer

A 0-based index that indicates the first instance to list. If you want the list to start with the first instance that this command finds, set index to 0; if you want the list to start with the second instance that this command finds, set index to 1, and so on.

max_results

Integer

The maximum number of results to return.

fullyQualifiedName

String

Fully qualified name of the model object whose property is used for sorting.

sortColumnName

String

Name of the sort column.

ascending

Boolean

True to sort in ascending order; false to sort in descending order.

Example

The following example shows you how to retrieve a list of servers that match the condition specified by the conditionKey argument. The list can have a maximum of 5 results and is sorted on the DESCRIPTION column, in ascending order. Because index is set to 0, the list starts at the first matching server.

Script





CONDITION_DBKEY=`blcli Condition createPropertyConditionCLI "Class://SystemObject/Server" "DESCRIPTION" "does not equal" ""` 

GenericObject getBlObjectsByPropertyCondition $CONDITION_DBKEY 0 5 "Class://SystemObject/Server" "DESCRIPTION" true 



Was this page helpful? Yes No Submitting... Thank you

Comments