wt.fc
Class LobLocator

java.lang.Object
  extended bywt.fc.LobLocator
All Implemented Interfaces:
Serializable

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:
InputStream, Serialized Form

Field Summary
private  String attributeName
           
private  String columnName
           
private  ObjectIdentifier oid
           
private  String primaryKeyName
           
private  String tableName
           
private static String versionID
           
 
Constructor Summary
LobLocator()
           
 
Method Summary
 void dumpLocator()
           
 String getAttributeName()
           
 String getColumnName()
           
 ObjectIdentifier getObjectIdentifier()
           
 String getPrimaryKeyName()
           
 String getTableName()
           
 void setAttributeName(String aName)
           
 void setColumnName(String cName)
           
 void setLocatorNames(String anAttributeName, String aTableName, String aColumnName)
           
 void setObjectIdentifier(ObjectIdentifier anOid)
           
 void setPrimaryKeyName(String keyName)
           
 void setTableName(String tName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

oid

private ObjectIdentifier oid

primaryKeyName

private String primaryKeyName

attributeName

private String attributeName

tableName

private String tableName

columnName

private String columnName
Constructor Detail

LobLocator

public LobLocator()
Method Detail

getObjectIdentifier

public ObjectIdentifier getObjectIdentifier()

setObjectIdentifier

public void setObjectIdentifier(ObjectIdentifier anOid)

getPrimaryKeyName

public String getPrimaryKeyName()

setPrimaryKeyName

public void setPrimaryKeyName(String keyName)

getAttributeName

public String getAttributeName()

setAttributeName

public void setAttributeName(String aName)

getTableName

public String getTableName()

setTableName

public void setTableName(String tName)

getColumnName

public String getColumnName()

setColumnName

public void setColumnName(String cName)

setLocatorNames

public void setLocatorNames(String anAttributeName,
                            String aTableName,
                            String aColumnName)

dumpLocator

public void dumpLocator()