update()
delete()
clone()
getSelectorId()
getPropertyName()
getOperator()
getPropertyValue()
getRequired()
getParent()
setPropertyName(propertyName)
setOperator(propertyOp)
setPropertyValue(propertyValue)
setRequired(isRequired)
BuildForge::Services::DBO::SelectorProperty
use BuildForge::Services;
$conn = new BuildForge::Services::Connection($hostname); $token = $conn->authUser($user, $pass); $property = new BuildForge::Services::DBO::SelectorProperty($conn);
# Getter / setter functions $selectorName = $property->getSelectorId(); $propertyName = $property->getPropertyName(); $operator = $property->getOperator(); $value = $property->getPropertyValue(); $isRequired = $property->getRequired(); $parentSelector = $property->getParent();
$property->setPropertyName('PROP_NAME'); $property->setOperator(ENUM_SELECTORPROPERTY_OPERATOR->EQ); $property->setPropertyValue('New Value'); $property->setRequired(1); $property->update(); # Selector property creation, modification, and deletion $selector = BuildForge::Services::DBO::Selector->findById($conn, $selectorId); $newproperty = new BuildForge::Services::DBO::SelectorProperty($conn); $newproperty->setPropertyName('PROPERTY_NAME'); $newproperty->setOperator(ENUM_SELECTORPROPERTY_OPERATOR->EQ); $newproperty->setPropertyValue('Value'); $selector->addProperty($var);
$newproperty->setPropertyValue('New Value'); $newproperty->update(); $newproperty2 = $newproperty->clone(); $selector->addProperty($newproperty2);
$newproperty->delete(); $conn->logout; $conn->close;
SelectorProperty allows you to create and modify selector properties inside of a Selector. To create
selector properties in the database, see the Selector->addSelectorProperty()
function.
Returns a new instance of a SelectorProperty object.
A connected BuildForge::Services::Connection object.
This should be undef or not passed - it is only used internally.
An optional reference to a hash containing any or all of the following fields.
The name of the selector property.
The selector property value.
The selector property operator. This may be one of 'EQ', 'NE', 'GT', 'GE', 'LT', 'LE', or 'CONTAINS', defaulting to 'EQ'.
This should be 1 if this selector property is required or 0 (the default) otherwise.
update()
Updates the selector property within the database.
delete()
Deletes the selector property from the database.
clone()
Returns a copy of the BuildForge::Services::DBO::Selector object. The object will not exist in the database until added with $selector->addSelectorProperty($copy).
getSelectorId()
Returns the name / ID of the selector that the property belongs to.
getPropertyName()
Returns the name of the selector property.
getOperator()
Returns the selector property operator. This will be one of 'EQ', 'NE', 'GT', 'GE', 'LT', 'LE', or 'CONTAINS'.
getPropertyValue()
Returns the selector property value.
getRequired()
Returns 1 if the selector property is required or 0 if it is optional.
getParent()
Returns the BuildForge::Services::DBO::Selector object for the selector this property belongs to.
setPropertyName(propertyName)
Sets the name of the selector property. $property->update()
must be run
before changes are replicated in the database.
The new name for the property.
setOperator(propertyOp)
Sets the property operator. $property->update()
must be run
before changes are replicated in the database.
The new operator. This may be one of 'EQ', 'NE', 'GT', 'GE', 'LT', 'LE', or 'CONTAINS'.
setPropertyValue(propertyValue)
Sets the property value. $property->update()
must be run
before changes are replicated in the database.
The new value.
setRequired(isRequired)
Sets whether the property is required. $property->update()
must be run
before changes are replicated in the database.
If this evaluates to true, the property will be required. If false, the property will be optional.
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.