Use the update(DataObject) method and the PropertyControl to change the properties of an entity.
The update method is used to modify the properties of an entity. In this example the cn property of a person is changed from SalesMgr to SalesManager.
DataObject root = SDOHelper.createRootDataObject();
DataObject entity = SDOHelper.createEntityDataObject(root, null, DO_PERSON_ACCOUNT);
entity.createDataObject(DO_IDENTIFIER).set(PROP_UNIQUE_NAME,
"uid=SalesManager,cn=users,dc=yourco,dc=com");
String newCn = "Sales Manager";
entity.set("cn", newCn);
root = service.update(root);
<?xml version="1.0" encoding="UTF-8"?>
<sdo:datagraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sdo="commonj.sdo"
xmlns:wim="http://www.ibm.com/websphere/wim">
<wim:Root>
<wim:entities xsi:type="wim:PersonAccount">
<wim:identifier uniqueName="uid=SalesManager,cn=users,dc=yourco,dc=com"/>
<wim:cn>Sales Manager</wim:cn>
</wim:entities>
</wim:Root>
</sdo:datagraph>
<?xml version="1.0" encoding="UTF-8"?>
<sdo:datagraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sdo="commonj.sdo"
xmlns:wim="http://www.ibm.com/websphere/wim">
<wim:Root>
<wim:entities xsi:type="wim:PersonAccount">
<wim:identifier externalId="5e846c20-a1b4-4bfc-bce2-1f841d762f9a"
externalName="uid=SalesManager,cn=users,dc=yourco,dc=com"
repositoryId="LDAP1"
uniqueId="5e846c20-a1b4-4bfc-bce2-1f841d762f9a"
uniqueName="uid=SalesManager,cn=users,dc=yourco,dc=com"/>
</wim:entities>
</wim:Root>
</sdo:datagraph>