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

## oracle.jbo.domain
Class Array

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

All Implemented Interfaces:
  oracle.jbo.domain.BlobDomainInterface, oracle.sql.CustomDatum, oracle.jbo.domain.DomainInterface, oracle.jbo.domain.DomainOwnerInterface, oracle.jbo.domain.LobInterface, oracle.jbo.domain.MarshalledDomain, oracle.jbo.domain.MutableDomainInterface, oracle.jdbc.internal.ObjectData, java.io.Serializable, oracle.jbo.domain.XMLDomainInterface

public class Array
extends java.lang.Object
implements oracle.jbo.domain.LobInterface, oracle.jbo.domain.DomainOwnerInterface, oracle.jbo.domain.XMLDomainInterface, oracle.sql.CustomDatum, java.io.Serializable, oracle.jbo.domain.MarshalledDomain

This class provides a lightweight wrapper for `oracle.sql.ARRAY`, the Java representation of the ARRAY database type. This wrapper allows an instance of the `oracle.sql.ARRAY` to be used as an immutable Domain object. This class also provides a wrapper for the data that comes from nested tables and nested arrays.

Since:
  JDeveloper 3.0
See Also:
  Serialized Form

Field Summary
`protected int` | `mOwnerAttrIndex` Index of the attribute in the domain owner's container.

Constructor Summary
`protected` | `Array()` Constructs an instance of this class.
`` | `Array(oracle.sql.ArrayDescriptor descriptor, java.sql.Connection conn, byte[] bytes)` Internal: Applications should not use this constructor.
`` | `Array(oracle.sql.ArrayDescriptor type, java.sql.Connection conn, java.lang.Object elements)` Internal: Applications should not use this constructor.
`` | `Array(oracle.sql.Datum d)` Internal: Applications should not use this constructor.
`` | `Array(java.util.List list)` This constructor does not verify that this array's length w.r.t the corresponding database/source description.
`` | `Array(java.lang.Object[] elements)` This constructor does not verify that this array's length w.r.t the corresponding database/source description.

Method Summary
`void` | `domainToBeModified(oracle.jbo.domain.DomainInterface d)` Notification method that this domain calls whenever any of its attribute values are about to be modified.
`boolean` | `equals(java.lang.Object obj)` Tests `this` for equality with another object.
`java.lang.Object[]` | `getArray()` Returns the elements of this array into an Object array.
`static oracle.sql.CustomDatumFactory` | `getCustomDatumFactory()` Internal: Applications should not use this method.
`java.lang.Object` | `getData()` Internal: Applications should not use this method.
`java.lang.Class` | `getElemType()` Contents of this array should be of this type.
`protected java.lang.String` | `getElemXMLElementTag()` Returns the classname of this domain, appended with the name of the attribute as XML-element tag for this domain-attribute.
`java.lang.Object[]` | `getInternalArray()`
`java.util.List` | `getList()` Returns the elements of this array in a List object.
`oracle.jbo.domain.DomainOwnerInterface` | `getOwner()`
`int` | `getOwnerAttributeIndex()`
`java.lang.String` | `getRemoteIdString()`
`long` | `getSize()`
`org.w3c.dom.Node` | `getXMLContentNode(org.w3c.dom.Document xmlDoc)` Creates the XML node in the given xml document for this domain's data.
`static oracle.jbo.domain.XMLDomainFactory` | `getXMLDomainFactory(java.lang.Class attrClass)`
`protected java.lang.String` | `getXMLElementTag()` Returns this class name as XML-element tag for this Array domain object.
`protected boolean` | `isElemXMLCData()` Returns false always.
`void` | `loadFromDatabase(oracle.jbo.Transaction transaction)` Internal: Applications should not use this method.
`oracle.svcmsg.ResponseValues` | `marshal()`
`void` | `prepareForDML(java.lang.Object context)`
`java.lang.String` | `printXMLDefinition(java.util.Hashtable allDefs, java.io.PrintWriter pw, boolean bContainees)` Prints the DTD info for this domain in the given print writer.
`protected void` | `readAttrsFromXML(org.w3c.dom.Element rowElt)` Reads all the attribute values from the XML-element and sets them into this row.
`void` | `saveToDatabase(oracle.jbo.Transaction transaction)` Internal: Applications should not use this method.
`void` | `saveToDatabase(oracle.jbo.Transaction transaction, java.lang.Object postedSQLObject)` Internal: Applications should not use this method.
`void` | `setContext(oracle.jbo.domain.DomainOwnerInterface owner, oracle.jbo.Transaction trans, java.lang.Object ctx)` Internal: Applications should not use this method.
`void` | `syncClientLob(oracle.jbo.domain.LobInterface old)`
`void` | `syncServerLob(oracle.jbo.domain.LobInterface oldObj)`
`oracle.sql.Datum` | `toDatum(oracle.jdbc.driver.OracleConnection conn)` Internal: Applications should not use this method.
`void` | `useElementType(java.lang.Class claz)` If this array's element Type is not already set, use the given class as the element Type for this array.

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

