|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.essbase.eas.framework.defs.transfer.RAFTransferObject
public class RAFTransferObject
Title: Description: Copyright: Copyright (c) 2001 Company: Hyperion Solutions Corporation
Field Summary | |
---|---|
protected java.util.ArrayList |
data contains the objects to be transported or that have been parsed after transport |
protected java.util.List |
messages contains the set of messages that were parsed after transport |
protected com.essbase.eas.framework.defs.command.CommandStatus |
status contains the command status object |
protected java.util.Hashtable |
substitutions contains a hashtable of possible substitution classes for importing. |
Constructor Summary | |
---|---|
RAFTransferObject() |
|
RAFTransferObject(java.util.Hashtable substitutions) Creates a RAFTransferObject and initializes the table of substitutions classes to use for certain classes. |
Method Summary | |
---|---|
void |
add(java.util.Collection coll) adds a collection of objects to the set of objects this instance will export |
void |
add(java.lang.Object obj) adds an object to the set of objects this instance will export. |
void |
addAll(java.lang.Object[] objects) adds an array of objects to the set of objects this instance will export. |
void |
addMessage(java.lang.Object value) adds a message to the set of messages for this instance. |
void |
addMessages(java.util.Collection values) adds a collection of messages to the set of messages for this instance. |
protected java.lang.Class |
classForName(java.lang.String className) |
void |
clearData() clears the internal data. |
static RAFTransferObject |
createInstance(java.lang.Class c, java.io.File docFile) |
static RAFTransferObject |
createInstance(java.lang.Class c, java.lang.String xml) |
static RAFTransferObject |
createInstance(java.io.File docFile) creates an instance of an RAFTransferObject and imports an XML string into the internal data structures. |
void |
dispose() This is called when you nolonger need this class |
void |
exportData(java.io.RandomAccessFile raf) |
protected void |
exportNonStandardData(java.io.RandomAccessFile raf) |
java.io.ByteArrayOutputStream |
exportXml() |
java.lang.String |
exportXmlAsString() |
java.io.File |
generateXmlDocument() |
com.essbase.eas.framework.defs.command.CommandStatus |
getCommandStatus() returns the object considered to be the "command status". |
java.lang.Object[] |
getData() retrieves the set of data that this object represents. |
java.lang.Object[] |
getDataForClass(java.lang.Class c) retrieves the set of data by class type. |
XMLTransferMessage |
getMessage() This method will always return the first XMLTransferMessage |
java.util.Collection |
getMessages() |
java.lang.Object[] |
getMessages(java.lang.Class c) |
static java.lang.Object |
getObjectFromXML(java.io.File file, java.lang.Class c) |
protected void |
importCollectionNode(java.lang.Class c, java.lang.Object owner, java.io.RandomAccessFile raf) imports a collection for an element. |
void |
importData(java.io.RandomAccessFile raf) |
protected void |
importNonStandardData(java.io.RandomAccessFile raf) |
void |
importXml(java.io.File file) |
void |
setCommandStatus(com.essbase.eas.framework.defs.command.CommandStatus value) sets the command status for this transfer object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList data
protected java.util.List messages
protected com.essbase.eas.framework.defs.command.CommandStatus status
protected java.util.Hashtable substitutions
Constructor Detail |
---|
public RAFTransferObject()
public RAFTransferObject(java.util.Hashtable substitutions)
substitutions
- the table of classes used for initializationMethod Detail |
---|
public static RAFTransferObject createInstance(java.io.File docFile)
RAFTransferObject
and imports an XML string into the internal data structures.xmlDoc
- the text to be importedpublic static RAFTransferObject createInstance(java.lang.Class c, java.lang.String xml)
public static RAFTransferObject createInstance(java.lang.Class c, java.io.File docFile)
protected void importNonStandardData(java.io.RandomAccessFile raf) throws java.lang.Exception
java.lang.Exception
protected java.lang.Class classForName(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected void importCollectionNode(java.lang.Class c, java.lang.Object owner, java.io.RandomAccessFile raf) throws java.lang.Exception
c
- class of the owning object.owner
- the owner of the property.e
- the collection that needs to be imported.java.lang.Exception
public final void add(java.lang.Object obj)
obj
- the object to eventually export for transport.public final void addAll(java.lang.Object[] objects)
objects
- the array of objects to add.public final void add(java.util.Collection coll)
coll
- the collection of objects to add.public final void addMessage(java.lang.Object value)
value
- a message objectpublic final void addMessages(java.util.Collection values)
values
- a collection of message objects.public final void setCommandStatus(com.essbase.eas.framework.defs.command.CommandStatus value)
value
- the CommandStatus
to be set for this objectpublic void clearData()
public final com.essbase.eas.framework.defs.command.CommandStatus getCommandStatus()
RAFTransferObject
class; however, since on of the primary uses is to move data between the client and mid-tier via command requests, this is a helper routine. Semantically, we would like to force a convention that every command contain exactly one instance of a command status object when it returns from the mid-tier. In versions of EAS numbered 6.5.3 and before we cannot do that; however, beginning with version 7.0 we will enforce this rule.public final XMLTransferMessage getMessage()
XMLTransferMessage
XMLTransferMessage
object.public final java.util.Collection getMessages()
public final java.lang.Object[] getMessages(java.lang.Class c)
c
- the Class
name for tpublic final java.lang.Object[] getData()
public final java.lang.Object[] getDataForClass(java.lang.Class c)
MyData[] results = (MyData[]) gxo.getDataForClass(MyData.class)
for (int i = 0; i < results.length; ++i)
doSomething ...
c
- a class that represents the data we want.public final void importXml(java.io.File file) throws java.lang.Exception
java.lang.Exception
public final void importData(java.io.RandomAccessFile raf) throws java.lang.Exception
java.lang.Exception
public final java.io.File generateXmlDocument() throws java.lang.Exception
java.lang.Exception
public final void exportData(java.io.RandomAccessFile raf) throws java.lang.Exception
java.lang.Exception
protected void exportNonStandardData(java.io.RandomAccessFile raf) throws java.lang.Exception
java.lang.Exception
public void dispose()
public static java.lang.Object getObjectFromXML(java.io.File file, java.lang.Class c)
public final java.io.ByteArrayOutputStream exportXml() throws java.lang.Exception
java.lang.Exception
public final java.lang.String exportXmlAsString() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |