C# Класс BExIS.Dlm.Services.Data.DatasetManager

Contains methods for accessing and manipulating datasets, dataset versions, data tuples, the values of the tuples' variables, and other associated entities.
Effective use of this class needs solid knowledge of the conceptual model and the versioning method used.Effective use of this class needs solid knowledge of the conceptual model and the versioning method used. There is an automatic and transparent authorization based result set trimming in place, that may reduce the matching entities based on the current user access rights.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddDataView ( Dataset dataset, DataView view ) : void

Adds a data view to the designated dataset. This method does not execute the view, but only associates it with the dataset so that later its application can be requested. A data view is the specification of a set of criteria to filter a dataset vertically and horizontally in on demand. Applying a data view on a dataset version filters its data tuples and variables if the dataset is structured. For unstructured dataset the data view can be used to pass the filtering criteria to a proper processing tool.

CheckInDataset ( System.Int64 datasetId, string comment, string username ) : void

approves the working copy version as a new version and changes the status of the dataset to CheckedIn. The status must be in CheckedOut and the user must be similar to the checkout user.

Does not support simultaneous check-ins

CheckOutDataset ( System.Int64 datasetId, string username ) : bool

Checks out the dataset for the specified user, in order to make it available for editing. dataset must be in CheckedIn state.

CheckOutDataset ( System.Int64 datasetId, string username, System.DateTime timestamp ) : bool

This version of the checlout accpes a timestamp, which is likely a past time. The prpuse is to support dataset migarations by preserving their original sumission date.

The timestamp MUST be greater than the timestamp of the current checked in version, if exist.

CheckOutDatasetIfNot ( System.Int64 datasetId, string username ) : bool

Checks out the dataset for the specified user, if it is not already checked out. dataset must be in CheckedIn state, in order to be checked out.

CreateAmendment ( string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, System.Int64 parameterId, DataTuple tuple ) : Amendment

An amendment is like a variable value that is added to a data tuple. The difference is that the amendment does not need to be defined in the dataset's structure and also not all the data tuples need to have the same amendments. This method creates and amendment object, attaches it to the data tuple but does NOT persist it.

CreateContentDescriptor ( string name, string mimeType, string uri, Int32 orderNo, DatasetVersion datasetVersion ) : ContentDescriptor

Resource descriptors are the way to link resources to data set versions (and some other entity types, too). The resources can be persisted in the local or a remote file system or any other location reachable via a URL. The resource itself can be any type of file, service returning a resource, a normal webpage, and so on. The method creates a resource descriptor, links it to the provided data set version and persists the descriptor.

The method does not have access to the resource itself, and does not persist it.

CreateDataTuple ( int orderNo, ICollection variableValues, ICollection amendments, DatasetVersion datasetVersion ) : DataTuple

Using the provided values creates a data tuple, attaches it to the version and persists it in the database. This method does not affect the status of the dataset version.

CreateEmptyDataset ( Entities dataStructure, ResearchPlan researchPlan, BExIS.Dlm.Entities.MetadataStructure metadataStructure ) : Dataset

Creates an empty dataset that has no data tuple, puts it into the checked-in state, and persists it in the database. At the time of creation a valid data structure, research plan, and metadata structure must be available.

CreateExtendedPropertyValue ( System.Int64 extendedPropertyId, string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, DatasetVersion datasetVersion ) : ExtendedPropertyValue

An extended property is a custom property that is assigned to a dataset version in addition to the predefined properties. Then each dataset version owner/ accessor can provide a value for the attached properties.

CreateParameterValue ( string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, System.Int64 parameterId ) : ParameterValue

Creates a parameter value similar to CreateVariableValue.

CreateVariableValue ( string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, System.Int64 variableId, ICollection parameterValues ) : VariableValue

This method creates a variable value and returns it without persisting the object in the database. Usually the returned variable value should be added to a data tuple which in turn is belonging to a data set version. A value is a compound object holding information about a single event (sampling). The event can be a(n) measurement, observation, estimation, simulation, or computation of a feature of an entity. The value can be a assigned to a variable or a parameter based on the design of the data structure.

DatasetManager ( ) : System
DeleteContentDescriptor ( ContentDescriptor entity ) : bool

Detaches the content descriptor object from its corresponding dataset version, and then deletes the content descriptor.

DeleteContentDescriptor ( IEnumerable entities ) : bool

Detaches a list of content descriptor objects from their, possibly different, corresponding dataset versions, and then deletes the content descriptors.

DeleteDataView ( DataView entity ) : bool

Detaches the data view from its dataset and deletes the view from the database.

DeleteDataset ( System.Int64 datasetId, string username, bool rollbackCheckout ) : bool