Field Detail

### mOwnerAttrIndex

    protected int mOwnerAttrIndex

  Index of the attribute in the domain owner's container.

Constructor Detail

### Array

    protected Array()
             throws java.sql.SQLException

  Constructs an instance of this class.

### Array

    public Array(java.lang.Object[] elements)

  This constructor does not verify that this array's length w.r.t the corresponding database/source description. Length validation is performed when this array is set into a Bc4J row as an attribute.

### Array

    public Array(java.util.List list)

  This constructor does not verify that this array's length w.r.t the corresponding database/source description. Length validation is performed when this array is set into a Bc4J row as an attribute.

### Array

    public Array(oracle.sql.ArrayDescriptor type,
                 java.sql.Connection conn,
                 java.lang.Object elements)
          throws java.sql.SQLException

  Internal: Applications should not use this constructor.

### Array

    public Array(oracle.sql.ArrayDescriptor descriptor,
                 java.sql.Connection conn,
                 byte[] bytes)
          throws java.sql.SQLException

  Internal: Applications should not use this constructor.

### Array

    public Array(oracle.sql.Datum d)
          throws java.sql.SQLException

  Internal: Applications should not use this constructor.

Method Detail

### getCustomDatumFactory

    public static oracle.sql.CustomDatumFactory getCustomDatumFactory()

  Internal: Applications should not use this method.

### useElementType

    public void useElementType(java.lang.Class claz)

  If this array's element Type is not already set, use the given class as the element Type for this array.

### toDatum

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

  Internal: Applications should not use this method.
  Specified by:
    `toDatum` in interface `oracle.sql.CustomDatum`
  Throws:
    `java.sql.SQLException`

### getData

    public java.lang.Object getData()

  Internal: Applications should not use this method.
  Specified by:
    `getData` in interface `oracle.jbo.domain.DomainInterface`

### domainToBeModified

    public void domainToBeModified(oracle.jbo.domain.DomainInterface d)

  Notification method that this domain calls whenever any of its attribute values are about to be modified. This Domain should always notify its owner.
  Specified by:
    `domainToBeModified` in interface `oracle.jbo.domain.DomainOwnerInterface`
  Parameters:
    `d` - the domain being modified.

### setContext

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

  Internal: Applications should not use this method.
  Specified by:
    `setContext` in interface `oracle.jbo.domain.DomainInterface`

### getRemoteIdString

    public java.lang.String getRemoteIdString()

  Specified by:
    `getRemoteIdString` in interface `oracle.jbo.domain.LobInterface`

### getArray

    public java.lang.Object[] getArray()

  Returns the elements of this array into an Object array. The elements are converted to the Java types corresponding to the SQL type of the data in the original array.
  Returns:
    an Object array that contains the array elements.

### getList

    public java.util.List getList()

  Returns the elements of this array in a List object. The elements are converted to the Java types corresponding to the SQL type of the data in the original array.
  Returns:
    a List that contains the array elements.

### getInternalArray

    public java.lang.Object[] getInternalArray()

### getElemType

    public java.lang.Class getElemType()

  Contents of this array should be of this type.

### equals

    public boolean equals(java.lang.Object obj)

  Tests `this` for equality with another object.
  Parameters:
    `obj` - an arbitrary `Object`.
  Returns:
    `true` if conversion was successful and the converted argument is identical to `this`.

### getXMLElementTag

    protected java.lang.String getXMLElementTag()

  Returns this class name as XML-element tag for this Array domain object. Override this method to return a custom XML-element tag for this domain.

### getElemXMLElementTag

    protected java.lang.String getElemXMLElementTag()

  Returns the classname of this domain, appended with the name of the attribute as XML-element tag for this domain-attribute. Override this method to return a custom XML-element tag for the given attribute.

