public class IlpEnumBinding extends IlpAbstractAttributeBinding
This class defines a binding between a TGO attributes
(IlpAttribute) of type IlEnum and a SDM model properties
of type String.
It relies on the IlEnum.metainfo to convert from SDM property
to TGO attribute, and on IlEnum.getName() to convert from TGO
attribute to SDM property.
IlpAbstractAttributeBinding.ConversionFailedException, IlpAbstractAttributeBinding.PropertyAlreadySetException, IlpAbstractAttributeBinding.Type_attributeName, _attributeType, _bindingContext, _propertyName, _propertyType, _type| Constructor and Description |
|---|
IlpEnumBinding(IlpAbstractAttributeBinding.Type bindingType,
IlpAttribute attribute)
Constructor.
|
IlpEnumBinding(IlpAbstractAttributeBinding.Type bindingType,
IlpAttribute attribute,
String propName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
convertToAttribute(Object newPropVal)
Converts a value from the SDM model property target type to the
TGO attribute source type.
|
Object |
convertToProperty(Object newAttrVal)
Converts a value from the TGO attribute source type to the
SDM model property target type.
|
equals, getAttributeName, getAttributeType, getBindingContext, getPropertyName, getPropertyType, getType, setAttributeName, setAttributeType, setBindingContext, setPropertyName, setPropertyType, setType, validatepublic IlpEnumBinding(IlpAbstractAttributeBinding.Type bindingType, IlpAttribute attribute, String propName)
bindingType - Whether this binding is READ_ONLY or
WRITE_ONLY, according to
IlpAbstractAttributeBinding.Type.attribute - The TGO attribute being bound, it must be an attribute
whose value is an IlEnumpropName - The corresponding SDM property namepublic IlpEnumBinding(IlpAbstractAttributeBinding.Type bindingType, IlpAttribute attribute)
Constructor.
It assumes that the TGO attribute name and SDM property name are the same.
bindingType - Whether this binding is READ_ONLY or
WRITE_ONLY, according to
IlpAbstractAttributeBinding.Type.attribute - The TGO attribute being bound, it must be an attribute
whose value is an IlEnumpublic Object convertToAttribute(Object newPropVal)
IlpAbstractAttributeBindingConverts a value from the SDM model property target type to the TGO attribute source type.
It can throw RuntimeException if the conversion fails.
convertToAttribute in class IlpAbstractAttributeBindingnewPropVal - The target valuepublic Object convertToProperty(Object newAttrVal)
IlpAbstractAttributeBindingConverts a value from the TGO attribute source type to the SDM model property target type.
It can throw RuntimeException if the conversion fails.
convertToProperty in class IlpAbstractAttributeBindingnewAttrVal - The TGO attribute value© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.