I want to know how to realize the function with QuerySpec or other measure same as SQL statement of "select for update".
I found "qs.setLock(true)" api, but according to TS it is unsupported api.
Target class is created with Information Modeler to manage specific list of numbers. Stored numbers on the database table need to be exclusively used with WTPart each by each. So I want to update the column which means processed flag when a record is used. I think a record should be locked when it is extracted first.
Try this method:
com.ptc.core.percol.PersistedCollectionServerUtils.rowLockCollections(final WTSet holdersOrCollections)
Thank you for your reply.
Although I checked that method, it is package-private method.
Can I use it somehow?
I found below methods which are possible to be solution.
I still need to identify how would the exception ocurr if a row had been locked, though..
PersistenceHelper.manager.refresh(ObjectIdentifier objId, boolean lock)
PersistenceHelper.manager.refresh(Persistable obj, boolean fullRefresh, boolean inPlace, boolean lock)