Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

oracle.jbo.domain
Class Raw

java.lang.Object
  extended by oracle.sql.Datum
      extended by oracle.sql.RAW
          extended by oracle.jbo.domain.Raw
All Implemented Interfaces:
java.io.Serializable, DomainInterface, KeyAttributeInterface, NativeTypeDomainInterface, oracle.jdbc.internal.ObjectData, ORAData

public class Raw
extends RAW
implements NativeTypeDomainInterface, KeyAttributeInterface, ORAData, java.io.Serializable

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

The intent of many of the methods in this class is to wrap the corresponding method in the oracle.sql class such that it returns an instance of an oracle.jbo.domain.* object.

Raw objects consist of data (a byte array) and a Domain type code.

The oracle.jbo.domain.Raw 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
javabean.class
name=Raw

Field Summary
 
Fields inherited from class oracle.sql.RAW
BUILD_DATE, TRACE
 
Constructor Summary
Raw()
          Creates a default Raw Domain object.
Raw(byte[] value)
          Internal: Applications should not invoke this constructor.
Raw(java.lang.Object value)
          Creates a Raw Domain object from a Java Object.
Raw(Raw value)
          Creates a Raw object identical to an existing Raw object.
Raw(RAW value)
          Creates a Raw Domain object encapsulating an SQL RAW object.
Raw(java.lang.String value)
          Creates a Raw Domain object from a Java String.
 
Method Summary
 boolean equals(java.lang.Object other)
          Tests this for equality with another object.
 java.lang.Object getData()
          Internal: Applications should not invoke this method. Converts this to a JDBC object.
 java.lang.Object getNativeObject()
           
static ORADataFactory getORADataFactory()
          Internal: Applications should not invoke this method.
 byte[] getValue()
          Return a byte[] object with this domain's value.
static XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)
          Internal: Applications should not use this method.
 int hashCode()
          Computes a hash code for this.
static byte[] readBytesFromXML(Node node)
           
 void setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)
          Internal: Applications should not invoke this method.
 Datum toDatum(java.sql.Connection conn)
          Internal: Applications should not invoke this method.
 java.lang.String toString()
          For testing purposes only: converts this to a character string.
 
Methods inherited from class oracle.sql.RAW
asciiStreamValue, binaryStreamValue, characterStreamValue, getConnectionDuringExceptionHandling, hexString2Bytes, isConvertibleTo, makeJdbcArray, newRAW, oldRAW, stringValue, toJdbc
 
Methods inherited from class oracle.sql.Datum
bigDecimalValue, booleanValue, byteValue, compareBytes, dateValue, doubleValue, floatValue, getBytes, getLength, getStream, intValue, longValue, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.jbo.domain.KeyAttributeInterface
getBytes, setBytes
 

Constructor Detail

Raw

public Raw()
Creates a default Raw Domain object.

This constructor does not create a null object. To create a null object, use the NullValue object to indicate null.


Raw

public Raw(Raw value)
    throws java.sql.SQLException
Creates a Raw object identical to an existing Raw object.

Parameters:
value - a Raw Domain object.
Throws:
java.sql.SQLException - never.

Raw

public Raw(RAW value)
    throws java.sql.SQLException
Creates a Raw Domain object encapsulating an SQL RAW object.

Parameters:
value - a RAW SQL object.
Throws:
java.sql.SQLException - never.

Raw

public Raw(byte[] value)
Internal: Applications should not invoke this constructor.

Creates a Raw Domain object from the given byte array.

Parameters:
value - a value returned by a previous call to getBytes() on an SQL object compatable with Raw.

Raw

public Raw(java.lang.String value)
    throws java.sql.SQLException
Creates a Raw Domain object from a Java String.

Parameters:
value - a textual representation of a Raw object.
Throws:
SQLException - if the representation is invalid.
java.sql.SQLException

Raw

public Raw(java.lang.Object value)
    throws java.sql.SQLException
Creates a Raw Domain object from a Java Object.

The Object must be an instance of byte[], which becomes the body of the Raw object, or an instance of String, which is first converted into a byte array.

Parameters:
value - an arbitrary Object.
Throws:
java.sql.SQLException - if the object is not an instance of byte[] or String.
Method Detail

getORADataFactory

public static ORADataFactory getORADataFactory()
Internal: Applications should not invoke this method.

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

Returns:
the ORADataFactory for the Raw Domain.

toDatum

public Datum toDatum(java.sql.Connection conn)
              throws java.sql.SQLException
Internal: Applications should not invoke this method.

Converts this Raw Domain object back into an SQL RAW object.

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

getNativeObject

public java.lang.Object getNativeObject()
Specified by:
getNativeObject in interface NativeTypeDomainInterface

getValue

public byte[] getValue()
Return a byte[] object with this domain's value. This method may be used to access the value for this domain in EL-expressions.

javabean.property

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 internal byte array of this as a JBDC object.

setContext

public void setContext(DomainOwnerInterface owner,
                       Transaction trans,
                       java.lang.Object ctx)
Internal: Applications should not invoke this method.

Specified by:
setContext in interface DomainInterface

toString

public java.lang.String toString()
For testing purposes only: converts this to a character string.

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Tests this for equality with another object.

The argument is converted to a Raw object, if necessary.

Overrides:
equals in class Datum
Parameters:
other - an arbitrary Object.
Returns:
true if conversion was successful and the converted argument is identical to this.

hashCode

public int hashCode()
Computes a hash code for this.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of this.

getXMLDomainFactory

public static XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)
Internal: Applications should not use this method.


readBytesFromXML

public static byte[] readBytesFromXML(Node node)

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

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