Table of Contents

Class DataSetProjector

Namespace
ArcanaDevelopment.adTempus.Client
Assembly
ArcanaDevelopment.adTempus.Client.dll

Projects adTempus API objects onto DataSets for use in reporting or other contexts.

[ComVisible(true)]
[Guid("d7e6ee52-6698-493d-a573-a08ce32ee9ca")]
public class DataSetProjector
Inheritance
object
DataSetProjector

Remarks

The DataSetProjector is used to populate a DataSet with the data from a collection of adTempus objects. The DataSetProjector creates all the DataTables necessary to represent the objects, including relations between tables.

Use ProjectObjectsToNewDataSet to create the DataSet and DataTables and write the object data to the DataSet. Use ProjectObjectsToExistingDataSet to write the data to a DataSet that already has its schema set (e.g., by loading it from XML).

Use CreateSchema to create a DataSet that contains a schema but no data. The DataSet.WriteXml method can then be used to create an XML representation of the schema for report development or other needs.

Constructors

DataSetProjector()

Creates a new DataSetProjector

public DataSetProjector()

Properties

ExcludeClasses

A list of classes to be excluded.

public List<ClassID> ExcludeClasses { get; }

Property Value

List<ClassID>

Remarks

Any classes listed in ExcludeClasses are excluded from the projection.

See Also

ExcludeRelations

A list of relations to be excluded

public List<string> ExcludeRelations { get; }

Property Value

List<string>

Remarks

Some relations are excluded by default:

JobGroup.Groups JobGroup.Jobs JobQueue.Jobs

If you wish to include these relations, you must remove them from ExcludeRelations.

See Also

IncludeClasses

A list of classes to be included

public List<ClassID> IncludeClasses { get; }

Property Value

List<ClassID>

Remarks

If no IncludeClasses are specified, all classes are included except those excluded by ExcludeClasses.

If any IncludeClasses are specified, only those classes are included.

See Also

IncludeRelations

A list of relations to be included.

public List<string> IncludeRelations { get; }

Property Value

List<string>

Remarks

If no IncludeRelations are specified, all relations are included except those excluded by ExcludeRelations. If any IncludeRelations are specified, only those relations are included.

Each relation is in the form "ClassName.RelationName". To include all relations for a class, use "ClassName.*".

See Also

Methods

CreateSchema(string, ClassID[])

Returns a DataSet containing the DataTables for the specified classes (and related classes) without projecting data onto the tables.

public DataSet CreateSchema(string dataSetName, ClassID[] classIDs)

Parameters

NameTypeDescription
dataSetName string
classIDs ClassID[]

Returns

DataSet

ProjectObjectsToExistingDataSet(DataSet, IEnumerable<ADTObject>)

Projects a collection of objects onto a DataSet.

public void ProjectObjectsToExistingDataSet(DataSet dataSet, IEnumerable<ADTObject> sourceObjects)

Parameters

NameTypeDescription
dataSet DataSet

The DataSet to write the data to. This DataSet must already have the correct DataTables, created by an earlier call to CreateSchema or by loading the schema from XML.

sourceObjects IEnumerable<ADTObject>

The collection of objects to project.

Remarks

ProjectObjects creates a new DataSet with the specified dataSetName. The DataSet is filled with DataTables representing the objects in the sourceObjects collection.

See Also

ProjectObjectsToNewDataSet(string, IEnumerable<ADTObject>)

Projects a collection of objects onto a DataSet.

public DataSet ProjectObjectsToNewDataSet(string dataSetName, IEnumerable<ADTObject> sourceObjects)

Parameters

NameTypeDescription
dataSetName string

The name of the DataSet to create.

sourceObjects IEnumerable<ADTObject>

The collection of objects to project.

Returns

DataSet

A DataSet containing the projected data.

Remarks

ProjectObjects creates a new DataSet with the specified dataSetName. The DataSet is filled with DataTables representing the objects in the sourceObjects collection.

See Also