### isElemXMLCData

    protected boolean isElemXMLCData()

  Returns false always. Override to determine whether the given domain-attribute is to be rendered in CDATA format in xml.

### getXMLContentNode

    public org.w3c.dom.Node getXMLContentNode(org.w3c.dom.Document xmlDoc)

  Creates the XML node in the given xml document for this domain's data.
  Specified by:
    `getXMLContentNode` in interface `oracle.jbo.domain.XMLDomainInterface`
  Parameters:
    `xmlDoc` - the XML document in which the node is to be created.

### readAttrsFromXML

    protected void readAttrsFromXML(org.w3c.dom.Element rowElt)

  Reads all the attribute values from the XML-element and sets them into this row. If the XML has a process instruction of the form: <?bc4j remove?> then, invokes `remove()` on this row.
  Parameters:
    `rowElt` - the XML element from which the attribute values should be read.

### printXMLDefinition

    public java.lang.String printXMLDefinition(java.util.Hashtable allDefs,
                                               java.io.PrintWriter pw,
                                               boolean bContainees)

  Prints the DTD info for this domain in the given print writer. Returns the DTD string to be added to this domain's container entity/domain.

  The `allDefs` hashtable contains predefined XML definitions and is passed by whatever calls this method.

  Specified by:
    `printXMLDefinition` in interface `oracle.jbo.domain.XMLDomainInterface`
  Parameters:
    `allDefs` - a hashtable of predefined XML definitions passed from whatever calls this method.
    `pw` - print writer into which the defnition is being printed.
    `bContainees` - if `true`, prints definitions of contained objects.

### getXMLDomainFactory

    public static oracle.jbo.domain.XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)

### loadFromDatabase

    public void loadFromDatabase(oracle.jbo.Transaction transaction)
                          throws java.lang.Exception

  Internal: Applications should not use this method.

  Loads the actual data of the LOB-type database attribute into memory.

  The transaction argument is needed to perform an additional query into the database to extract the data.

  This method does not need to be invoked for a new attribute.

  Specified by:
    `loadFromDatabase` in interface `oracle.jbo.domain.BlobDomainInterface`
  Parameters:
    `transaction` - the `oracle.jbo.server.DBTransactionImpl` of the current Application Module.
  Throws:
    `java.lang.Exception`

### saveToDatabase

    public void saveToDatabase(oracle.jbo.Transaction transaction)
                        throws java.lang.Exception

  Internal: Applications should not use this method.

  Saves data in memory to a database LOB-type attribute.

  The transaction argument is is needed to perform an additional query into the database to write the data.

  This method does not need to be invoked if this attribute's data has not changed.

  Specified by:
    `saveToDatabase` in interface `oracle.jbo.domain.BlobDomainInterface`
  Parameters:
    `transaction` - the `oracle.jbo.server.DBTransactionImpl` instance of the current Application Module.
  Throws:
    `java.lang.Exception`

### saveToDatabase

    public void saveToDatabase(oracle.jbo.Transaction transaction,
                               java.lang.Object postedSQLObject)
                        throws java.lang.Exception

  Internal: Applications should not use this method.

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

  Specified by:
    `saveToDatabase` in interface `oracle.jbo.domain.BlobDomainInterface`
  Throws:
    `java.lang.Exception`

### prepareForDML

    public void prepareForDML(java.lang.Object context)

  Specified by:
    `prepareForDML` in interface `oracle.jbo.domain.BlobDomainInterface`

### syncClientLob

    public void syncClientLob(oracle.jbo.domain.LobInterface old)

  Specified by:
    `syncClientLob` in interface `oracle.jbo.domain.LobInterface`

### syncServerLob

    public void syncServerLob(oracle.jbo.domain.LobInterface oldObj)

  Specified by:
    `syncServerLob` in interface `oracle.jbo.domain.LobInterface`

### getOwner

    public oracle.jbo.domain.DomainOwnerInterface getOwner()

  Specified by:
    `getOwner` in interface `oracle.jbo.domain.LobInterface`

### getOwnerAttributeIndex

    public int getOwnerAttributeIndex()

  Specified by:
    `getOwnerAttributeIndex` in interface `oracle.jbo.domain.LobInterface`

### getSize

    public long getSize()

  Specified by:
    `getSize` in interface `oracle.jbo.domain.LobInterface`

### marshal

    public oracle.svcmsg.ResponseValues marshal()

  Specified by:
    `marshal` in interface `oracle.jbo.domain.MarshalledDomain`

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

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