Table of Contents

TBaseAureliusDataset Class

Abstract base class for dataset components that expose in-memory entity object lists through the standard Delphi TDataset interface.

Remarks

TBaseAureliusDataset provides the core dataset infrastructure: record buffering, field management, insert/edit/delete support, bookmarks, filtering, locate/lookup, and fetch-on-demand. The source of data can be an external object list (SetSourceList), a single object (SetSourceObject), or any TObjectSource implementation (SetSource). The concrete subclass TCustomAureliusDataset (declared in Aurelius.Bind.Dataset) adds ORM-aware field definitions and object persistence via TObjectManager.

Syntax

Unit: Aurelius.Bind.BaseDataset

TBaseAureliusDataset = class(TDataSet);

Constructors

Name Description
Create Creates a new dataset instance and initializes internal structures.

Destructors

Name Description
Destroy Destroys the dataset, releasing all internal lists and buffers.

Methods

Name Description
Current<T> Returns the entity object associated with the current record.
EntityFieldByName Finds and returns the entity field with the specified name.
FillRecord Refreshes all field values in the current record buffer using the property values of the given object.
IsModified Indicates whether the specified field has been modified since the last edit or insert operation began.
RefreshRecord Refreshes all field values in the current record buffer from the underlying entity object.
SetSource Sets a custom TObjectSource as the fetch provider for this dataset.
SetSourceList Sets an external object list as the source of data for this dataset.
SetSourceObject Sets a single entity object as the sole record in this dataset.

Properties

Name Description
CreateObjectOnPost Gets or sets whether the new entity object is created at Post time rather than at Append/Insert time.
CreateSelfField Gets or sets whether the dataset automatically adds a Self entity field that holds a reference to the current record's object.
DefaultsFromObject Gets or sets whether field default values are taken from the underlying object's current property values rather than being set to Null.
IncludeUnmapped​Objects Gets or sets whether the dataset creates fields for object properties that are not mapped in the Aurelius model (transient properties).
InternalList Provides read-only access to the internal object list maintained by the dataset.
ModifiedFields Returns an enumerable of fields that have been modified in the current edit session.
ObjectClass Gets or sets the base class used to create new objects when inserting records and to generate default field definitions.
ReadOnly Gets or sets whether the dataset is in read-only mode, preventing edits via data-aware controls.
RecordCountMode Gets or sets how the total record count is determined when records are fetched incrementally.
RefreshObject​OnCancel Gets or sets whether the underlying entity object is refreshed from the database when Cancel is called after a failed post.
SourceList Provides read-only access to the active source object list.
SubpropsDepth Gets or sets the number of association levels for which sub-property fields are automatically created.
SyncSubprops Gets or sets whether modifying an entity field automatically updates all related sub-property fields in the same edit session.

Events

Name Description
OnCreateObject Event fired when the dataset needs to create a new object for an inserted record.
OnObjectInsert Event fired after a new record is posted, giving the application a chance to persist the new entity object.
OnObjectRefresh Event fired when an object is refreshed, giving the application a chance to reload the entity's state from the database.
OnObjectRemove Event fired when a record is deleted, giving the application a chance to remove or destroy the entity object.
OnObjectUpdate Event fired after an edited record is posted, giving the application a chance to persist the updated entity object.