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

The BC4J tier independent counterparts of these two methods are the
following:

getContentAsBlobDomain

getBFileDomain

The term client tier refers to the machine on which the application
client is running. Middle tier refers to the server on which the BC4J
business components are deployed. The user can use "local mode only"
methods when he deploys BC4J and the client application to the same
machine. Whereas, the user should use tier independent methods when
the application client and BC4J reside on separate machines.

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.

OrdImageDomain

public OrdImageDomain()

Constructs a new 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.

OrdImageDomain

public OrdImageDomain(byte[] bytes)

Constructs a new 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

public OrdImageDomain(java.lang.String fileName)

Constructs a new 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

Constructs a new 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

public OrdImageDomain(oracle.ord.im.OrdHttpUploadFile ohuf)

Constructs a new 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.

getObjectId

getORADataFactory

public static oracle.sql.ORADataFactory getORADataFactory()

Returns the OrdImageDomain ORADataFactory for use by the
getORAData method. Specify this method as the factory
parameter of the getORAData method when retrieving an
OrdImageDomain object from an OracleResultSet
or OracleCallableStatement. For example:

getFactory

public static oracle.sql.CustomDatumFactory getFactory()

Deprecated.

Returns the 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:

java.sql.SQLException - if an error occurs when accessing the localData attribute

getBlobContent

public java.sql.Blob getBlobContent()
throws java.sql.SQLException

Returns the Blob locator from the localData attribute.

Note

local mode only

Overrides:

getBlobContent in class oracle.ord.im.OrdImage

Returns:

an java.sql.Blob

Throws:

java.sql.SQLException - if an error occurs when accessing the localData attribute

getBFILE

public oracle.sql.BFILE getBFILE()
throws java.sql.SQLException

Returns a BFILE locator from the database when the srcType
attribute is
"FILE". This method calls the corresponding getBFILE method in the
database, which creates the BFILE using the srcLocation and
srcName attributes.

Note

local mode only

Overrides:

getBFILE in class oracle.ord.im.OrdImage

Returns:

an oracle.sql.BFILE.

Throws:

java.sql.SQLException - if an error occurs while executing the corresponding
getBFILE method in the database

setContentLength

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.

java.sql.SQLException - if an error occurs when accessing the srcName
attribute.

getSource

public java.lang.String getSource()
throws java.sql.SQLException

Overrides:

getSource in class oracle.ord.im.OrdImage

Throws:

java.sql.SQLException

checkProperties

public boolean checkProperties()
throws java.sql.SQLException

Overrides:

checkProperties in class oracle.ord.im.OrdImage

Throws:

java.sql.SQLException

setProperties

public void setProperties()
throws java.sql.SQLException

Parses the image data properties and sets the attributes in the
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.

setContentSource

Sets the content source for deferred loading. Three predefined content
source implementations support loading content from a file, a byte
array, or a 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.