Marks the dataset as deleted but does not physically remove it from the database. If the dataset is checked out and the rollbackCheckout is True, the dataset's changes will be roll-backed and then the delete operation takes place, but if the rollbackCheckout is false, The changes will be checked in as a new version and then the deletion operation is executed.

EditDatasetVersion ( DatasetVersion workingCopyDatasetVersion, List createdTuples, ICollection editedTuples, ICollection deletedTuples, ICollection unchangedTuples = null ) : DatasetVersion

Applies the submitted changes to the working copy and persists the changes but does NOT check-in the dataset. The changes are coming in the form of the tuples to be added, deleted, or editedVersion. The general procedure of making changes is CheckOut, Edit (one or more times), CheckIn or Rollback. there is no need to pass metadata, extendedPropertyValues, contentDescriptors .. as they can be assigned to the working copy version before sending it to the method. Just if they are null, they will not affect the version. The general procedure is CheckOut, Edit*, CheckIn or Rollback While the dataset is checked out, all the changes go to the latest+1 version which acts like a working copy

GetDataset ( System.Int64 datasetId ) : Dataset

Retrieves the dataset object having identifier datasetId from the database.

The object based attributes of the entity that are persisted as XML are not populated by default. In order to fully populate the entity, call the Materialize method.

GetDatasetLatestIds ( bool includeCheckouts = false ) : List

Returns the list of identifiers of all the matching datasets. If includeCheckouts is false, just the datasets having the latest version checked-in are included , otherwise the datasets with versions either checked-in or checked-out will be included.

GetDatasetLatestMetadataVersion ( System.Int64 datasetId, bool includeCheckouts = false ) : XmlDocument

Returns the metadata of the latest versions of the dataset .

GetDatasetLatestMetadataVersions ( System.Int64 structureId, bool includeCheckouts = false ) : XmlDocument>.Dictionary

Returns the metadata of the latest versions of all datasets associated to a data structure, alongside with their identifiers including/ excluding the checked out versions.

GetDatasetLatestMetadataVersions ( bool includeCheckouts = false ) : XmlDocument>.Dictionary

Returns the metadata of the latest versions of all datasets, alongside with their identifiers including/ excluding the checked out versions.

GetDatasetLatestVersion ( Dataset dataset ) : DatasetVersion

Returns the latest version of the dataset dataset if the dataset is in checked-in state, otherwise it throws an exception.

GetDatasetLatestVersion ( System.Int64 datasetId ) : DatasetVersion

Returns the latest version of the dataset datasetId if the dataset is in checked-in state, otherwise it throws an exception.

GetDatasetLatestVersions ( System.Int64 structureId, bool includeCheckouts = false ) : DatasetVersion>.Dictionary

Returns a list of the latest versions of all datasets associated to a data structure, including/ excluding the checked out versions.

identifiers are returned to reduce the number of database roundtrips!

GetDatasetLatestVersions ( List datasetIds, bool includeCheckouts = false ) : List

Returns a list of the latest versions of the provided datasetIds including/ excluding the checked out versions.

GetDatasetLatestVersions ( bool includeCheckouts = false ) : List

Returns a list of the latest versions of all datasets including/ excluding the checked out versions.

GetDatasetVersion ( System.Int64 versionId ) : DatasetVersion

Returns the dataset version specified by the version identifier versionId. If the requested version is the latest but the dataset is checked-out an exception is thrown.

GetDatasetVersionEffectiveTupleCount ( DatasetVersion datasetVersion ) : System.Int64

Returns the number of the effective tuples of the dataset version requested. See GetDatasetVersionEffectiveTuples for more details about the effective tuples of a dataset.

GetDatasetVersionEffectiveTupleIds ( DatasetVersion datasetVersion ) : List

Returns a list of identifiers of the effective tuples of the dataset version requested. See GetDatasetVersionEffectiveTuples for more details about the effective tuples of a dataset.

GetDatasetVersionEffectiveTuples ( DatasetVersion datasetVersion ) : List

Each dataset may have more than one versions, each having their own data tuples. The data tuples of the latest version are kept in a separate collection, but the previous versions are scattered among the data tuple and historical tuple collections. The later is the place that acts as the place to keep record of all the previous actions done on the dataset and its their results. This method may be called to get the tuples of the version 2 while the current version is i.e. 10. Based on the status of the requested version, the method may use the tuple collection alone or in combination with the history records to rebuild the version as it was at its check-in time. The versions are stored in the tuple collection in a differential way, so that the version 3 computes the differences to the version 2 and applies the difference only. So retrieving algorithm in this method rebuilds the requested version from its own and previous versions' tuples. If the latest version is requested and the dataset is checked in, the algorithm retrieves all tuples in the tuple collection associated with the current and all previous versions. If the latest version is requested and the dataset is in checked-out state, the method retrieves the working copy tuples.

The returned list may contain normal and historic tuples, if the requested version is not the latest. All the tuples are materialized.

GetDatasetVersionEffectiveTuples ( DatasetVersion datasetVersion, int pageNumber, int pageSize ) : List

Returns one page of the data tuples of the dataset version requested. See GetDatasetVersionEffectiveTuples for more details about the effective tuples of a dataset.

The actual returned tuples depend on the status of the dataset and whether the requested version is the latest.

GetDatasetVersionLatestIds ( bool includeCheckouts = false ) : List

Returns the list of identifiers of the latest version of of the datasets.

GetDatasetVersionProfile ( System.Int64 versionId ) : object

reports what changes have been done by the version specified by versionId. Deletions, updates, new records, and changes in the dataset attributes are among the reported items.

GetDatasetWorkingCopy ( System.Int64 datasetId ) : DatasetVersion
GetDatasettVersions ( System.Int64 datasetId ) : List

Returns all checked-in versions of the dataset datasetId.

The checked-out version, if exists, is not included in the return list.

IsDatasetCheckedIn ( System.Int64 datasetId ) : bool

Determines whether the dataset datasetId is in checked-in state.

Do NOT rely on False return value to conclude the dataset is not checked in, it may imply that the dataset does not exist.

IsDatasetCheckedOutFor ( System.Int64 datasetId, string username ) : bool

Determines whether the dataset datasetId is checked out by the user username.

Returning false does not mean the dataset is not checked out or not by the designated user, it may imply that the dataset does not exist, deleted, or purged. So do NOT rely on the false return value and use the method when exclusively interested in knowing whether the user username has checked out the dataset datasetId.

PurgeDataset ( System.Int64 datasetId ) : bool

Physically deletes the whole dataset, including its versions and data tuples, from the database.

There is no way to recover the dataset after this method has successfully purged it.

PurgeDataset ( System.Int64 datasetId, bool forced ) : bool
UndoCheckoutDataset ( System.Int64 datasetId, string username ) : void

Rolls back all the non checked-in changes done to the latest version (deletes the working copy changes) and takes the dataset back to the latest CheckedIn version. The dataset must be in CheckedOut state and the performing user should be the check out user. It does not check-in the dataset so the caller should CheckInDataset afterward, if needed.

UpdateContentDescriptor ( ContentDescriptor entity ) : ContentDescriptor

Having a changed content descriptor entity, the method applies the changes to the original entity and persists the changes.

The entity should already exists in the database.

UpdateDataTuple ( DataTuple entity ) : DataTuple

Provided that the data tuple entity contains some changes, the method persists the changes into the database.

UpdateDataset ( Dataset dataset ) : Dataset

In cases that the dataset's attributes are changed, data set is bound to a research plan or other attributes of the dataset entity are changed, this method persists the changes.

Do NOT use this method to change the status of the dataset

Приватные методы

Метод Описание
DeleteDataTuple ( DataTuple entity ) : bool
DeleteDataTuple ( IEnumerable entities ) : bool
applyTupleChanges ( DatasetVersion workingCopyVersion, List &tupleVersionsTobeAdded, List &tuplesTobeDeleted, List &tuplesTobeEdited, ICollection createdTuples, ICollection editedTuples, ICollection deletedTuples, ICollection unchangedTuples = null ) : DatasetVersion
checkInDataset ( System.Int64 datasetId, string comment, string username, bool adminMode ) : void

checkOutDataset ( System.Int64 datasetId, string username, System.DateTime timestamp ) : bool

checks out the dataset and creates a new version on it. The new version acts like a working copy while it is not committed, hence editable.

createMaterializedView ( long datasetId ) : void
dropMaterializedView ( long datasetId ) : bool

used by the purge dunction, and maybe delete funtion too.

editDatasetVersion ( DatasetVersion workingCopyDatasetVersion, List createdTuples, ICollection editedTuples, ICollection deletedTuples, ICollection unchangedTuples ) : DatasetVersion
existsMaterializedView ( long datasetId ) : bool
getDatasetLatestVersion ( Dataset dataset ) : DatasetVersion
getDatasetLatestVersion ( System.Int64 datasetId ) : DatasetVersion
getDatasetVersionEffectiveTupleCount ( DatasetVersion datasetVersion ) : Int32
getDatasetVersionEffectiveTupleIds ( DatasetVersion datasetVersion ) : List
getDatasetVersionEffectiveTuples ( DatasetVersion datasetVersion ) : List
getDatasetVersionEffectiveTuples ( DatasetVersion datasetVersion, int pageNumber, int pageSize ) : List
getDatasetWorkingCopy ( System.Int64 datasetId ) : DatasetVersion
getHistoricTuples ( DatasetVersion datasetVersion ) : List
getHistoricTuples ( DatasetVersion datasetVersion, int pageNumber, int pageSize ) : List
getPreviousVersionIds ( DatasetVersion datasetVersion ) : List
getPreviousVersionIdsOrdered ( DatasetVersion datasetVersion ) : List
getPrimaryTupleCount ( DatasetVersion datasetVersion ) : Int32
getPrimaryTupleIds ( DatasetVersion datasetVersion ) : List
getPrimaryTuples ( DatasetVersion datasetVersion ) : List
getPrimaryTuples ( DatasetVersion datasetVersion, int pageNumber, int pageSize ) : List
getUserIdentifier ( string username ) : string
getWorkingCopyTupleCount ( DatasetVersion datasetVersion ) : Int32
getWorkingCopyTupleIds ( DatasetVersion datasetVersion ) : List
getWorkingCopyTuples ( DatasetVersion datasetVersion ) : List
getWorkingCopyTuples ( DatasetVersion datasetVersion, int pageNumber, int pageSize ) : List
isDatasetCheckedOutFor ( System.Int64 datasetId, string username ) : bool
refreshMaterializedView ( long datasetId ) : void
undoCheckout ( System.Int64 datasetId, string username, bool adminMode, bool commit = true ) : void

Undo checkout, removes the checked out version of specified dataset and compensates all the tuples deleted, changed or created from the last check-in. It does not check-in the dataset meaning the caller should CheckInDataset after calling Undo

undoTupleChanges ( DatasetVersion workingCopyVersion ) : DatasetVersion
updateMaterializedView ( long datasetId ) : void

Описание методов

AddDataView() публичный Метод

Adds a data view to the designated dataset. This method does not execute the view, but only associates it with the dataset so that later its application can be requested. A data view is the specification of a set of criteria to filter a dataset vertically and horizontally in on demand. Applying a data view on a dataset version filters its data tuples and variables if the dataset is structured. For unstructured dataset the data view can be used to pass the filtering criteria to a proper processing tool.
public AddDataView ( Dataset dataset, DataView view ) : void
dataset Dataset The dataset the view is linked to
view BExIS.Dlm.Entities.DataStructure.DataView The data view to be associated to the .
Результат void

CheckInDataset() публичный Метод

approves the working copy version as a new version and changes the status of the dataset to CheckedIn. The status must be in CheckedOut and the user must be similar to the checkout user.
Does not support simultaneous check-ins
public CheckInDataset ( System.Int64 datasetId, string comment, string username ) : void
datasetId System.Int64 The identifier of the dataset to be checked-in
comment string A free form text to describe what has changed with this check-in
username string The username that performs the check-in, which should be the same as the check-out username
Результат void

CheckOutDataset() публичный Метод

Checks out the dataset for the specified user, in order to make it available for editing. dataset must be in CheckedIn state.
public CheckOutDataset ( System.Int64 datasetId, string username ) : bool
datasetId System.Int64 The identifier of the dataset
username string
Результат bool

CheckOutDataset() публичный Метод

This version of the checlout accpes a timestamp, which is likely a past time. The prpuse is to support dataset migarations by preserving their original sumission date.
The timestamp MUST be greater than the timestamp of the current checked in version, if exist.
public CheckOutDataset ( System.Int64 datasetId, string username, System.DateTime timestamp ) : bool
datasetId System.Int64
username string
timestamp System.DateTime The timestamp of the migrated dataset.
Результат bool

CheckOutDatasetIfNot() публичный Метод

Checks out the dataset for the specified user, if it is not already checked out. dataset must be in CheckedIn state, in order to be checked out.
public CheckOutDatasetIfNot ( System.Int64 datasetId, string username ) : bool
datasetId System.Int64 The identifier of the dataset
username string
Результат bool

CreateAmendment() публичный Метод

An amendment is like a variable value that is added to a data tuple. The difference is that the amendment does not need to be defined in the dataset's structure and also not all the data tuples need to have the same amendments. This method creates and amendment object, attaches it to the data tuple but does NOT persist it.
public CreateAmendment ( string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, System.Int64 parameterId, DataTuple tuple ) : Amendment
value string
note string
samplingTime System.DateTime
resultTime System.DateTime
obtainingMethod BExIS.Dlm.Entities.DataStructure.ObtainingMethod
parameterId System.Int64 The identifier of the parameter that the amendment will be linked to. needs more clarification
tuple BExIS.Dlm.Entities.Data.DataTuple The data tuple receiving the amendment.ku
Результат BExIS.Dlm.Entities.Data.Amendment

CreateContentDescriptor() публичный Метод

Resource descriptors are the way to link resources to data set versions (and some other entity types, too). The resources can be persisted in the local or a remote file system or any other location reachable via a URL. The resource itself can be any type of file, service returning a resource, a normal webpage, and so on. The method creates a resource descriptor, links it to the provided data set version and persists the descriptor.
The method does not have access to the resource itself, and does not persist it.
public CreateContentDescriptor ( string name, string mimeType, string uri, Int32 orderNo, DatasetVersion datasetVersion ) : ContentDescriptor
name string A friendly name for the resource, mainly used in the UI
mimeType string The type of the resource. Used in the methods that transfer and/or process the resource
uri string The URI of the resource, may contain protocol, access method, authorization information , etc.
orderNo System.Int32 The order of the resource in the list of all resources associated to the same dataset version.
datasetVersion BExIS.Dlm.Entities.Data.DatasetVersion
Результат BExIS.Dlm.Entities.Data.ContentDescriptor

CreateDataTuple() публичный Метод

Using the provided values creates a data tuple, attaches it to the version and persists it in the database. This method does not affect the status of the dataset version.
throws and exception if the dataset version is not checked-out.
public CreateDataTuple ( int orderNo, ICollection variableValues, ICollection amendments, DatasetVersion datasetVersion ) : DataTuple
orderNo int The order of the data tuple in the list of tuples
variableValues ICollection The values to be considered as the data tuple. They must be attached to their corresponding variables according to the dataset's data structure.
amendments ICollection Each data tuple can have amendments and if provided, the method attaches them to the data tuple.
datasetVersion BExIS.Dlm.Entities.Data.DatasetVersion The version of the dataset the data tuple is attached to. The version must be checked-out.
Результат BExIS.Dlm.Entities.Data.DataTuple

CreateEmptyDataset() публичный Метод

Creates an empty dataset that has no data tuple, puts it into the checked-in state, and persists it in the database. At the time of creation a valid data structure, research plan, and metadata structure must be available.
public CreateEmptyDataset ( Entities dataStructure, ResearchPlan researchPlan, BExIS.Dlm.Entities.MetadataStructure metadataStructure ) : Dataset
dataStructure Entities A valid and persisted data structure entity.
researchPlan ResearchPlan A valid and persisted research plan entity.
metadataStructure BExIS.Dlm.Entities.MetadataStructure A valid and persisted metadata structure entity.
Результат Dataset

CreateExtendedPropertyValue() публичный Метод

An extended property is a custom property that is assigned to a dataset version in addition to the predefined properties. Then each dataset version owner/ accessor can provide a value for the attached properties.
public CreateExtendedPropertyValue ( System.Int64 extendedPropertyId, string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, DatasetVersion datasetVersion ) : ExtendedPropertyValue
extendedPropertyId System.Int64 The identifier of the extended property.
value string The value to be assigned to the extended property of the dataset version.
note string
samplingTime System.DateTime
resultTime System.DateTime
obtainingMethod BExIS.Dlm.Entities.DataStructure.ObtainingMethod
datasetVersion BExIS.Dlm.Entities.Data.DatasetVersion The dataset version receiving the property value
Результат BExIS.Dlm.Entities.Data.ExtendedPropertyValue

CreateParameterValue() публичный Метод

Creates a parameter value similar to CreateVariableValue.
public CreateParameterValue ( string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, System.Int64 parameterId ) : ParameterValue
value string
note string
samplingTime System.DateTime
resultTime System.DateTime
obtainingMethod BExIS.Dlm.Entities.DataStructure.ObtainingMethod
parameterId System.Int64
Результат BExIS.Dlm.Entities.Data.ParameterValue

CreateVariableValue() публичный Метод

This method creates a variable value and returns it without persisting the object in the database. Usually the returned variable value should be added to a data tuple which in turn is belonging to a data set version. A value is a compound object holding information about a single event (sampling). The event can be a(n) measurement, observation, estimation, simulation, or computation of a feature of an entity. The value can be a assigned to a variable or a parameter based on the design of the data structure.
public CreateVariableValue ( string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, System.Int64 variableId, ICollection parameterValues ) : VariableValue
value string The result of the event which can be a(n) measurement, observation, estimation, simulation, or computation
note string A free format, but short, description about the value
samplingTime System.DateTime The exact time of the start of the event. It shows when the sampling is started.
resultTime System.DateTime The sampling, or the processing may take time (like in the computation or simulation cases), also some devices/ sensors have a response time. The parameter captures the time when the result (value) is ready. /// The result time and its difference to sampling time are important for some analyses. ///
obtainingMethod BExIS.Dlm.Entities.DataStructure.ObtainingMethod Determines how the values is obtained, which is one of the measurement, observation, estimation, simulation, or computation cases.
variableId System.Int64 The identifier of the variable that the value is belonging to.
parameterValues ICollection If the variable has parameters attached, the parameter values are passed alongside, so that the method links them to their corresponding variable value using .
Результат BExIS.Dlm.Entities.Data.VariableValue

DatasetManager() публичный Метод

public DatasetManager ( ) : System
Результат System

DeleteContentDescriptor() публичный Метод

Detaches the content descriptor object from its corresponding dataset version, and then deletes the content descriptor.
public DeleteContentDescriptor ( ContentDescriptor entity ) : bool
entity BExIS.Dlm.Entities.Data.ContentDescriptor The content descriptor object to be deleted.
Результат bool

DeleteContentDescriptor() публичный Метод

Detaches a list of content descriptor objects from their, possibly different, corresponding dataset versions, and then deletes the content descriptors.
public DeleteContentDescriptor ( IEnumerable entities ) : bool
entities IEnumerable The content descriptor entities to be deleted.
Результат bool

DeleteDataView() публичный Метод

Detaches the data view from its dataset and deletes the view from the database.
public DeleteDataView ( DataView entity ) : bool
entity BExIS.Dlm.Entities.DataStructure.DataView
Результат bool

DeleteDataset() публичный Метод

Marks the dataset as deleted but does not physically remove it from the database. If the dataset is checked out and the rollbackCheckout is True, the dataset's changes will be roll-backed and then the delete operation takes place, but if the rollbackCheckout is false, The changes will be checked in as a new version and then the deletion operation is executed.
public DeleteDataset ( System.Int64 datasetId, string username, bool rollbackCheckout ) : bool
datasetId System.Int64 The identifier of the dataset to be checked-in.
username string The username that performs the check-in, which should be the same as the check-out username.
rollbackCheckout bool Determines whether latest uncommitted changes should be rolled back or checked in before marking the dataset as deleted.
Результат bool

EditDatasetVersion() публичный Метод

Applies the submitted changes to the working copy and persists the changes but does NOT check-in the dataset. The changes are coming in the form of the tuples to be added, deleted, or editedVersion. The general procedure of making changes is CheckOut, Edit (one or more times), CheckIn or Rollback. there is no need to pass metadata, extendedPropertyValues, contentDescriptors .. as they can be assigned to the working copy version before sending it to the method. Just if they are null, they will not affect the version. The general procedure is CheckOut, Edit*, CheckIn or Rollback While the dataset is checked out, all the changes go to the latest+1 version which acts like a working copy
public EditDatasetVersion ( DatasetVersion workingCopyDatasetVersion, List createdTuples, ICollection editedTuples, ICollection deletedTuples, ICollection unchangedTuples = null ) : DatasetVersion
workingCopyDatasetVersion BExIS.Dlm.Entities.Data.DatasetVersion The working copy version that accepts the changes.
createdTuples List The list of the new tuples to be added to the working copy.
editedTuples ICollection The list of the tuples whose values have been changed and the changes should be considered in the working copy.
deletedTuples ICollection The list of existing tuples to be deleted from the working copy.
unchangedTuples ICollection to be removed
Результат BExIS.Dlm.Entities.Data.DatasetVersion

GetDataset() публичный Метод

Retrieves the dataset object having identifier datasetId from the database.
The object based attributes of the entity that are persisted as XML are not populated by default. In order to fully populate the entity, call the Materialize method.
public GetDataset ( System.Int64 datasetId ) : Dataset
datasetId System.Int64 The identifier of the dataset.
Результат Dataset

GetDatasetLatestIds() публичный Метод

Returns the list of identifiers of all the matching datasets. If includeCheckouts is false, just the datasets having the latest version checked-in are included , otherwise the datasets with versions either checked-in or checked-out will be included.
public GetDatasetLatestIds ( bool includeCheckouts = false ) : List
includeCheckouts bool Determines whether the checked out versions should be included in the result.
Результат List

GetDatasetLatestMetadataVersion() публичный Метод

Returns the metadata of the latest versions of the dataset .
public GetDatasetLatestMetadataVersion ( System.Int64 datasetId, bool includeCheckouts = false ) : XmlDocument
datasetId System.Int64 The dataset whose latest metadata version is returned.
includeCheckouts bool Determines whether the method should return the metadata if the dataset is checked-out.
Результат System.Xml.XmlDocument

GetDatasetLatestMetadataVersions() публичный Метод

Returns the metadata of the latest versions of all datasets associated to a data structure, alongside with their identifiers including/ excluding the checked out versions.
public GetDatasetLatestMetadataVersions ( System.Int64 structureId, bool includeCheckouts = false ) : XmlDocument>.Dictionary
structureId System.Int64 The data structure that its associated datasets are searched.
includeCheckouts bool Determines whether the checked out versions should be included in the result.
Результат XmlDocument>.Dictionary

GetDatasetLatestMetadataVersions() публичный Метод

Returns the metadata of the latest versions of all datasets, alongside with their identifiers including/ excluding the checked out versions.
public GetDatasetLatestMetadataVersions ( bool includeCheckouts = false ) : XmlDocument>.Dictionary
includeCheckouts bool Determines whether the checked out versions should be included in the result.
Результат XmlDocument>.Dictionary

GetDatasetLatestVersion() публичный Метод

Returns the latest version of the dataset dataset if the dataset is in checked-in state, otherwise it throws an exception.
The method throws an exception if the dataset is null, deleted, or checked out.
public GetDatasetLatestVersion ( Dataset dataset ) : DatasetVersion
dataset Dataset The dataset instance
Результат BExIS.Dlm.Entities.Data.DatasetVersion

GetDatasetLatestVersion() публичный Метод

Returns the latest version of the dataset datasetId if the dataset is in checked-in state, otherwise it throws an exception.
The method throws an exception if the dataset does not exist, is deleted, or is checked out.
public GetDatasetLatestVersion ( System.Int64 datasetId ) : DatasetVersion
datasetId System.Int64 The identifier of the dataset
Результат BExIS.Dlm.Entities.Data.DatasetVersion

GetDatasetLatestVersions() публичный Метод

Returns a list of the latest versions of all datasets associated to a data structure, including/ excluding the checked out versions.
identifiers are returned to reduce the number of database roundtrips!
public GetDatasetLatestVersions ( System.Int64 structureId, bool includeCheckouts = false ) : DatasetVersion>.Dictionary
structureId System.Int64 The data structure that its associated datasets are searched.
includeCheckouts bool Determines whether the checked out versions should be included in the result.
Результат DatasetVersion>.Dictionary

GetDatasetLatestVersions() публичный Метод

Returns a list of the latest versions of the provided datasetIds including/ excluding the checked out versions.
public GetDatasetLatestVersions ( List datasetIds, bool includeCheckouts = false ) : List
datasetIds List The list of identifiers of the datasets whose their latest versions is requested
includeCheckouts bool Determines whether the checked out versions should be included in the result.
Результат List

GetDatasetLatestVersions() публичный Метод

Returns a list of the latest versions of all datasets including/ excluding the checked out versions.
public GetDatasetLatestVersions ( bool includeCheckouts = false ) : List
includeCheckouts bool Determines whether the checked out versions should be included in the result.
Результат List

GetDatasetVersion() публичный Метод

Returns the dataset version specified by the version identifier versionId. If the requested version is the latest but the dataset is checked-out an exception is thrown.
The method throws an exception in the following cases: /// /// The provided version is is greater than the latest version identifier /// The provided version identifier is not associated with any version. /// The identifier is pointing to a version, but the version is not associated to any dataset (orphan version). /// The version is associated to a dataset which is marked as deleted. /// The identifier is pointing to a working copy, which means the dataset is checked out and the identifier is pointing to the latest (not committed working copy). /// ///
public GetDatasetVersion ( System.Int64 versionId ) : DatasetVersion
versionId System.Int64 The identifier of the dataset version requested.
Результат BExIS.Dlm.Entities.Data.DatasetVersion

GetDatasetVersionEffectiveTupleCount() публичный Метод

Returns the number of the effective tuples of the dataset version requested. See GetDatasetVersionEffectiveTuples for more details about the effective tuples of a dataset.
public GetDatasetVersionEffectiveTupleCount ( DatasetVersion datasetVersion ) : System.Int64
datasetVersion BExIS.Dlm.Entities.Data.DatasetVersion The object representing the data set version requested
Результат System.Int64

GetDatasetVersionEffectiveTupleIds() публичный Метод

Returns a list of identifiers of the effective tuples of the dataset version requested. See GetDatasetVersionEffectiveTuples for more details about the effective tuples of a dataset.
public GetDatasetVersionEffectiveTupleIds ( DatasetVersion datasetVersion ) : List
datasetVersion BExIS.Dlm.Entities.Data.DatasetVersion The object representing the data set version requested
Результат List

GetDatasetVersionEffectiveTuples() публичный Метод

Each dataset may have more than one versions, each having their own data tuples. The data tuples of the latest version are kept in a separate collection, but the previous versions are scattered among the data tuple and historical tuple collections. The later is the place that acts as the place to keep record of all the previous actions done on the dataset and its their results. This method may be called to get the tuples of the version 2 while the current version is i.e. 10. Based on the status of the requested version, the method may use the tuple collection alone or in combination with the history records to rebuild the version as it was at its check-in time. The versions are stored in the tuple collection in a differential way, so that the version 3 computes the differences to the version 2 and applies the difference only. So retrieving algorithm in this method rebuilds the requested version from its own and previous versions' tuples. If the latest version is requested and the dataset is checked in, the algorithm retrieves all tuples in the tuple collection associated with the current and all previous versions. If the latest version is requested and the dataset is in checked-out state, the method retrieves the working copy tuples.
The returned list may contain normal and historic tuples, if the requested version is not the latest. All the tuples are materialized.
public GetDatasetVersionEffectiveTuples ( DatasetVersion datasetVersion ) : List
datasetVersion BExIS.Dlm.Entities.Data.DatasetVersion The object representing the data set version requested.
Результат List

