LumiSoft.Data
Class DataSet

java.lang.Object
  extended by LumiSoft.Data.DataSet

public class DataSet
extends java.lang.Object

Represents an in-memory cache of data.


Constructor Summary
DataSet()
          Default constructor.
DataSet(java.lang.String name)
          Creates new dataset with specified name.
 
Method Summary
 void Clear()
          Clears the DataSet of any data by removing all rows in all tables.
 void Clone()
          Copies the structure of the DataSet.
 void Copy()
          Copies both the structure and data for this DataSet.
 java.lang.String getDataSetName()
          Gets the name of the current DataSet.
 DataRelationCollection getRelations()
          Get the collection of relations that link tables and allow navigation from parent tables to child tables.
 DataTableCollection getTables()
          Gets the collection of tables contained in the DataSet.
 void Merge(DataTable table)
          Merges a specified DataTable and its schema into the current DataSet.
 void ReadXml(java.io.InputStream stream)
          Reads xml from specified stream.
 void ReadXml(java.lang.String fileName)
          Reads xml from specified file.
 void setDataSetName(java.lang.String value)
          Sets the name of the current DataSet.
 void WriteXml(java.io.OutputStream stream)
          Writes DataSet data to specified stream.
 void WriteXml(java.io.OutputStream stream, boolean writeSchema)
          Writes DataSet data to specified stream.
 void WriteXml(java.lang.String fileName)
          Writes the current data for the DataSet to the specified file.
 void WriteXml(java.lang.String fileName, boolean writeSchema)
          Writes the current data for the DataSet to the specified file.
 void WriteXmlSchema(java.io.OutputStream stream)
          Writes Xml schema to specified stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSet

public DataSet()
Default constructor.


DataSet

public DataSet(java.lang.String name)
Creates new dataset with specified name.

Parameters:
name - DataSet name.
Method Detail

ReadXml

public void ReadXml(java.lang.String fileName)
             throws java.lang.Exception
Reads xml from specified file.

Parameters:
fileName - File name from where to read DataSet.
Throws:
java.lang.Exception

ReadXml

public void ReadXml(java.io.InputStream stream)
Reads xml from specified stream.

Parameters:
stream - Stream from where to read DataSet.

WriteXml

public void WriteXml(java.lang.String fileName)
              throws java.lang.Exception
Writes the current data for the DataSet to the specified file.

Parameters:
fileName - The file name (including the path) to which to write.
Throws:
java.lang.Exception

WriteXml

public void WriteXml(java.lang.String fileName,
                     boolean writeSchema)
              throws java.lang.Exception
Writes the current data for the DataSet to the specified file.

Parameters:
fileName - The file name (including the path) to which to write.
writeSchema -
Throws:
java.lang.Exception

WriteXml

public void WriteXml(java.io.OutputStream stream)
              throws java.lang.Exception
Writes DataSet data to specified stream.

Parameters:
stream - Stream where to write data.
Throws:
java.lang.Exception

WriteXml

public void WriteXml(java.io.OutputStream stream,
                     boolean writeSchema)
              throws java.lang.Exception
Writes DataSet data to specified stream.

Parameters:
stream - Stream where to write data.
writeSchema - Specifies if schema must be written.
Throws:
java.lang.Exception

WriteXmlSchema

public void WriteXmlSchema(java.io.OutputStream stream)
                    throws java.lang.Exception
Writes Xml schema to specified stream.

Parameters:
stream -
Throws:
java.lang.Exception

Clear

public void Clear()
Clears the DataSet of any data by removing all rows in all tables.


Clone

public void Clone()
Copies the structure of the DataSet. Does not copy any data.


Copy

public void Copy()
Copies both the structure and data for this DataSet.


Merge

public void Merge(DataTable table)
Merges a specified DataTable and its schema into the current DataSet.

Parameters:
table -

getDataSetName

public java.lang.String getDataSetName()
Gets the name of the current DataSet.


setDataSetName

public void setDataSetName(java.lang.String value)
Sets the name of the current DataSet.

Parameters:
value -

getTables

public DataTableCollection getTables()
Gets the collection of tables contained in the DataSet.

Returns:

getRelations

public DataRelationCollection getRelations()
Get the collection of relations that link tables and allow navigation from parent tables to child tables.

Returns: