|
Business Components | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
oracle.jbo.domain.Array
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.
Field Summary |
Type | Field |
---|---|
protected int |
mOwnerAttrIndex
Index of the attribute in the domain owner's container. |
Constructor Summary |
Type | Constructor |
---|---|
protected |
Array()
Constructs an instance of this class. |
|
Array(ArrayDescriptor descriptor,
java.sql.Connection conn,
byte[] bytes)
Internal: Applications should not use this constructor. |
|
Array(ArrayDescriptor type,
java.sql.Connection conn,
java.lang.Object elements)
Internal: Applications should not use this constructor. |
|
Array(Datum d)
Internal: Applications should not use this constructor. |
|
Array(java.lang.Object[] elements)
|
Method Summary |
Type | Method |
---|---|
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 CustomDatumFactory |
getCustomDatumFactory()
Internal: Applications should not use this method. |
java.lang.Object |
getData()
Internal: Applications should not use this method. |
java.lang.Class |
getElemType()
|
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()
|
oracle.jbo.domain.DomainOwnerInterface |
getOwner()
|
int |
getOwnerAttributeIndex()
|
java.lang.String |
getRemoteIdString()
|
long |
getSize()
|
Node |
getXMLContentNode(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. |
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(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)
|
Datum |
toDatum(OracleConnection conn)
Internal: Applications should not use this method. |
Field Detail |
protected int mOwnerAttrIndex
Constructor Detail |
protected Array() throws java.sql.SQLException
public Array(java.lang.Object[] elements)
public Array(ArrayDescriptor type, java.sql.Connection conn, java.lang.Object elements) throws java.sql.SQLException
public Array(ArrayDescriptor descriptor, java.sql.Connection conn, byte[] bytes) throws java.sql.SQLException
public Array(Datum d) throws java.sql.SQLException
Method Detail |
public static CustomDatumFactory getCustomDatumFactory()
public Datum toDatum(OracleConnection conn) throws java.sql.SQLException
public java.lang.Object getData()
public void domainToBeModified(oracle.jbo.domain.DomainInterface d)
d
- the domain being modified.public void setContext(oracle.jbo.domain.DomainOwnerInterface owner, oracle.jbo.Transaction trans, java.lang.Object ctx)
public java.lang.String getRemoteIdString()
public java.lang.Object[] getArray()
public java.lang.Object[] getInternalArray()
public java.lang.Class getElemType()
public boolean equals(java.lang.Object obj)
this
for equality with another object.obj
- an arbitrary Object
.true
if conversion was successful and the converted
argument is identical to this
.protected java.lang.String getXMLElementTag()
protected java.lang.String getElemXMLElementTag()
protected boolean isElemXMLCData()
public Node getXMLContentNode(Document xmlDoc)
xmlDoc
- the XML document in which the node is to be created.protected void readAttrsFromXML(Element rowElt)
rowElt
- the XML element from which the attribute values should be read.public java.lang.String printXMLDefinition(java.util.Hashtable allDefs, java.io.PrintWriter pw, boolean bContainees)
The allDefs hashtable contains predefined XML definitions and is passed by whatever calls this method.
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.public static oracle.jbo.domain.XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)
public void loadFromDatabase(oracle.jbo.Transaction transaction) throws java.lang.Exception
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.
transaction
- the oracle.jbo.server.DBTransactionImpl
of the current Application Module.public void saveToDatabase(oracle.jbo.Transaction transaction) throws java.lang.Exception
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.
transaction
- the oracle.jbo.server.DBTransactionImpl
instance of the current Application Module.public void saveToDatabase(oracle.jbo.Transaction transaction, java.lang.Object postedSQLObject) throws java.lang.Exception
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.
public void prepareForDML(java.lang.Object context)
public void syncClientLob(oracle.jbo.domain.LobInterface old)
public void syncServerLob(oracle.jbo.domain.LobInterface oldObj)
public oracle.jbo.domain.DomainOwnerInterface getOwner()
public int getOwnerAttributeIndex()
public long getSize()
|
Business Components | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |