|
Oracle Fusion Middleware interMedia Domains Java API Reference for Oracle ADF Business Components 11g Release 2 (11.1.2.2.0) E17485-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OrdDomainIOInterface
An interface for interMedia (IM) Business Components for Java (BC4J) domain objects, which have a common set of loading and retrieving related APIs.
The IM BC4J domain classes include OrdImageDomain
, OrdAudioDomain
, OrdVideoDomain
and OrdDocDomain
. They derive from the interMedia Java Classes: OrdImage
, OrdAudio
, OrdVideo
and OrdDoc
respectively. Most methods in this interface can be found in the interMedia Java Classes. The exceptions are the following:
getBFileDomain
getContentAsBlobDomain
getContentSource
setContentSource
setContentLength
setProperties
Among these methods, getBFileDomain
and getContentAsBlobDomain
are added to support tier transparent access from BC4J applications to the content stored in the database BLOB and BFILE. getContentSource
and setContentSource
are added for deferred loading purposes. setContentLength
and setProperties
are added for the purpose of uniformity and simplicity.
The methods in this interface can be categorized into three types:
getContentAsBlobDomain
getBFileDomain
clearLocal
isLocal
setLocal
setSource
getSourceType
getSourceLocation
getSourceName
setUpdateTime
getUpdateTime
setContentLength
getContentLength
setMimeType
getMimeType
setProperties
deleteContent
loadDataFromFile
loadDataFromInputStream
loadDataFromByteArray
getDataInFile
getDataInStream
getDataInByteArray
setContentSource
getContentSource
Method Summary | |
---|---|
void |
clearContentSource() Internal: Applications should not use this method. |
void |
clearLocal() Clears the attribute called local to indicate that the content data is stored externally. |
void |
deleteContent() Deletes any data stored in the database BLOB specified by the localData attribute. |
oracle.jbo.domain.BFileDomain |
getBFileDomain() Returns a BFileDomain object which wraps the BFILE locator obtained from the getBFILE method. |
oracle.jbo.domain.BlobDomain |
getContentAsBlobDomain() Returns a BlobDomain object which wraps the BLOB locator from the localData attribute. |
int |
getContentLength() Returns the length of the content. |
OrdContentSource |
getContentSource() Gets the content source which was previously set by the setContentSource method. |
byte[] |
getDataInByteArray() Returns a byte array containing the data from the database BLOB specified by the localData attribute. |
boolean |
getDataInFile(java.lang.String filename) Writes the data from the database BLOB specified by the localData attribute to a local file. |
java.io.InputStream |
getDataInStream() Returns an InputStream from which the data in the database BLOB specified by the localData attribute can be read. |
java.lang.String |
getMimeType() Returns the mimeType attribute. |
int |
getObjectId() Internal: Applications should not use this method. |
java.lang.String |
getSourceLocation() Returns the srcLocation attribute. |
java.lang.String |
getSourceName() Returns the srcName attribute. |
java.lang.String |
getSourceType() Returns the srcType attribute. |
java.sql.Timestamp |
getUpdateTime() Returns the updateTime attribute. |
boolean |
isLocal() Determines whether the content data is stored locally in the database in a BLOB specified by the localData attribute. |
boolean |
loadDataFromByteArray(byte[] byteArray) Loads data from a byte array into the database BLOB specified by the localData attribute. |
boolean |
loadDataFromFile(java.lang.String filename) Loads data from a file into the database BLOB specified by the localData attribute. |
boolean |
loadDataFromInputStream(java.io.InputStream inpStream) Loads data from an InputStream into the database BLOB specified by the localData attribute. |
void |
setContentLength(int newContentLength) Sets the contentLength attribute. |
void |
setContentSource(OrdContentSource source) Sets the content source for deferred loading. |
void |
setContentSourceOnly(OrdContentSource source) Internal: Applications should not use this method. |
void |
setLocal() Sets the attribute called local to indicate that the content data is stored locally in the database in a BLOB > specified by the localData attribute. |
void |
setMimeType(java.lang.String MimeType) Sets the mimeType attribute. |
void |
setProperties() Parses the multimedia content properties and sets the attributes in the interMedia BC4J domain object. |
void |
setSource(java.lang.String srcType, java.lang.String srcLocation, java.lang.String srcName) Sets the srcType, srcLocation, and srcName attributes. |
void |
setUpdateTime(java.sql.Timestamp currentTime) Sets the updateTime attribute. |
Method Detail |
---|
oracle.jbo.domain.BlobDomain getContentAsBlobDomain() throws java.sql.SQLException
BlobDomain
object which wraps the BLOB locator from the localData attribute.BlobDomain
objectjava.sql.SQLException
- if an error occurs in calling getContent
method.OrdImage.getContent()
, OrdAudio.getContent()
, OrdVideo.getContent()
, OrdDoc.getContent()
oracle.jbo.domain.BFileDomain getBFileDomain() throws java.sql.SQLException
BFileDomain
object which wraps the BFILE locator obtained from the getBFILE
method.BFileDomain
objectjava.sql.SQLException
- if an error occurs in calling getBFILE
method.OrdImage.getBFILE()
, OrdAudio.getBFILE()
, OrdVideo.getBFILE()
, OrdDoc.getBFILE()
void clearLocal() throws java.sql.SQLException
java.sql.SQLException
- if an error occurs when accessing the attribute called local.boolean isLocal() throws java.sql.SQLException
true
if the data is stored locally in the database in a BLOB; otherwise, returns false
java.sql.SQLException
- if an error occurs when accessing the attribute called local.void setLocal() throws java.sql.SQLException
java.sql.SQLException
- if an error occurs when accessing the attribute called local.void setSource(java.lang.String srcType, java.lang.String srcLocation, java.lang.String srcName) throws java.sql.SQLException
srcType
- the source type, for example, "FILE", "HTTP".srcLocation
- the source location, for example, MEDIA_DIR, www.xyzcoimages.com/public.srcName
- the source name, for example, media_content.datjava.sql.SQLException
- if an error occurs when accessing the srcType, srcLocation, or srcName attributes.java.lang.String getSourceType() throws java.sql.SQLException
String
.java.sql.SQLException
- if an error occurs when accessing the srcType attribute.java.lang.String getSourceLocation() throws java.sql.SQLException
String
.java.sql.SQLException
- if an error occurs when accessing the srcLocation attribute.java.lang.String getSourceName() throws java.sql.SQLException
String
.java.sql.SQLException
- if an error occurs when accessing the srcName attribute.void setUpdateTime(java.sql.Timestamp currentTime) throws java.sql.SQLException
currentTime
- the update time in a java.sql.Timestamp
, or null
to set the update time to the database server's current SYSDATE time.java.sql.SQLException
- if an error occurs when executing the corresponding setUpdateTime method in the database.java.sql.Timestamp getUpdateTime() throws java.sql.SQLException
java.sql.Timestamp
.java.sql.SQLException
- if an error occurs when accessing the updateTime attribute.void setContentLength(int newContentLength) throws java.sql.SQLException
This method only sets contentLength attribute for OrdImageDomain
and OrdDocDomain
objects. It does nothing for OrdAudioDomain
and OrdVideoDomain
objects.
contentLength
- the new attribute value.java.sql.SQLException
- if an error occurs when accessing the contentLength attribute.OrdImage.setContentLength(int)
, OrdDoc.setContentLength(int)
int getContentLength() throws java.sql.SQLException
For OrdImageDomain
and OrdDocDomain
classes, this method returns the contentLength attribute. For interMedia OrdAudioDomain
and OrdVideoDomain
classes, this method calls the corresponding getContentLength method in the database.
int
.java.sql.SQLException
- if an error occurs when accessing the contentLength attribute (for OrdImageDomain
and OrdDocDomain
) or when executing the corresponding getContentLength method in the database (for OrdAudioDomain
and OrdVideoDomain
).OrdImage.getContentLength()
, OrdDoc.getContentLength()
, OrdAudio.getContentLength()
, OrdVideo.getContentLength()
void setMimeType(java.lang.String MimeType) throws java.sql.SQLException
mimeType
- the new attribute value.java.sql.SQLException
- if an error occurs when accessing the mimeType attribute.java.lang.String getMimeType() throws java.sql.SQLException
String
.java.sql.SQLException
- if an error occurs when accessing the mimeType attribute.void setProperties() throws java.sql.SQLException
See each implementation classes' setProperties
comments for detailed information.
java.sql.SQLException
- if an error occurs when executing the corresponding setProperties method in the database.OrdImageDomain.setProperties()
, OrdAudioDomain.setProperties()
, OrdVideoDomain.setProperties()
, OrdDocDomain.setProperties()
void deleteContent() throws java.sql.SQLException
java.sql.SQLException
- if an error occurs when executing the corresponding deleteContent method in the database.boolean loadDataFromFile(java.lang.String filename) throws java.sql.SQLException, java.io.IOException
deleteContent()
, to delete any existing data in the BLOB.setLocal()
, to set the local flag.setUpdateTime()
, to set the updateTime attribute to the database server's current SYSDATE time.filename
- name of the file from which to load datatrue
if the data is loaded successfully; otherwise, an exception is raised if an error occurs. This method never returns false
.java.sql.SQLException
- if an error occurs when accessing an object attribute or when executing a method in the database.java.io.IOException
- if an error occurs when reading the data file.boolean loadDataFromInputStream(java.io.InputStream inpStream) throws java.sql.SQLException, java.io.IOException
InputStream
into the database BLOB specified by the localData attribute. Before loading the data, this method calls the following methods:
deleteContent()
, to delete any existing data in the BLOB.setLocal()
, to set the local flag.setUpdateTime()
, to set the updateTime attribute to the database server's current SYSDATE time.inpStream
- the InputStream
from which to load datatrue
if the data is loaded successfully; otherwise, an exception is raised if an error occurs. This method never returns false
.java.sql.SQLException
- if an error occurs when accessing an object attribute or when executing a method in the database.java.io.IOException
- if an error occurs when reading the InputStream.boolean loadDataFromByteArray(byte[] byteArray) throws java.sql.SQLException, java.io.IOException
deleteContent()
, to delete any existing data in the BLOB.setLocal()
, to set the local flag.setUpdateTime()
, to set the updateTime attribute to the database server's current SYSDATE time.byteArr
- a byte[]
arrary from which to load datatrue
if the data is loaded successfully; otherwise, an exception is raised if an error occurs. This method never returns false
.java.sql.SQLException
- if an error occurs when accessing an object attribute or when executing a method in the database.java.io.IOException
- if an error occurs reading the byte array.boolean getDataInFile(java.lang.String filename) throws java.sql.SQLException, java.io.IOException
filename
- name of the file to which the data is to be written.true
if the data is written to the file successfully; otherwise, an exception is raised if an error occurs. This method never returns false
.java.sql.SQLException
- if an error occurs when accessing an object attribute.java.io.IOException
- if an error occurs when reading the data from the BLOB or when writing the data to the output file.java.io.InputStream getDataInStream() throws java.sql.SQLException
InputStream
from which the data can be read.java.sql.SQLException
- if an error occurs when accessing an object attribute.byte[] getDataInByteArray() throws java.sql.SQLException, java.io.IOException, java.lang.OutOfMemoryError
byte[]
array containing the data.java.sql.SQLException
- if an error occurs when accessing an object attribute.java.io.IOException
- if an error occurs when reading the data from the BLOB.java.lang.OutOfMemoryError
- if sufficient memory cannot be allocated to hold the data.void setContentSource(OrdContentSource source)
OrdHttpUploadFile
object. The loading of content from the client into the database doesn't happen inside this method. It's deferred to the next postChanges
method call.
If the source parameter is null
, this method just resets the previously set content source.
In 3Tier environment, this method registers the domain object in the client post listener list so the content won't be replicated from CT to MT. The content will be streamed to the database directly after the postChanges
.
source
- the content source for the deferred loadingOrdContentSource
OrdContentSource getContentSource()
setContentSource
method.void setContentSourceOnly(OrdContentSource source)
void clearContentSource()
int getObjectId()
|
Oracle Fusion Middleware interMedia Domains Java API Reference for Oracle ADF Business Components 11g Release 2 (11.1.2.2.0) E17485-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |