public class ProDataGraph
extends java.lang.Object
implements commonj.sdo.DataGraph, org.eclipse.emf.common.notify.Adapter, java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
DATASET_TYPE_NAME |
Constructor and Description |
---|
ProDataGraph()
Default constructor
|
ProDataGraph(commonj.sdo.DataGraph dg,
java.lang.String dgName,
ProDataRelationMetaData[] dataRelList)
Converts the specified DataGraph object into a ProDataGraph object.
|
ProDataGraph(ProDataGraph dg)
Creates a copy of the specified ProDataGraph object, without the data
|
ProDataGraph(ProDataGraphMetaData metadata)
Creates a ProDataGraph object based on the specified metadata.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptChanges()
Clears out the change list in the ProChangeSummary.
|
void |
addProDataObject(int index,
ProDataObject dataObj)
Adds ProDataObject instance at specified index in its ProDataObject
collection within ProDataGraph.
|
void |
addProDataObject(ProDataObject dataObj)
Adds ProDataObject instance to end of its ProDataObject collection within
ProDataGraph.
|
ProDataObject |
createProDataObject(java.lang.String tableName)
Returns a new ProDataObject
|
commonj.sdo.DataObject |
createRootObject(java.lang.String namespaceURI,
java.lang.String typeName) |
commonj.sdo.DataObject |
createRootObject(commonj.sdo.Type type) |
commonj.sdo.ChangeSummary |
getChangeSummary() |
commonj.sdo.DataGraph |
getDataGraph() |
org.eclipse.emf.ecore.resource.Resource |
getDataGraphResource() |
ProDataGraphMetaData |
getMetaData() |
int |
getNumTables() |
ProChangeSummary |
getProChangeSummary() |
java.lang.String |
getProDataGraphName() |
java.util.List<ProDataObject> |
getProDataObjects(int tableIdx)
Get the list of rows in a table
|
java.util.List<ProDataObject> |
getProDataObjects(java.lang.String tableName)
Get the list of rows in a table
|
org.eclipse.emf.ecore.resource.ResourceSet |
getResourceSet() |
commonj.sdo.DataObject |
getRootObject() |
int |
getTableIndex(java.lang.String tableName) |
java.lang.String[] |
getTableNames() |
org.eclipse.emf.common.notify.Notifier |
getTarget() |
commonj.sdo.Type |
getType(java.lang.String namespaceURI,
java.lang.String typeName) |
boolean |
hasError() |
boolean |
isAdapterForType(java.lang.Object type) |
void |
notifyChanged(org.eclipse.emf.common.notify.Notification message) |
void |
readExternal(java.io.ObjectInput in)
Deserialize a ProDataGraph
|
void |
readFromStream(java.io.InputStream stream)
Populate a datagraph from a stream This method is used by BPM
|
void |
readXML(java.lang.String fileName)
readXML() copies data from file into a temp file.
|
void |
readXMLUnsafe(java.lang.String fileName)
readXMLUnsafe() copies data from file into a temp file.
|
void |
setChildTableReferences()
Use this to build ProDataGraph object with data relations.
|
void |
setChildTableReferences(int parentIx)
Use this to build ProDataGraph object with data relations.
|
void |
setChildTableReferences(java.lang.String tableName)
Use this to build ProDataGraph object with data relations.
|
void |
setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet newResourceSet) |
void |
setTarget(org.eclipse.emf.common.notify.Notifier target) |
void |
writeExternal(java.io.ObjectOutput out)
Serialize a ProDataGraph
|
void |
writeToStream(java.io.OutputStream stream)
Write a representation of the dataset to a stream This method is used by BPM
|
void |
writeXML(java.lang.String fileName)
Serialize a ProDataGraph in XML
|
void |
writeXML(java.lang.StringBuilder builder)
Serialize a ProDataGraph into XML and sends output to StringBuilder.
|
protected final transient java.lang.String DATASET_TYPE_NAME
public ProDataGraph()
public ProDataGraph(ProDataGraphMetaData metadata) throws ProDataException
metadata
- metadata used to create ProDataGraphProDataException
public ProDataGraph(commonj.sdo.DataGraph dg, java.lang.String dgName, ProDataRelationMetaData[] dataRelList) throws java.lang.Exception, ProDataException, Open4GLException
dg
- Input DataGraph objectdgName
- Name for newly created ProDataGraphdataRelList
- List of parent-child relationshipsjava.lang.Exception
ProDataException
Open4GLException
public ProDataGraph(ProDataGraph dg) throws ProDataException, java.lang.Exception, Open4GLException
dg
- ProDataGraph object to copyProDataException
java.lang.Exception
Open4GLException
public ProChangeSummary getProChangeSummary()
public java.lang.String getProDataGraphName()
public int getNumTables()
public ProDataGraphMetaData getMetaData()
public void acceptChanges()
public boolean hasError()
public ProDataObject createProDataObject(java.lang.String tableName) throws Open4GLException
tableName
- Specified table within the ProDataGraphOpen4GLException
public void addProDataObject(ProDataObject dataObj) throws Open4GLException
dataObj
- ProDataObject to addOpen4GLException
public void addProDataObject(int index, ProDataObject dataObj) throws Open4GLException
index
- 0-based locationdataObj
- ProDataObject to addOpen4GLException
public java.util.List<ProDataObject> getProDataObjects(int tableIdx) throws java.lang.Exception
tableIdx
- 0-based table index within ProDataGraphjava.lang.Exception
public java.util.List<ProDataObject> getProDataObjects(java.lang.String tableName) throws java.lang.Exception, Open4GLException
tableName
- java.lang.Exception
Open4GLException
public int getTableIndex(java.lang.String tableName) throws Open4GLException
tableName
- Open4GLException
public java.lang.String[] getTableNames()
public void setChildTableReferences() throws java.lang.Exception
java.lang.Exception
public void setChildTableReferences(java.lang.String tableName) throws Open4GLException, java.lang.Exception
tableName
- the parent's table nameOpen4GLException
java.lang.Exception
public void setChildTableReferences(int parentIx) throws Open4GLException, java.lang.Exception
parentIx
- 0-based parent table indexOpen4GLException
java.lang.Exception
public commonj.sdo.DataGraph getDataGraph()
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
public void setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet newResourceSet)
newResourceSet
- public org.eclipse.emf.ecore.resource.Resource getDataGraphResource()
public org.eclipse.emf.common.notify.Notifier getTarget()
getTarget
in interface org.eclipse.emf.common.notify.Adapter
public boolean isAdapterForType(java.lang.Object type)
isAdapterForType
in interface org.eclipse.emf.common.notify.Adapter
public void notifyChanged(org.eclipse.emf.common.notify.Notification message)
notifyChanged
in interface org.eclipse.emf.common.notify.Adapter
public void setTarget(org.eclipse.emf.common.notify.Notifier target)
setTarget
in interface org.eclipse.emf.common.notify.Adapter
public commonj.sdo.DataObject createRootObject(commonj.sdo.Type type)
createRootObject
in interface commonj.sdo.DataGraph
public commonj.sdo.DataObject createRootObject(java.lang.String namespaceURI, java.lang.String typeName)
createRootObject
in interface commonj.sdo.DataGraph
public commonj.sdo.ChangeSummary getChangeSummary()
getChangeSummary
in interface commonj.sdo.DataGraph
public commonj.sdo.Type getType(java.lang.String namespaceURI, java.lang.String typeName)
getType
in interface commonj.sdo.DataGraph
public commonj.sdo.DataObject getRootObject()
getRootObject
in interface commonj.sdo.DataGraph
public void writeXML(java.lang.String fileName) throws ProDataException, java.io.IOException
fileName
- java.io.IOException
- Writes the ProDataGraph's data into a temp file. Then
creates the file specified by fileName and merges into it
the contents of the temp file along with the schemaProDataException
public void writeXML(java.lang.StringBuilder builder) throws ProDataException, java.io.IOException
ProDataException
java.io.IOException
public void readXMLUnsafe(java.lang.String fileName) throws java.io.FileNotFoundException, ProDataException, java.io.IOException
java.io.FileNotFoundException
ProDataException
java.io.IOException
public void readXML(java.lang.String fileName) throws java.io.FileNotFoundException, ProDataException, java.io.IOException
java.io.FileNotFoundException
ProDataException
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
readExternal
in interface java.io.Externalizable
in
- java.io.IOException
public void readFromStream(java.io.InputStream stream) throws java.io.IOException
stream
- java.io.IOException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- java.io.IOException
public void writeToStream(java.io.OutputStream stream) throws java.io.IOException
stream
- java.io.IOException