Hi Anurag,
Try below code.
/**
* This method will update the IBA value without changing the iteration of
* the given Persistable object.
*
* @param iba
* The object of {@link IBAHolder}
*
* @param attrName
* Name of the IBA
*
* @param value
* Value of the IBA
*
* @exception WTException
* throws {@link WTException}
*
* @exception WTPropertyVetoException
* throws {@link WTPropertyVetoException}
*
* @exception RemoteException
* throws {@link RemoteException}
*/
public static void updateValues(IBAHolder iba, String attrName, Object value)
throws WTException, WTPropertyVetoException, RemoteException {
final IBAHolder ibaHolder = IBAValueHelper.service
.refreshAttributeContainer((IBAHolder) iba, null, null, null);
// From part retrieving corresponding IBAHolder
final DefaultAttributeContainer defaultattributecontainer = (DefaultAttributeContainer) ibaHolder
.getAttributeContainer();
final AttributeDefDefaultView addview = IBADefinitionHelper.service
.getAttributeDefDefaultViewByPath(attrName);
final AbstractValueView abstractValueView[] = defaultattributecontainer
.getAttributeValues(addview);
final StringDefView sd = (StringDefView) addview;
final StringValueDefaultView svdobj = new StringValueDefaultView(sd,
(String) value);
// Putting StringValueDefaultView into AbstractValueView
defaultattributecontainer
.addAttributeValue(((AbstractValueView) (svdobj)));
// Updating the attribute container
StandardIBAValueService.theIBAValueDBService.updateAttributeContainer(
ibaHolder, null, null, null);
}
With Regards,
Kaushik