|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.binarystorage.persistence.BinaryPersistence
org.eclipse.smila.binarystorage.persistence.jpa.JPABinaryPersistence
public class JPABinaryPersistence
JPA Binary Storage persistence layer.
| Field Summary | |
|---|---|
static java.lang.String |
BUNDLE_NAME
name of bundle. |
static java.lang.String |
CONFIGURATION_FILE
name of configuration file. |
static java.lang.String |
PERSISTENCE_UNIT_NAME
Constant for the eclipseLink persistence unit name. |
| Constructor Summary | |
|---|---|
JPABinaryPersistence(BinaryStorageConfiguration binaryStorageConfig)
Basic constructor. |
|
| Method Summary | |
|---|---|
void |
cleanup()
Release resources and performs cleanup actions. |
void |
deleteBinary(java.lang.String key)
Delete binary data by key from binary storage. |
long |
fetchSize(java.lang.String key)
Fetch record size. |
byte[] |
loadBinaryAsByteArray(java.lang.String key)
Fetch binary data by key from binary storage. |
java.io.InputStream |
loadBinaryAsInputStream(java.lang.String key)
Fetch binary data by key from binary storage. |
void |
storeBinary(java.lang.String key,
byte[] content)
Store binary data in binary storage. |
void |
storeBinary(java.lang.String key,
java.io.InputStream stream)
Store binary data in binary storage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BUNDLE_NAME
public static final java.lang.String PERSISTENCE_UNIT_NAME
public static final java.lang.String CONFIGURATION_FILE
| Constructor Detail |
|---|
public JPABinaryPersistence(BinaryStorageConfiguration binaryStorageConfig)
throws BinaryStorageException
binaryStorageConfig - the BinaryStorageConfiguration
BinaryStorageException - if any error occurs during initialization| Method Detail |
|---|
public void storeBinary(java.lang.String key,
byte[] content)
throws BinaryStorageException
storeBinary in class BinaryPersistencekey - String - unique identifier inside of binary storagecontent - byte[] - binary content
BinaryStorageException - -
in case of any exception occursorg.eclipse.smila.binarystorage.internal.impl.persistence.BinaryPersistence#storeBinary(java.lang.String,
byte[])
public void storeBinary(java.lang.String key,
java.io.InputStream stream)
throws BinaryStorageException
storeBinary in class BinaryPersistencekey - String - unique identifier inside of binary storagestream - InputStream - binary data input stream
BinaryStorageException - -
in case of any exception occursorg.eclipse.smila.binarystorage.internal.impl.persistence.BinaryPersistence#storeBinary(java.lang.String,
java.io.InputStream)
public void deleteBinary(java.lang.String key)
throws BinaryStorageException
deleteBinary in class BinaryPersistencekey - String - unique identifier inside of binary storage
BinaryStorageException - -
in case of any exception occursorg.eclipse.smila.binarystorage.internal.impl.persistence.BinaryPersistence#deleteBinary(java.lang.String)
public long fetchSize(java.lang.String key)
throws BinaryStorageException
fetchSize in class BinaryPersistencekey - String - unique identifier inside of binary storage
BinaryStorageException - - in case of any exception occursorg.eclipse.smila.binarystorage.internal.impl.persistence.BinaryPersistence#fetchSize(java.lang.String)
public byte[] loadBinaryAsByteArray(java.lang.String key)
throws BinaryStorageException
loadBinaryAsByteArray in class BinaryPersistencekey - String - unique identifier inside of binary storage
BinaryStorageException - -
in case of any exception occursloadBinaryAsByteArray(java.lang.String)
public java.io.InputStream loadBinaryAsInputStream(java.lang.String key)
throws BinaryStorageException
loadBinaryAsInputStream in class BinaryPersistencekey - String - unique identifier inside of binary storage
BinaryStorageException - -
in case of any exception occursloadBinaryAsInputStream(java.lang.String)
public void cleanup()
throws BinaryStorageException
cleanup in class BinaryPersistenceBinaryStorageException - in case of any exceptionorg.eclipse.smila.binarystorage.internal.impl.persistence.BinaryPersistence#cleanup()
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||