Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.domain
Class BFileDomain

    java.lang.Object
      |
      +--oracle.jbo.domain.BFileDomain

public class BFileDomain
extends java.lang.Object
implements BlobDomainInterface, java.io.Serializable

This class provides a lightweight wrapper for `oracle.sql.BFILE`, the Java representation of the BFILE database type. This wrapper allows an instance of the `oracle.sql.BFILE` to be used as a domain object.

Since:
  JDeveloper 3.0
See Also:
  Serialized Form

Constructor Summary
`BFileDomain()` Constructor for this class.
`BFileDomain(oracle.sql.BFILE bFile)` Constructor for this class, given a BFILE object.
`BFileDomain(oracle.sql.BFILE bFile, byte[] bFileData)` Internal: Applications should not use this constructor.
`BFileDomain(BFileDomain bFile, byte[] bFileData)` Creates an instance of this class with data as described in `bFileData` and using the transaction context from `bFile` to use the file-locator in the database.

Method Summary
`boolean` | `equals(java.lang.Object obj)` Converts all the data into a String and compares the two strings.
`java.lang.Object` | `getData()` Internal: Applications should not use this method.
`void` | `loadFromDatabase(Transaction xAct)` Internal: Applications should not use this method.
`void` | `prepareForDML(java.lang.Object context)` Internal: Applications should not use this method.
`void` | `saveToDatabase(Transaction xAct)` Internal: Applications should not use this method.
`void` | `saveToDatabase(Transaction xAct, java.lang.Object emptySQLObject)` Internal: Applications should not use this method.
`void` | `setBytes(byte[] bFileData)` Sets the file data for this object.
`void` | `setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)` Internal: Applications should not use this method.
`void` | `shareBFILE(BFileDomain newBlob)` Internal: Applications should not use this method.
`byte[]` | `toByteArray()` Returns the contents of this BFILE as a byte array.
`java.lang.String` | `toString()` For testing purposes only: returns the contents fo the BFILE as a string.
`void` | `useBFILE(oracle.sql.BFILE newBlob)` Internal: Applications should not use this method.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BFileDomain

    public BFileDomain()

  Constructor for this class.

### BFileDomain

    public BFileDomain(oracle.sql.BFILE bFile)

  Constructor for this class, given a BFILE object. This is for use by JDBC.
  Parameters:
    `bFile` - name of a BFILE object.

### BFileDomain

    public BFileDomain(oracle.sql.BFILE bFile,
                       byte[] bFileData)

  Internal: Applications should not use this constructor.

  Creates an instance of this class with data as described in `bFileData` and using the transaction context from `bFile` to use the file-locator in the database.

  Parameters:
    `bfile` - the name of the BFILE.
    `bFileData` - the data for the BFILE.

### BFileDomain

    public BFileDomain(BFileDomain bFile,
                       byte[] bFileData)

  Creates an instance of this class with data as described in `bFileData` and using the transaction context from `bFile` to use the file-locator in the database.

  This constructor should be used by applications using the framework to create BFileDomain objects.

  Parameters:
    `bfile` - the name of the BFILE.
    `bFileData` - the data forthe BFILE.

Method Detail

### shareBFILE

    public void shareBFILE(BFileDomain newBlob)

  Internal: Applications should not use this method.

  If this object does not have a transaction context, shares the transaction and BFILE locator from `newBfile`.

  Parameters:
    `newBfile` - name of the BFILE with which this BFILE will share its transaction and file locator information.

### useBFILE

    public void useBFILE(oracle.sql.BFILE newBlob)

  Internal: Applications should not use this method.

  If this object does not have a transaction context, shares the transaction and BFILE locator from `newBfile`.

  Parameters:
    `newBfile` - name of the BFILE with which this BFILE will share its transaction and BFILE locator information.

### setBytes

    public void setBytes(byte[] bFileData)
                  throws DomainValidationException

  Sets the file data for this object.

  Parameters:
    `bFileData` - the data used to fill the BFILE.
  Throws:
    DomainValidationException - if domain creation fails.

### loadFromDatabase

    public void loadFromDatabase(Transaction xAct)
                          throws java.lang.Exception

  Internal: Applications should not use this method.

  Uses the given transaction context to load data from the database.

  Specified by:
    loadFromDatabase in interface BlobDomainInterface
  Parameters:
    `xAct` - the name of the transaction to use.

### setContext

    public void setContext(DomainOwnerInterface owner,
                           Transaction trans,
                           java.lang.Object ctx)

  Internal: Applications should not use this method.

  Sets the transaction context for this BFILE.

### getData

    public java.lang.Object getData()

  Internal: Applications should not use this method.

  Returns a `BFILE` that contains data for this object.

  Tags copied from interface: DomainInterface
  Returns:
    a formatted value object.

### saveToDatabase

    public void saveToDatabase(Transaction xAct)
                        throws java.lang.Exception

  Internal: Applications should not use this method.

  NOT IMPLEMENTED FOR 3.0 Uses the given transaction context to store data back into the database using the BFILE locator which should be set before this method is invoked.

  Specified by:
    saveToDatabase in interface BlobDomainInterface
  Parameters:
    `xAct` - the name of the transaction.

### saveToDatabase

    public void saveToDatabase(Transaction xAct,
                               java.lang.Object emptySQLObject)
                        throws java.sql.SQLException

  Internal: Applications should not use this method.

  NOT IMPLEMENTED FOR 3.0 Uses the given transaction context to store data back into the database using the BFILE locator which should be set before this method is invoked.

  Specified by:
    saveToDatabase in interface BlobDomainInterface

### prepareForDML

    public void prepareForDML(java.lang.Object context)

  Internal: Applications should not use this method.
  Specified by:
    prepareForDML in interface BlobDomainInterface

### toString

    public java.lang.String toString()

  For testing purposes only: returns the contents fo the BFILE as a string.
  Overrides:
    toString in class java.lang.Object
  Parameters:
    `the` - contents of the BFILE as a string.

### toByteArray

    public byte[] toByteArray()

  Returns the contents of this BFILE as a byte array.
  Returns:
    the contents of the BFILE as a byte array.

### equals

    public boolean equals(java.lang.Object obj)

  Converts all the data into a String and compares the two strings. This is a default implementation of equals which could be overridden to perform more scalable application-specific comparision.

  Overrides:
    equals in class java.lang.Object
  Parameters:
    `obj` - the object to compare to this BfileDomain.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD