|
interMedia BC4J Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--oracle.ord.im.OrdImageBase
|
+--oracle.ord.im.OrdImage
|
+--oracle.ord.im.OrdImageDomain
Represents interMedia ORDSYS.ORDImage database type as a domain class in the Business Component for Java (BC4J) framework. Most methods in this class are BC4J tier independent. They can work on either the client tier or the middle tier, which allows the application which uses these methods to work in a tier independent fashion. There are some exceptions which are marked as local mode only:
- getContent
- getBFILE
- getContentAsBlobDomain
- getBFileDomain
The constructor for this class will create an instance of an
OrdImageDomain. The user should either manually obtain a valid
BLOB locator and a JDBC connection for this instance, or rely on the
BC4J framework to obtain a BLOB locator and a JDBC connection for it.
See OrdContentSource for discussion about how to load media
content to the database by using the interMedia BC4J domain
classes.
OrdImage, Serialized Form| Fields inherited from class oracle.ord.im.OrdImage |
_SQL_NAME, _SQL_TYPECODE |
| Constructor Summary |
OrdImageDomain()
Constructs a new OrdImageDomain instance. |
OrdImageDomain(byte[] bytes)
Constructs a new OrdImageDomain instance. |
OrdImageDomain(OrdHttpUploadFile ohuf)
Constructs a new OrdImageDomain instance. |
OrdImageDomain(java.lang.String fileName)
Constructs a new OrdImageDomain instance. |
| Method Summary |
| Type | Method |
|---|---|
boolean |
checkProperties()
Checks if the properties of the image data are consistent with the attributes of the OrdImage Java object. |
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 |
copy(OrdImage dest)
Copies an OrdImage Java object. |
oracle.sql.CustomDatum |
create(oracle.sql.Datum d,
int sqlType)
Internal method used only by the Oracle CustomDatum interface. |
java.lang.Object |
createDomainFromSerializedXML(org.w3c.dom.Element element)
Create a domain instance by reading the xml-data out of the given xml-node. |
void |
deleteContent()
Deletes any data stored in the database BLOB specified by the localData attribute. |
void |
domainToBeModified(oracle.jbo.domain.DomainInterface d)
Internal: Applications should not use this method. |
void |
doneCommit(oracle.jbo.TransactionStateEvent event)
Internal: Applications should not use this method. |
void |
doneRollback(oracle.jbo.TransactionStateEvent event)
Internal: Applications should not use this method. |
boolean |
equals(java.lang.Object obj)
Compares two OrdImageDomain objects by their last update time
and content length. |
void |
export(byte[][] ctx,
java.lang.String sourceType,
java.lang.String sourceLocation,
java.lang.String sourceName)
Exports the data from the BLOB specified by the localData attribute. |
java.lang.Object |
getAttribute(int index)
Internal: Applications should not use this method. |
java.lang.Object |
getAttribute(java.lang.String name)
Internal: Applications should not use this method. |
int |
getAttributeCount()
Internal: Applications should not use this method. |
int |
getAttributeIndexOf(java.lang.String name)
Internal: Applications should not use this method. |
java.lang.String[] |
getAttributeNames()
|
java.lang.Object[] |
getAttributeValues()
|
oracle.sql.BFILE |
getBFILE()
Returns a BFILE locator from the database when the srcType attribute is "FILE". |
oracle.jbo.domain.BFileDomain |
getBFileDomain()
Returns a BFileDomain object which wraps the
BFILE locator obtained from the getBFILE method. |
java.lang.String |
getCompressionFormat()
Returns the compressionFormat attribute. |
oracle.sql.BLOB |
getContent()
Returns the BLOB locator from the localData attribute. |
oracle.jbo.domain.BlobDomain |
getContentAsBlobDomain()
Returns a BlobDomain object which wraps the
BLOB locator from the localData attribute. |
java.lang.String |
getContentFormat()
Returns the contentFormat attribute. |
int |
getContentLength()
Returns the contentLength attribute. |
OrdContentSource |
getContentSource()
Gets the content source which was previously set by the setContentSource method. |
java.lang.Object |
getCTPassivationHandle()
Internal: Applications should not use this method. |
static oracle.sql.CustomDatumFactory |
getCustomDatumFactory()
Internal: Applications should not use this method. |
java.lang.Object |
getData()
Internal: Applications should not use this 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. |
static oracle.sql.CustomDatumFactory |
getFactory()
Returns the OrdImageDomain CustomDatumFactory for use by the
getCustomDatum method. |
java.lang.String |
getFormat()
Returns the fileFormat attribute. |
int |
getHeight()
Returns the height attribute. |
java.lang.String |
getMimeType()
Returns the mimeType attribute. |
oracle.jbo.domain.DomainOwnerInterface |
getOwner()
Internal: Applications should not use this method. |
int |
getOwnerAttributeIndex()
Internal: Applications should not use this method. |
java.lang.String |
getRemoteIdString()
Internal: Applications should not use this method. |
org.w3c.dom.Node |
getSerializedDomainXML(org.w3c.dom.Document xmlDoc)
Creates the XML node in the given XML document for this domain's data. |
long |
getSize()
Internal: Applications should not use this method. |
java.lang.String |
getSource()
Returns the source information in the form srcType://srcLocation/srcName. |
java.lang.String |
getSourceLocation()
Returns the srcLocation attribute. |
java.lang.String |
getSourceName()
Returns the srcName attribute. |
java.lang.String |
getSourceType()
Returns the srcType attribute. |
int |
getTierInfo()
Gets the tier number information that this object lives in. |
java.sql.Timestamp |
getUpdateTime()
Returns the updateTime attribute. |
int |
getWidth()
Returns the width attribute. |
org.w3c.dom.Node |
getXMLContentNode(org.w3c.dom.Document xmlDoc)
Internal: Applications should not use this method. |
static oracle.jbo.domain.XMLDomainFactory |
getXMLDomainFactory(java.lang.Class attrClass)
Internal: Applications should not use this method. |
int |
hashCode()
Returns the hash code as a int |
void |
importData(byte[][] ctx)
Imports data from an external source into the database BLOB specified by the localData attribute. |
void |
importFrom(byte[][] ctx,
java.lang.String sourceType,
java.lang.String sourceLocation,
java.lang.String sourceName)
Imports data from an external source into the database BLOB specified by the localData attribute. |
boolean |
isConnected()
Determines whether the domain object has an internal JDBC connection to the database. |
boolean |
isLocal()
Determines whether the content data is stored locally in the database in a BLOB specified by the localData attribute. |
boolean |
loadDataFromByteArray(byte[] byteArr)
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 |
loadFromDatabase(oracle.jbo.Transaction xAct)
Internal: Applications should not use this method. |
void |
prepareCTPassivation()
Internal: Applications should not use this method. |
void |
prepareForDML(java.lang.Object context)
Internal: Applications should not use this method. |
java.lang.String |
printXMLDefinition(java.util.Hashtable allDefs,
java.io.PrintWriter pw,
boolean bContainees)
Internal: Applications should not use this method. |
void |
process(java.lang.String cmd)
Performs one or more image processing operations on the image data in the database BLOB specified by the localData attribute. |
void |
processCopy(java.lang.String cmd,
OrdImage dest)
Copies the image data to the destination object and performs one or more image processing operations on the image data. |
void |
removeListenerFromTransaction()
Internal: Applications should not use this method. |
void |
saveToDatabase(oracle.jbo.Transaction xAct)
Internal: Applications should not use this method. |
void |
saveToDatabase(oracle.jbo.Transaction xAct,
java.lang.Object emptySQLObject)
Internal: Applications should not use this method. |
void |
setAttribute(int index,
java.lang.Object value)
Internal: Applications should not use this method. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Internal: Applications should not use this method. |
void |
setCompressionFormat(java.lang.String CompressionFormat)
Sets the compressionFormat attribute. |
void |
setContentFormat(java.lang.String ContentFormat)
Sets the contentFormat 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 |
setContext(oracle.jbo.domain.DomainOwnerInterface owner,
oracle.jbo.Transaction trans,
java.lang.Object ctx)
Internal: Applications should not use this method. |
void |
setCTPassivationHandle(java.lang.Object handle)
Internal: Applications should not use this method. |
void |
setFormat(java.lang.String format)
Sets the fileFormat attribute. |
void |
setHeight(int height)
Sets the height attribute. |
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 image data properties and sets the attributes in the OrdImageDomain Java object. |
void |
setProperties(java.lang.String cmd)
Writes the characteristics of a foreign image into the appropriate attribute fields. |
void |
setSource(java.lang.String sourceType,
java.lang.String sourceLocation,
java.lang.String sourceName)
Sets the srcType, srcLocation, and srcName attributes. |
void |
setUpdateTime(java.sql.Timestamp currentTime)
Sets the updateTime attribute. |
void |
setWidth(int width)
Sets the width attribute. |
void |
syncClientLob(oracle.jbo.domain.LobInterface newArrival)
Internal: Applications should not use this method. |
void |
syncServerLob(oracle.jbo.domain.LobInterface oldObj)
Internal: Applications should not use this method. |
java.lang.String |
toString()
Returns a String object describing this object. |
| Methods inherited from class oracle.ord.im.OrdImage |
toDatum |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public OrdImageDomain()
OrdImageDomain instance. Before it has
been inserted into the database table and selected back; this new
instance doesn't have a JDBC connection to the database. It also
doesn't have a corresponding existing database ORDSYS.ORDImage object.public OrdImageDomain(byte[] bytes)
OrdImageDomain instance. Before it has
been inserted into the database table and selected back; this new
instance doesn't have a JDBC connection to the database. It also
doesn't have a corresponding existing database ORDSYS.ORDImage object.
Users should use deferred loading to load the image content into
the database.
Calling this constructor has the same effect of calling the following two statements.
OrdImageDomain image = new OrdImageDomain();
image.setContentSource(new OrdByteArraySource(bytes));
bytes - the byte array that contains the image contentOrdContentSource,
OrdByteArraySourcepublic OrdImageDomain(java.lang.String fileName)
OrdImageDomain instance. Before it has
been inserted into the database table and selected back; this new
instance doesn't have a JDBC connection to the database. It also
doesn't have a corresponding existing database ORDSYS.ORDImage object.
Users should use deferred loading to load the image content into
the database.
Calling this constructor has the same effect of calling the following two statements.
OrdImageDomain image = new OrdImageDomain();
image.setContentSource(new OrdFileSource(fileName));
fileName - the image file nameOrdContentSource,
OrdFileSourcepublic OrdImageDomain(OrdHttpUploadFile ohuf)
OrdImageDomain instance. Before it has
been inserted into the database table and selected back; this new
instance doesn't have a JDBC connection to the database. It also
doesn't have a corresponding existing database ORDSYS.ORDImage object.
Users should use deferred loading to load the image content into
the database.
Calling this constructor has the same effect of calling the following two statements.
OrdImageDomain image = new OrdImageDomain();
image.setContentSource(new OrdHttpUploadFileSource(ohuf));
ohuf - the image content wrapped as an OrdHttpUploadFile
objectOrdContentSource,
OrdHttpUploadFileSource| Method Detail |
public static oracle.sql.CustomDatumFactory getFactory()
OrdImageDomain CustomDatumFactory for use by the
getCustomDatum method. Specify this method as the factory
parameter of the getCustomDatum method when retrieving an
OrdImageDomain object from an OracleResultSet
or OracleCallableStatement. For example:
OrdImageDomain img = (OrdImageDomain)rset.
getCustomDatum( 1, OrdImageDomain.getFactory() );
OrdImageDomain implementation of the
CustomDatumFactory interfacepublic static oracle.sql.CustomDatumFactory getCustomDatumFactory()
public java.lang.String toString()
String object describing this object.
The format of the description is "OrdImageDomain:
<mimetype>:<length>".toString in class java.lang.ObjectString object describing this objectpublic int hashCode()
inthashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
OrdImageDomain objects by their last update time
and content length. For performance reasons, bit by bit comparison
of binary content is not done.equals in class java.lang.Objectobj - the object to be compared with this objecttrue if the two OrdImageDomain
objects have the same last update time and content length;
otherwise, returns false
public oracle.sql.BLOB getContent()
throws java.sql.SQLException
getContent in class OrdImageoracle.sql.BLOBjava.sql.SQLException - if an error occurs when accessing the localData
attribute
public oracle.sql.BFILE getBFILE()
throws java.sql.SQLException
getBFILE in class OrdImageoracle.sql.BFILE.java.sql.SQLException - if an error occurs while executing the corresponding
getBFILE method in the database
public boolean isLocal()
throws java.sql.SQLException
OrdDomainIOInterfaceisLocal in interface OrdDomainIOInterfaceisLocal in class OrdImageoracle.ord.im.OrdDomainIOInterfacetrue if the data is stored locally in the database
in a BLOB; otherwise, returns falsejava.sql.SQLException - if an error occurs when accessing the
attribute called local.
public void clearLocal()
throws java.sql.SQLException
OrdDomainIOInterfaceclearLocal in interface OrdDomainIOInterfaceclearLocal in class OrdImageoracle.ord.im.OrdDomainIOInterfacejava.sql.SQLException - if an error occurs when accessing the
attribute called local.
public void setLocal()
throws java.sql.SQLException
OrdDomainIOInterfacesetLocal in interface OrdDomainIOInterfacesetLocal in class OrdImageoracle.ord.im.OrdDomainIOInterfacejava.sql.SQLException - if an error occurs when accessing the
attribute called local.
public void deleteContent()
throws java.sql.SQLException
OrdDomainIOInterfacedeleteContent in interface OrdDomainIOInterfacedeleteContent in class OrdImageoracle.ord.im.OrdDomainIOInterfacejava.sql.SQLException - if an error occurs when executing the corresponding
deleteContent method in the database.
public void importData(byte[][] ctx)
throws java.sql.SQLException
OrdImagesetFormat to set the fileFormat to a
String beginning with "OTHER" to disable the automatic call
to setProperties.importData in class OrdImageoracle.ord.im.OrdImagectx - the source plug-in context information.java.sql.SQLException - if an error occurs executing the corresponding
import method or the setProperties method in the
database.
public void importFrom(byte[][] ctx,
java.lang.String sourceType,
java.lang.String sourceLocation,
java.lang.String sourceName)
throws java.sql.SQLException
OrdImagesetFormat to set the
fileFormat to "OTHER" to disable the automatic call to setProperties.importFrom in class OrdImageoracle.ord.im.OrdImagectx - the source plug-in context information.srcType - the source type, for example, "FILE", "HTTP".srcLocation - the source location, for example, IMAGES_DIR,
www.xyzcoimages.com/public.srcName - the source name, for example, scenery1.jpg.java.sql.SQLException - if an error occurs executing the corresponding
importFrom method or the setProperties method in
the database.
public boolean loadDataFromFile(java.lang.String filename)
throws java.sql.SQLException,
java.io.IOException
OrdDomainIOInterfaceOrdDomainIOInterface.deleteContent(), to delete any existing data in the BLOB.
OrdDomainIOInterface.setLocal(), to set the local flag.
setUpdateTime(), to set the updateTime
attribute to the database server's current SYSDATE time.
loadDataFromFile in interface OrdDomainIOInterfaceloadDataFromFile in class OrdImageoracle.ord.im.OrdDomainIOInterfacefilename - 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.
public boolean loadDataFromInputStream(java.io.InputStream inpStream)
throws java.sql.SQLException,
java.io.IOException
OrdDomainIOInterfaceInputStream into the database BLOB
specified by the
localData attribute. Before loading the data, this method calls the
following methods:
OrdDomainIOInterface.deleteContent(), to delete any existing data in the BLOB.
OrdDomainIOInterface.setLocal(), to set the local flag.
setUpdateTime(), to set the updateTime
attribute to the database server's current SYSDATE time.
loadDataFromInputStream in interface OrdDomainIOInterfaceloadDataFromInputStream in class OrdImageoracle.ord.im.OrdDomainIOInterfaceinpStream - 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.
public boolean loadDataFromByteArray(byte[] byteArr)
throws java.sql.SQLException,
java.io.IOException
OrdDomainIOInterfaceOrdDomainIOInterface.deleteContent(), to delete any existing data in the BLOB.
OrdDomainIOInterface.setLocal(), to set the local flag.
setUpdateTime(), to set the updateTime
attribute to the database server's current SYSDATE time.
loadDataFromByteArray in interface OrdDomainIOInterfaceloadDataFromByteArray in class OrdImageoracle.ord.im.OrdDomainIOInterfacebyteArr - 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.
public void process(java.lang.String cmd)
throws java.sql.SQLException
OrdImageprocess in class OrdImageoracle.ord.im.OrdImagecmd - a String that specifies a list of image
processing operations to perform on the image.java.sql.SQLException - if an error occurs executing the corresponding
process method in the database.
public void setCompressionFormat(java.lang.String CompressionFormat)
throws java.sql.SQLException
OrdImage
setProperties sets this attribute automatically
for certain media formats; use this method only if you are not using
setProperties. This method sets the attribute value only; it does not
modify the media data itself.
setCompressionFormat in class OrdImageoracle.ord.im.OrdImagecompressionFormat - the new attribute value.java.sql.SQLException - if an error occurs accessing the compressionFormat
attribute.
public java.lang.String getCompressionFormat()
throws java.sql.SQLException
OrdImagegetCompressionFormat in class OrdImageoracle.ord.im.OrdImageString.java.sql.SQLException - if an error occurs accessing the compressionFormat
attribute.
public void setContentFormat(java.lang.String ContentFormat)
throws java.sql.SQLException
OrdImage
setProperties sets this attribute automatically
for certain media formats; use this method only if you are not using
setProperties. This method sets the attribute value only; it does not
modify the media data itself.
setContentFormat in class OrdImageoracle.ord.im.OrdImagecontentFormat - the new attribute value.java.sql.SQLException - if an error occurs accessing the contentFormat
attribute.
public java.lang.String getContentFormat()
throws java.sql.SQLException
OrdImagegetContentFormat in class OrdImageoracle.ord.im.OrdImageString.java.sql.SQLException - if an error occurs accessing the contentFormat
attribute.
public void setContentLength(int newContentLength)
throws java.sql.SQLException
setProperties sets this attribute automatically
for certain media formats; use this method only if you are not using
setProperties. This method sets the attribute value only; it does not
modify the media data itself.
setContentLength in interface OrdDomainIOInterfacesetContentLength in class OrdImagecontentLength - the new attribute valuejava.sql.SQLException - if an error occurs when accessing the contentLength
attribute
public int getContentLength()
throws java.sql.SQLException
getContentLength in interface OrdDomainIOInterfacegetContentLength in class OrdImageintjava.sql.SQLException - if an error occurs when accessing the contentLength
attribute
public java.lang.String getFormat()
throws java.sql.SQLException
OrdImagegetFormat in class OrdImageoracle.ord.im.OrdImageString.java.sql.SQLException - if an error occurs accessing the fileFormat attribute.
public void setFormat(java.lang.String format)
throws java.sql.SQLException
OrdImage
setProperties sets this attribute automatically
for certain media formats; use this method only if you are not using
setProperties. This method sets the attribute value only; it does not
modify the media data itself. Set the fileFormat attribute to a
String beginning with "OTHER" to disable the automatic
call to setProperties by the importData and
importFrom methods.
setFormat in class OrdImageoracle.ord.im.OrdImagefileFormat - the new attribute value.java.sql.SQLException - if an error occurs accessing the fileFormat attribute.
public void setMimeType(java.lang.String MimeType)
throws java.sql.SQLException
OrdDomainIOInterfacesetMimeType in interface OrdDomainIOInterfacesetMimeType in class OrdImageoracle.ord.im.OrdDomainIOInterfacemimeType - the new attribute value.java.sql.SQLException - if an error occurs when accessing the mimeType
attribute.
public java.lang.String getMimeType()
throws java.sql.SQLException
OrdDomainIOInterfacegetMimeType in interface OrdDomainIOInterfacegetMimeType in class OrdImageoracle.ord.im.OrdDomainIOInterfaceString.java.sql.SQLException - if an error occurs when accessing the mimeType
attribute.
public void setSource(java.lang.String sourceType,
java.lang.String sourceLocation,
java.lang.String sourceName)
throws java.sql.SQLException
OrdDomainIOInterfacesetSource in interface OrdDomainIOInterfacesetSource in class OrdImageoracle.ord.im.OrdDomainIOInterfacesrcType - 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.
public java.lang.String getSourceType()
throws java.sql.SQLException
OrdDomainIOInterfacegetSourceType in interface OrdDomainIOInterfacegetSourceType in class OrdImageoracle.ord.im.OrdDomainIOInterfaceString.java.sql.SQLException - if an error occurs when accessing the
srcType attribute.
public java.lang.String getSourceLocation()
throws java.sql.SQLException
OrdDomainIOInterfacegetSourceLocation in interface OrdDomainIOInterfacegetSourceLocation in class OrdImageoracle.ord.im.OrdDomainIOInterfaceString.java.sql.SQLException - if an error occurs when accessing the
srcLocation attribute.
public java.lang.String getSourceName()
throws java.sql.SQLException
OrdDomainIOInterfacegetSourceName in interface OrdDomainIOInterfacegetSourceName in class OrdImageoracle.ord.im.OrdDomainIOInterfaceString.java.sql.SQLException - if an error occurs when accessing the srcName
attribute.
public java.lang.String getSource()
throws java.sql.SQLException
OrdImagesrcType://srcLocation/srcName.getSource in class OrdImageoracle.ord.im.OrdImageString.java.sql.SQLException - if an error occurs executing the correspoding
getSource method in the database.
public boolean checkProperties()
throws java.sql.SQLException
OrdImagecheckProperties in class OrdImageoracle.ord.im.OrdImagetrue if the properties of the image data are
consistent with the attributes of the OrdImage Java object;
false otherwise.java.sql.SQLException - if an error occurs executing the corresponding
checkProperties method in the database.
public void setProperties()
throws java.sql.SQLException
OrdImageDomain Java object. This method sets the height
, width, contentLength,
fileFormat, contentFormat, compressionFormat, and mimeType attributes.
An attribute is set to null if the corresponding property cannot be
extracted for a specific image format. This method throws a
SQLException if the image format is not recognized.setProperties in interface OrdDomainIOInterfacesetProperties in class OrdImagejava.sql.SQLException - if an error occurs while executing the corresponding
setProperties method in the database
public void setProperties(java.lang.String cmd)
throws java.sql.SQLException
OrdImagesetProperties in class OrdImageoracle.ord.im.OrdImagedescription - a String that specifies the image
characteristics to set for the foreign image.java.sql.SQLException - if an error occurs executing the corresponding
setProperties method in the database.
public void setUpdateTime(java.sql.Timestamp currentTime)
throws java.sql.SQLException
OrdDomainIOInterfacesetUpdateTime in interface OrdDomainIOInterfacesetUpdateTime in class OrdImageoracle.ord.im.OrdDomainIOInterfacecurrentTime - 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.
public java.sql.Timestamp getUpdateTime()
throws java.sql.SQLException
OrdDomainIOInterfacegetUpdateTime in interface OrdDomainIOInterfacegetUpdateTime in class OrdImageoracle.ord.im.OrdDomainIOInterfacejava.sql.Timestamp.java.sql.SQLException - if an error occurs when accessing the
updateTime attribute.
public int getWidth()
throws java.sql.SQLException
OrdImagegetWidth in class OrdImageoracle.ord.im.OrdImageint.java.sql.SQLException - if an error occurs accessing the width attribute.
public void setWidth(int width)
throws java.sql.SQLException
OrdImage
setProperties sets this attribute automatically
for certain image formats; use this method only if you are not using
setProperties. This method sets the attribute value only; it does not
modify the image data itself.
setWidth in class OrdImageoracle.ord.im.OrdImagewidth - the new attribute value.java.sql.SQLException - if an error occurs accessing the width attribute.
public int getHeight()
throws java.sql.SQLException
OrdImagegetHeight in class OrdImageoracle.ord.im.OrdImageint.java.sql.SQLException - if an error occurs accessing the height attribute.
public void setHeight(int height)
throws java.sql.SQLException
OrdImage
setProperties sets this attribute automatically
for certain image formats; use this method only if you are not using
setProperties. This method sets the attribute value only; it does not
modify the image data itself.
setHeight in class OrdImageoracle.ord.im.OrdImageheight - the new attribute value.java.sql.SQLException - if an error occurs accessing the height attribute.
public void export(byte[][] ctx,
java.lang.String sourceType,
java.lang.String sourceLocation,
java.lang.String sourceName)
throws java.sql.SQLException
OrdImageNot all source plug-ins support the export method. For example, the "FILE" source type is the only Oracle-supplied source type that supports the export method. In addition, this method is supported only by Oracle database server release 8.1.7 or later.
The remainder of this description illustrates the use of the export method and the Oracle-supplied "FILE" source plug-in. User-written plug-ins will have different behaviors.
The export method implemented by the Oracle-supplied "FILE" source plug-in copies the image data from the BLOB specified by the localData attribute, but does not modify the image data stored in the database BLOB in any way.
After exporting the image data, all the image property attributes remain
unchanged, however, the srcType, srcLocation, and srcName attributes are
updated with values of the srcType, srcLocation, and srcName parameters
passed to the export method. After calling the export method, if you no
longer intend to manage the image data within the database, call the
OrdImage.clearLocal() method to indicate the image data is stored outside
the database and call the OrdImage.deleteContent() method to delete the
image data stored in the database BLOB.
The export method in the database writes only to a database directory object that the user has privilege to access. That is, you can access a directory that you have created using the SQL CREATE DIRECTORY statement, or one to which you have been granted READ access. To execute the CREATE DIRECTORY statement, you must have the CREATE ANY DIRECTORY privilege. In addition, you must use the DBMS_JAVA.GRANT_PERMISSION method to specify which files can be written.
For example, the following SQL*Plus command grants the user,
MEDIAUSER, the permission to write to the file named
scenery1.jpg.
CALL DBMS_JAVA.GRANT_PERMISSION(
'MEDIAUSER',
'java.io.FilePermission',
'/images/outdoors/scenery1.jpg',
'write');
The previous example illustrates how to authorize access to write to a
single file. In addition, there are various wildcard path specifications
that authorize write access to multiple directories and file names.
For example, a path specification that ends in "/*" (where
"/" is the operating-system dependent file separator
character) indicates all the files contained in the specified directory.
A path specification that ends with "/-" indicates all files
contained in the specified directory and all its subdirectories. A
pathname consisting of the special token
"<<ALL FILES>>" authorizes access to any file.
See the security and performance section in Oracle Java Developer's Guide and the java.io.FilePermission class in the Java API for more information.
export in class OrdImageoracle.ord.im.OrdImagectx - the source plug-in context information.srcType - the source type, for example, "FILE".srcLocation - the source location, for example, IMAGES_DIR.srcName - the source name, for example, scenery1.jpg.java.sql.SQLException - if an error occurs executing the corresponding export
method in the database.
public void copy(OrdImage dest)
throws java.sql.SQLException
OrdImagecopy in class OrdImageoracle.ord.im.OrdImagedest - the destination OrdImage object.java.sql.SQLException - if an error occurs calling the corresponding copy
method in the database.
public void processCopy(java.lang.String cmd,
OrdImage dest)
throws java.sql.SQLException
OrdImageprocessCopy in class OrdImageoracle.ord.im.OrdImagecmd - a String that specifies a list of image
processing operations to perform on the image.dest - the destination OrdImage object.java.sql.SQLException - if an error occurs calling the corresponding
processCopy method in the database.
public boolean getDataInFile(java.lang.String filename)
throws java.sql.SQLException,
java.io.IOException
OrdDomainIOInterfacegetDataInFile in interface OrdDomainIOInterfacegetDataInFile in class OrdImageoracle.ord.im.OrdDomainIOInterfacefilename - 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.
public java.io.InputStream getDataInStream()
throws java.sql.SQLException
OrdDomainIOInterfacegetDataInStream in interface OrdDomainIOInterfacegetDataInStream in class OrdImageoracle.ord.im.OrdDomainIOInterfaceInputStream from which the data can be read.java.sql.SQLException - if an error occurs when accessing an object attribute.
public byte[] getDataInByteArray()
throws java.sql.SQLException,
java.io.IOException,
java.lang.OutOfMemoryError
OrdDomainIOInterfacegetDataInByteArray in interface OrdDomainIOInterfacegetDataInByteArray in class OrdImageoracle.ord.im.OrdDomainIOInterfacebyte[] 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.
public oracle.jbo.domain.BlobDomain getContentAsBlobDomain()
throws java.sql.SQLException
OrdDomainIOInterfaceBlobDomain object which wraps the
BLOB locator from the localData attribute.getContentAsBlobDomain in interface OrdDomainIOInterfaceoracle.ord.im.OrdDomainIOInterfaceBlobDomain objectjava.sql.SQLException - if an error occurs in calling
getContent method.OrdImage.getContent(),
OrdAudio.getContent(),
OrdVideo.getContent(),
OrdDoc.getContent()
public oracle.jbo.domain.BFileDomain getBFileDomain()
throws java.sql.SQLException
OrdDomainIOInterfaceBFileDomain object which wraps the
BFILE locator obtained from the getBFILE method.getBFileDomain in interface OrdDomainIOInterfaceoracle.ord.im.OrdDomainIOInterfaceBFileDomain objectjava.sql.SQLException - if an error occurs in calling
getBFILE method.OrdImage.getBFILE(),
OrdAudio.getBFILE(),
OrdVideo.getBFILE(),
OrdDoc.getBFILE()public void setContentSource(OrdContentSource source)
OrdDomainIOInterfaceOrdHttpUploadFile 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.
setContentSource in interface OrdDomainIOInterfaceoracle.ord.im.OrdDomainIOInterfacesource - the content source for the deferred loadingOrdContentSourcepublic OrdContentSource getContentSource()
OrdDomainIOInterfacesetContentSource method.getContentSource in interface OrdDomainIOInterfaceoracle.ord.im.OrdDomainIOInterface
public oracle.sql.CustomDatum create(oracle.sql.Datum d,
int sqlType)
throws java.sql.SQLException
OrdImagecreate in class OrdImagepublic static oracle.jbo.domain.XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)
public org.w3c.dom.Node getXMLContentNode(org.w3c.dom.Document xmlDoc)
getXMLContentNode in interface oracle.jbo.domain.XMLDomainInterfacepublic java.lang.Object createDomainFromSerializedXML(org.w3c.dom.Element element)
createDomainFromSerializedXML in interface oracle.jbo.domain.XMLDomainReaderFactorypublic org.w3c.dom.Node getSerializedDomainXML(org.w3c.dom.Document xmlDoc)
getSerializedDomainXML in interface oracle.jbo.domain.XMLDomainWriterxmlDoc - name of the XML document in which the node should be created.
public java.lang.String printXMLDefinition(java.util.Hashtable allDefs,
java.io.PrintWriter pw,
boolean bContainees)
printXMLDefinition in interface oracle.jbo.domain.XMLDomainInterfacepublic void domainToBeModified(oracle.jbo.domain.DomainInterface d)
domainToBeModified in interface oracle.jbo.domain.DomainOwnerInterfacepublic java.lang.Object getAttribute(int index)
getAttribute in interface oracle.jbo.AttributeListpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface oracle.jbo.AttributeList
public void setAttribute(int index,
java.lang.Object value)
setAttribute in interface oracle.jbo.AttributeList
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface oracle.jbo.AttributeListpublic int getAttributeCount()
getAttributeCount in interface oracle.jbo.AttributeListpublic int getAttributeIndexOf(java.lang.String name)
getAttributeIndexOf in interface oracle.jbo.AttributeListpublic java.lang.String[] getAttributeNames()
getAttributeNames in interface oracle.jbo.AttributeListpublic java.lang.Object[] getAttributeValues()
getAttributeValues in interface oracle.jbo.AttributeListpublic void syncServerLob(oracle.jbo.domain.LobInterface oldObj)
syncServerLob in interface oracle.jbo.domain.LobInterfacepublic void syncClientLob(oracle.jbo.domain.LobInterface newArrival)
syncClientLob in interface oracle.jbo.domain.LobInterfacepublic long getSize()
getSize in interface oracle.jbo.domain.LobInterfacepublic java.lang.String getRemoteIdString()
getRemoteIdString in interface oracle.jbo.domain.LobInterface
public void saveToDatabase(oracle.jbo.Transaction xAct)
throws java.sql.SQLException
saveToDatabase in interface oracle.jbo.domain.BlobDomainInterface
public void saveToDatabase(oracle.jbo.Transaction xAct,
java.lang.Object emptySQLObject)
throws java.sql.SQLException,
java.io.IOException
saveToDatabase in interface oracle.jbo.domain.BlobDomainInterfacepublic void prepareForDML(java.lang.Object context)
prepareForDML in interface oracle.jbo.domain.BlobDomainInterface
public void loadFromDatabase(oracle.jbo.Transaction xAct)
throws java.lang.Exception
loadFromDatabase in interface oracle.jbo.domain.BlobDomainInterfacepublic oracle.jbo.domain.DomainOwnerInterface getOwner()
getOwner in interface oracle.jbo.domain.LobInterfacepublic int getOwnerAttributeIndex()
getOwnerAttributeIndex in interface oracle.jbo.domain.LobInterfacepublic java.lang.Object getData()
getData in interface oracle.jbo.domain.DomainInterface
public void setContext(oracle.jbo.domain.DomainOwnerInterface owner,
oracle.jbo.Transaction trans,
java.lang.Object ctx)
setContext in interface oracle.jbo.domain.DomainInterfacepublic boolean isConnected()
OrdDomainStateisConnected in interface OrdDomainStateoracle.ord.im.OrdDomainStatetrue if the there exists an internal JDBC
connection; otherwise, returns false
public int getTierInfo()
OrdDomainStateThe returned value indicates the tier information.
getTierInfo in interface OrdDomainStatepublic void removeListenerFromTransaction()
OrdDomainStateremoveListenerFromTransaction in interface OrdDomainStatepublic void doneCommit(oracle.jbo.TransactionStateEvent event)
doneCommit in interface oracle.jbo.TransactionStateListenerpublic void doneRollback(oracle.jbo.TransactionStateEvent event)
doneRollback in interface oracle.jbo.TransactionStateListenerpublic void setContentSourceOnly(OrdContentSource source)
setContentSourceOnly in interface OrdDomainIOInterfacepublic void setCTPassivationHandle(java.lang.Object handle)
setCTPassivationHandle in interface OrdDomainSupportInterfacepublic java.lang.Object getCTPassivationHandle()
getCTPassivationHandle in interface OrdDomainSupportInterfacepublic void prepareCTPassivation()
prepareCTPassivation in interface OrdDomainSupportInterfacepublic void clearContentSource()
OrdDomainIOInterfaceclearContentSource in interface OrdDomainIOInterface
|
interMedia BC4J Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||