Package wt.fc

Class LobLocator

java.lang.Object
wt.fc.LobLocator
All Implemented Interfaces:
Serializable

@FrozenSerializable public final class LobLocator extends Object implements Serializable
LobLocator provides interfaces to store and retrieve large objects (LOBs) from a datastore.

Notes: When an object which contains a LobLocator attribute is retrieved from the datastore,the LobLocator is initialized with "locator" information to enable the actual retrieval of the LOB. This retrieval requires a "2nd trip" and is accomplished via the PersistenceHelper.manager.getLob method. A lob is inserted into the datastore via the PersistenceHelper.manager.setLob method.

Example application code

 Class LobHolder extends ItemAnchor {
    LobLocator aLobLocator;
 }

    LobHolder anObj = LobHolder.find(someCriteria).nextElement();
    InputStream in = PersistenceHelper.manager.getLob(anObj,anObj.getALobLocator());
       do stuff
    InputStream i;
    long len = i.available();  // or some mechanism to determine stream length
    PersistenceHelper.manager.updateLob(anObj.anObj.getALobLocator(),i,len);
 
See Also: