TAureliusManager.Find<E> Method
Overloads
- TAureliusManager.Find<E>
- TAureliusManager.Find<E>(Variant)
- TAureliusManager.Find<E>(TGUID)
- TAureliusManager.Find(TClass)
- TAureliusManager.Find(TClass, Variant)
TAureliusManager.Find<E>
Creates a new generic criteria query for the specified entity type.
Syntax
Unit: Aurelius.Comp.Manager
function TAureliusManager.Find: TCriteria<E>; overload;
Type Parameters
| Type Parameter | Description |
|---|---|
| E | The entity class type to query. |
See also
TAureliusManager.Find<E>(Variant)
Finds and returns an entity by its identifier using a variant id value.
Remarks
If the entity is already cached in the manager, the cached instance is returned without querying the database.
Syntax
Unit: Aurelius.Comp.Manager
function TAureliusManager.Find(const IdValue: Variant): E; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | IdValue | Variant | The identifier value. Must match the type of the identifier property mapped with the [Id] attribute. |
Returns
The entity instance, or nil if not found.
Type Parameters
| Type Parameter | Description |
|---|---|
| E | The entity class type. |
See also
TAureliusManager.Find<E>(TGUID)
Finds and returns an entity by its GUID identifier.
Syntax
Unit: Aurelius.Comp.Manager
function TAureliusManager.Find(const IdValue: TGUID): E; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | IdValue | TGUID | The GUID identifier value of the entity. |
Returns
The entity instance, or nil if not found.
Type Parameters
| Type Parameter | Description |
|---|---|
| E | The entity class type. |
See also
TAureliusManager.Find(TClass)
Creates a new criteria query for the specified class.
Syntax
Unit: Aurelius.Comp.Manager
function TAureliusManager.Find(AClass: TClass): TCriteria; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| AClass | TClass | The entity class to query. |
Returns
A TCriteria object that can be used to add filters, ordering, and projections before retrieving results.
See also
TAureliusManager.Find(TClass, Variant)
Finds and returns an entity of the specified class by its identifier.
Remarks
Use this non-generic overload when the entity class is not known at compile time. If the entity is already in the manager cache, the cached instance is returned without hitting the database.
Syntax
Unit: Aurelius.Comp.Manager
function TAureliusManager.Find(Clazz: TClass; const IdValue: Variant): TObject; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| Clazz | TClass | The entity class to look up. | |
| const | IdValue | Variant | The identifier value of the entity to retrieve. |
Returns
The entity instance, or nil if no record with that identifier exists in the database.