public class LobEngine
extends java.lang.Object
getSupportTrigger(Class, int)| Constructor and Description |
|---|
LobEngine(Repository lobRepo,
Repository locatorRepo) |
LobEngine(Repository lobRepo,
SequenceValueProducer locatorSequenceProducer) |
| Modifier and Type | Method and Description |
|---|---|
Blob |
createNewBlob(int blockSize)
Returns a new Blob whose length is zero.
|
Clob |
createNewClob(int blockSize)
Returns a new Clob whose length is zero.
|
void |
deleteLob(Lob lob)
Deletes Lob data, freeing up all space consumed by it.
|
void |
deleteLob(long locator)
Deletes Lob data, freeing up all space consumed by it.
|
Blob |
getBlobValue(long locator)
Loads a Blob value, without checking if it exists or not.
|
Clob |
getClobValue(long locator)
Loads a Clob value, without checking if it exists or not.
|
long |
getLocator(Lob lob)
Returns the locator for the given Lob, or zero if null.
|
<S extends Storable> |
getSupportTrigger(java.lang.Class<S> type,
int blockSize)
Returns a Trigger for binding to this LobEngine.
|
static <S extends Storable> |
hasLobs(java.lang.Class<S> type) |
void |
setBlobValue(long locator,
Blob data)
Stores a value into a Blob, replacing anything that was there
before.
|
void |
setBlobValue(long locator,
java.io.InputStream data)
Stores a value into a Blob, replacing anything that was there
before.
|
void |
setClobValue(long locator,
Clob data)
Stores a value into a Clob, replacing anything that was there
before.
|
void |
setClobValue(long locator,
java.io.Reader data)
Stores a value into a Clob, replacing anything that was there
before.
|
public LobEngine(Repository lobRepo, Repository locatorRepo) throws RepositoryException
lobRepo - storage for Lobs - should not be replicatedlocatorRepo - storage for producing unique values for Lob locators
- should be root repositoryRepositoryExceptionpublic LobEngine(Repository lobRepo, SequenceValueProducer locatorSequenceProducer) throws RepositoryException
lobRepo - storage for Lobs - should not be replicatedlocatorSequenceProducer - source of unique values for Lob locatorsRepositoryExceptionpublic static <S extends Storable> boolean hasLobs(java.lang.Class<S> type)
public Blob createNewBlob(int blockSize) throws PersistException
blockSize - block size (in bytes) to usePersistExceptionpublic Clob createNewClob(int blockSize) throws PersistException
blockSize - block size (in bytes) to usePersistExceptionpublic long getLocator(Lob lob)
java.lang.ClassCastException - if Lob is unrecognizedpublic void deleteLob(long locator)
throws PersistException
PersistExceptionpublic void deleteLob(Lob lob) throws PersistException
PersistExceptionpublic Blob getBlobValue(long locator)
locator - lob locator as returned by getLocatorpublic Clob getClobValue(long locator)
locator - lob locator as returned by getLocatorpublic void setBlobValue(long locator,
Blob data)
throws PersistException,
java.io.IOException
locator - lob locator as created by createNewBlobdata - source of data for Blob, which may be null to deletejava.lang.IllegalArgumentException - if locator is zeroPersistExceptionjava.io.IOExceptionpublic void setBlobValue(long locator,
java.io.InputStream data)
throws PersistException,
java.io.IOException
locator - lob locator as created by createNewBlobdata - source of data for Blob, which may be null to deletejava.lang.IllegalArgumentException - if locator is zeroPersistExceptionjava.io.IOExceptionpublic void setClobValue(long locator,
Clob data)
throws PersistException,
java.io.IOException
locator - lob locator as created by createNewClobdata - source of data for Clob, which may be null to deletejava.lang.IllegalArgumentException - if locator is zeroPersistExceptionjava.io.IOExceptionpublic void setClobValue(long locator,
java.io.Reader data)
throws PersistException,
java.io.IOException
locator - lob locator as created by createNewClobdata - source of data for Clob, which may be null to deletejava.lang.IllegalArgumentException - if locator is zeroPersistExceptionjava.io.IOExceptionpublic <S extends Storable> Trigger<S> getSupportTrigger(java.lang.Class<S> type, int blockSize)
type - type of Storable to create trigger forblockSize - block size to useCopyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.