Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to update the Softtype attribute and OOTB attribute of WTDocument

$
0
0

The class is:

com.ptc.core.lwc.server.PersistableAdapter

 

The examples are the same:

 

CREATE

PersistableAdapter obj = new PersistableAdapter("com.acme.AcmePart",null,null);

obj.load("name","number");

obj.set("name","my name");

obj.set("number","12345");

obj.persist();


RETRIEVE

PersistableAdapter obj = new PersistableAdapter(my_persistable,null,null,null);

obj.load("name","number");

Object nameValue = obj.get("name");

Object numberValue = obj.get("number");


UPDATE

PersistableAdapter obj = new PersistableAdapter(my_persistable,null,Locale.US,new UpdateOperationIdentifier());

obj.load("attributeA","attribtueB");

obj.set("attributeA",Boolean.TRUE);

obj.set("attribtueB","PURPLE");

obj.apply();

...

PersistenceHelper.manager.modify(my_persistable);


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>