Table of Contents

TAureliusManager Class

Non-visual design-time component that encapsulates a TObjectManager instance, providing RAD access to Aurelius ORM operations at design time.

Remarks

TAureliusManager and TObjectManager have equivalent functionality. The main purpose of TAureliusManager is to provide an alternative RAD approach: instead of instantiating a TObjectManager from code, you drop a TAureliusManager component, connect it to a TAureliusCustomConnectionPool component via the Connection property, and you are ready to go.

The encapsulated TObjectManager instance is created on demand (lazily) when the first operation is performed. If the Connection or ModelName property is changed, the encapsulated TObjectManager instance is destroyed and a new one will be created when next needed.

All public methods delegate directly to the encapsulated TObjectManager instance. You can also access it directly via the ObjManager property.

Syntax

Unit: Aurelius.Comp.Manager

TAureliusManager = class(TComponent);

Methods

Name Description
ApplyUpdates Executes all SQL statements that were deferred when cached updates are enabled.
Clear Clears all entities from the manager cache, detaching every managed entity.
Evict Detaches an entity from the manager without deleting it from the database or destroying the instance.
Find Overloaded
Find<E>
Find<E>(Variant)
Find<E>(TGUID)
Find(TClass)
Find(TClass, Variant)
Flush Overloaded
Flush
Flush(TObject)
HasChanges Overloaded
HasChanges
HasChanges(TObject)
IsAttached Indicates whether the specified entity is currently attached to (managed by) the encapsulated TObjectManager.
Merge<E> Merges a transient entity into the manager and returns the persistent (managed) entity instance with the same identifier.
Refresh Reloads the entity's properties and associations from the database, overwriting any in-memory changes.
ReleaseObjManager Destroys and releases the encapsulated TObjectManager instance, including all entity objects it manages.
Remove Removes an entity from the database and detaches it from the manager.
Replicate<E> Replicates a transient entity into the manager and returns the persistent (managed) entity instance with the same identifier.
Save Saves (inserts) a new entity object into the database.
SaveOrUpdate Saves or updates an entity depending on whether it has an identifier value set.
Update Attaches a transient entity object to the manager so that its changes will be persisted to the database when Flush is called.

Properties

Name Description
Connection Gets or sets the connection pool component used as the database connection for all persistence operations performed by this manager.
ModelName Gets or sets the name of the mapping model to be used by this manager.
ObjManager Gets the encapsulated TObjectManager instance used to perform database operations.