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 ClobDomain

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

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

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

Since:
  JDeveloper 3.0
See Also:
  Serialized Form

Constructor Summary
`ClobDomain()` Constructor for this class.
`ClobDomain(byte[] data)` Constructs an instance of this class, given a byte array.
`ClobDomain(oracle.sql.CLOB clob)` Constructs an instance of this class, given a CLOB object.
`ClobDomain(oracle.sql.CLOB clob, byte[] clobData)` Internal: Applications should not use this constructor.
`ClobDomain(ClobDomain clob, byte[] clobData)` Creates an instance of this class with data as described in `clobData` and using the transaction context from `clob` to use the clob-locator in the database.
`ClobDomain(java.lang.String str)` Constructs an instance of this class, given a string.

Method Summary
`static oracle.sql.CLOB` | `createEmptyCLOB(java.lang.Object context)` Creates an empty CLOB.
`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.
`static XMLDomainFactory` | `getXMLDomainFactory(java.lang.Class attrClass)` 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[] clobData)` Sets the clob data for this object.
`void` | `setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)` Internal: Applications should not use this method.
`void` | `shareCLOB(ClobDomain newBlob)` Internal: Applications should not use this method.
`byte[]` | `toByteArray()` Returns this CLOB as a byte array.
`java.lang.String` | `toString()` For testing purposes only: returns this CLOB as a String.
`void` | `useCLOB(oracle.sql.CLOB 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

### ClobDomain

    public ClobDomain()

  Constructor for this class.

### ClobDomain

    public ClobDomain(java.lang.String str)

  Constructs an instance of this class, given a string.
  Parameters:
    `a` - string to be used for a ClobDomain.

### ClobDomain

    public ClobDomain(byte[] data)

  Constructs an instance of this class, given a byte array.
  Parameters:
    `a` - byte array to be used for a ClobDomain.

### ClobDomain

    public ClobDomain(oracle.sql.CLOB clob)

  Constructs an instance of this class, given a CLOB object.
  Parameters:
    `a` - CLOB to be used for a ClobDomain.

### ClobDomain

    public ClobDomain(oracle.sql.CLOB clob,
                      byte[] clobData)

  Internal: Applications should not use this constructor.

  Creates an instance of this class with data as described in `clobData` and using the transaction context from `clob` to use the CLOB locator in the database.

  Parameters:
    `clob` - name of the CLOB to use as a ClobDomain.
    `clobData` - data to fill the CLOB.

### ClobDomain

    public ClobDomain(ClobDomain clob,
                      byte[] clobData)

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

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

  Parameters:
    `clob` - name of the CLOB to use as a ClobDomain.
    `clobData` - data to fill the CLOB.

Method Detail

### shareCLOB

    public void shareCLOB(ClobDomain newBlob)

  Internal: Applications should not use this method.

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

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

### useCLOB

    public void useCLOB(oracle.sql.CLOB newBlob)

  Internal: Applications should not use this method.

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

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

### setBytes

    public void setBytes(byte[] clobData)

  Sets the clob data for this object.

  Parameters:
    `clobData` - the data used to fill the CLOB.

### 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 CLOB.

### getData

    public java.lang.Object getData()

  Internal: Applications should not use this method.

  Returns `CLOB` that contains data for this object.

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

### saveToDatabase

    public void saveToDatabase(Transaction xAct)
                        throws java.sql.SQLException

  Internal: Applications should not use this method.

  Uses the given transaction context to store data back into the database using the clob-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.

  Uses the given transaction context to store data back into the database using the CLOB locator which should be set before this method is invoked.

  Specified by:
    saveToDatabase in interface BlobDomainInterface
  Throws:
    java.sql.SQLException - if the save fails.

### prepareForDML

    public void prepareForDML(java.lang.Object context)

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

### createEmptyCLOB

    public static oracle.sql.CLOB createEmptyCLOB(java.lang.Object context)

  Creates an empty CLOB.

  Parameters:
    `context` - an internal framework context.

### toString

    public java.lang.String toString()

  For testing purposes only: returns this CLOB as a String.
  Overrides:
    toString in class java.lang.Object
  Returns:
    the CLOB as a string.

### toByteArray

    public byte[] toByteArray()

  Returns this CLOB as a byte array.

  Returns:
    the CLOB 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 ClobDomain.

### getXMLDomainFactory

    public static XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)

  Internal: Applications should not use this method.

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