TObjectManager.Find<E> Method
Overloads
- TObjectManager.Find<E>
- TObjectManager.Find<E>(Variant)
- TObjectManager.Find<E>(TGUID)
- TObjectManager.Find(TClass)
- TObjectManager.Find(TClass, Variant)
TObjectManager.Find<E>
Creates a new typed query criteria for entities of type E.
Syntax
Unit: Aurelius.Engine.ObjectManager
function TObjectManager.Find: TCriteria<E>; overload;
Type Parameters
| Type Parameter | Description |
|---|---|
| E | The entity class type to query. |
See also
TObjectManager.Find<E>(Variant)
Retrieves an entity of type E by its identifier.
Remarks
If the entity is already in the manager's cache, the cached instance is returned without hitting the database. Otherwise a SELECT statement is executed.
Syntax
Unit: Aurelius.Engine.ObjectManager
function TObjectManager.Find(const IdValue: Variant): E; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | IdValue | Variant | The identifier value to look up. |
Returns
The persistent entity instance, or nil if no record with that identifier exists in the database.
Type Parameters
| Type Parameter | Description |
|---|---|
| E | The entity class type. |
See also
TObjectManager.Find<E>(TGUID)
Retrieves an entity of type E by its GUID identifier.
Syntax
Unit: Aurelius.Engine.ObjectManager
function TObjectManager.Find(const IdValue: TGUID): E; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | IdValue | TGUID | The GUID identifier value to look up. |
Returns
The persistent entity instance, or nil if no record with that identifier exists in the database.
Type Parameters
| Type Parameter | Description |
|---|---|
| E | The entity class type. |
See also
TObjectManager.Find(TClass)
Creates a new query criteria for entities of the specified class.
Syntax
Unit: Aurelius.Engine.ObjectManager
function TObjectManager.Find(AClass: TClass): TCriteria; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| AClass | TClass | The entity class to query. |
Returns
A new TCriteria that can be further filtered, ordered, and executed.
See also
TObjectManager.Find(TClass, Variant)
Retrieves an entity of the specified class by its identifier.
Remarks
If the entity is already in the manager's cache, the cached instance is returned without hitting the database. Otherwise a SELECT statement is executed. Use this non-generic overload when the entity class is not known at compile time.
Syntax
Unit: Aurelius.Engine.ObjectManager
function TObjectManager.Find(Clazz: TClass; const IdValue: Variant): TObject; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| Clazz | TClass | The runtime class of the entity to find. | |
| const | IdValue | Variant | The identifier value to look up. |
Returns
The persistent entity instance, or nil if no record with that identifier exists in the database.