GetDatasetVersionEffectiveTuples() публичный Метод

Returns one page of the data tuples of the dataset version requested. See GetDatasetVersionEffectiveTuples for more details about the effective tuples of a dataset.
The actual returned tuples depend on the status of the dataset and whether the requested version is the latest.
public GetDatasetVersionEffectiveTuples ( DatasetVersion datasetVersion, int pageNumber, int pageSize ) : List
datasetVersion BExIS.Dlm.Entities.Data.DatasetVersion
pageNumber int
pageSize int
Результат List

GetDatasetVersionLatestIds() публичный Метод

Returns the list of identifiers of the latest version of of the datasets.
public GetDatasetVersionLatestIds ( bool includeCheckouts = false ) : List
includeCheckouts bool Determines whether the checked out versions should be included in the result.
Результат List

GetDatasetVersionProfile() публичный Метод

reports what changes have been done by the version specified by versionId. Deletions, updates, new records, and changes in the dataset attributes are among the reported items.
public GetDatasetVersionProfile ( System.Int64 versionId ) : object
versionId System.Int64
Результат object

GetDatasetWorkingCopy() публичный Метод

public GetDatasetWorkingCopy ( System.Int64 datasetId ) : DatasetVersion
datasetId System.Int64
Результат BExIS.Dlm.Entities.Data.DatasetVersion

GetDatasettVersions() публичный Метод

Returns all checked-in versions of the dataset datasetId.
The checked-out version, if exists, is not included in the return list.
public GetDatasettVersions ( System.Int64 datasetId ) : List
datasetId System.Int64 The identifier of the dataset.
Результат List

IsDatasetCheckedIn() публичный Метод

Determines whether the dataset datasetId is in checked-in state.
Do NOT rely on False return value to conclude the dataset is not checked in, it may imply that the dataset does not exist.
public IsDatasetCheckedIn ( System.Int64 datasetId ) : bool
datasetId System.Int64 The identifier of the dataset.
Результат bool

IsDatasetCheckedOutFor() публичный Метод

Determines whether the dataset datasetId is checked out by the user username.
Returning false does not mean the dataset is not checked out or not by the designated user, it may imply that the dataset does not exist, deleted, or purged. So do NOT rely on the false return value and use the method when exclusively interested in knowing whether the user username has checked out the dataset datasetId.
public IsDatasetCheckedOutFor ( System.Int64 datasetId, string username ) : bool
datasetId System.Int64 The identifier of the dataset.
username string the username of the user that may have checked the dataset out.
Результат bool

PurgeDataset() публичный Метод

Physically deletes the whole dataset, including its versions and data tuples, from the database.
There is no way to recover the dataset after this method has successfully purged it.
public PurgeDataset ( System.Int64 datasetId ) : bool
datasetId System.Int64 The identifier of the dataset to be checked-in.
Результат bool

PurgeDataset() публичный Метод

public PurgeDataset ( System.Int64 datasetId, bool forced ) : bool
datasetId System.Int64
forced bool
Результат bool

UndoCheckoutDataset() публичный Метод

Rolls back all the non checked-in changes done to the latest version (deletes the working copy changes) and takes the dataset back to the latest CheckedIn version. The dataset must be in CheckedOut state and the performing user should be the check out user. It does not check-in the dataset so the caller should CheckInDataset afterward, if needed.
public UndoCheckoutDataset ( System.Int64 datasetId, string username ) : void
datasetId System.Int64 The identifier of the dataset to be checked-in
username string The username that performs the check-in, which should be the same as the check-out username
Результат void

UpdateContentDescriptor() публичный Метод

Having a changed content descriptor entity, the method applies the changes to the original entity and persists the changes.
The entity should already exists in the database.
public UpdateContentDescriptor ( ContentDescriptor entity ) : ContentDescriptor
entity BExIS.Dlm.Entities.Data.ContentDescriptor The editedVersion version of the content descriptor entity.
Результат BExIS.Dlm.Entities.Data.ContentDescriptor

UpdateDataTuple() публичный Метод

Provided that the data tuple entity contains some changes, the method persists the changes into the database.
public UpdateDataTuple ( DataTuple entity ) : DataTuple
entity BExIS.Dlm.Entities.Data.DataTuple The data tuple containing the changes.
Результат BExIS.Dlm.Entities.Data.DataTuple

UpdateDataset() публичный Метод

In cases that the dataset's attributes are changed, data set is bound to a research plan or other attributes of the dataset entity are changed, this method persists the changes.
Do NOT use this method to change the status of the dataset
public UpdateDataset ( Dataset dataset ) : Dataset
dataset Dataset A dataset instance containing the changes
Результат Dataset