Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.domain
Class Ref

`java.lang.Object
oracle.jbo.domain.Ref`

All Implemented Interfaces:
  CustomDatum, DomainInterface, ObjectData, java.io.Serializable

public class Ref
extends java.lang.Object
implements DomainInterface, CustomDatum, java.io.Serializable

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

The `oracle.jbo.domain.Ref` class is the Java representation of the underlying database type that you must use if you want to exploit the domain feature of Business Components for Java.

Since:
  JDeveloper 3.0
See Also:
  Serialized Form

Constructor Summary
`protected` | `Ref()` Internal: Applications should not invoke this constructor.
`` | `Ref(Datum d)` Internal: Applications should not invoke this constructor.
`` | `Ref(java.lang.String structName, byte[] data)` Internal: Applications should not invoke this constructor.

Method Summary
`boolean` | `equals(java.lang.Object obj)` Tests `this` for equality with another object.
`byte[]` | `getBytes()` Returns the contents of the Ref in byte format.
`static CustomDatumFactory` | `getCustomDatumFactory()` Internal: Applications should not invoke this method.
`java.lang.Object` | `getData()` Internal: Applications should not invoke this method.
`Row` | `getReferencedObject(DomainAttributeDef ad)` Returns an an instance of the refernced row, given the attribute definition object.
`java.lang.String` | `getStructName()` Returns the name of the struct associated with this RefDomain.
`void` | `setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object fac)` Internal: Applications should not invoke this method.
`Datum` | `toDatum(OracleConnection conn)` Internal: Applications should not invoke this method.

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

Constructor Detail

### Ref

    protected Ref()
           throws java.sql.SQLException

  Internal: Applications should not invoke this constructor.

### Ref

    public Ref(java.lang.String structName,
               byte[] data)

  Internal: Applications should not invoke this constructor.

  Creates a Ref Domain object.

### Ref

    public Ref(Datum d)
        throws java.sql.SQLException

  Internal: Applications should not invoke this constructor.

Method Detail

### getCustomDatumFactory

    public static CustomDatumFactory getCustomDatumFactory()

  Internal: Applications should not invoke this method.

  Initializes the `Ref` Domain. This method is invoked when Business Components for Java is initialized.

  Returns:
    the `CustomDatumFactory` for the `Ref` Domain.

### toDatum

    public Datum toDatum(OracleConnection conn)
                  throws java.sql.SQLException

  Internal: Applications should not invoke this method.

  Converts this `Ref` Domain object back into a SQL `REF` object.

  Specified by:
    `toDatum` in interface `CustomDatum`
  Parameters:
    `conn` - `OracleConnection` Not used.
  Returns:
    A `Datum` containing `REF` object.
  Throws:
    `java.sql.SQLException` - Never.

### setContext

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

  Internal: Applications should not invoke this method.
  Specified by:
    `setContext` in interface `DomainInterface`

### getData

    public java.lang.Object getData()

  Internal: Applications should not invoke this method.

  Converts `this` to a JDBC object.

  Specified by:
    `getData` in interface `DomainInterface`
  Returns:
    the JDBC representation of `this`, or `null`, if the conversion fails.

### getStructName

    public java.lang.String getStructName()

  Returns the name of the struct associated with this RefDomain.
  Returns:
    the name of the struct.

### getBytes

    public byte[] getBytes()

  Returns the contents of the Ref in byte format.
  Returns:
    a byte array containing the contents of the Ref.

### getReferencedObject

    public Row getReferencedObject(DomainAttributeDef ad)

  Returns an an instance of the refernced row, given the attribute definition object. The referenced row is returned as an `Row` object.
  Parameters:
    `ad` - the attribute's attribute definition object.
  Returns:
    the row corredsponding to the attribute definition object.
  See Also:
    `Row`

### equals

    public boolean equals(java.lang.Object obj)

  Tests `this` for equality with another object.

  The argument is converted to a `Ref` object, if necessary.

  Parameters:
    `obj` - an arbitrary `Object`.
  Returns:
    `true` if conversion was successful and the converted argument is identical to `this`.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.