Context Class |
Namespace: SD.LLBLGen.Pro.ORMSupportClasses
The Context type exposes the following members.
Name | Description | |
---|---|---|
Context |
Creates a new Context instance.
| |
Context(Boolean) |
Creates a new Context instance.
| |
Context(Boolean, Boolean) |
Creates a new Context instance.
|
Name | Description | |
---|---|---|
EntityTypeHashtables |
Gets the entity type hashtables / dictionaries. Dictionaries which store per entity hash value, the entity's objectid
| |
NewEntities |
Gets the new entities.
| |
ObjectIDToEntityInstance |
Gets the object ID to entity instance.
| |
SetExistingEntityFieldsInGet |
Gets / sets SetExistingEntityFieldsInGet flag. When set to false (default is true), an existing
entity's fields is not set to the fields of the passed in entity. Fields are only set if the entity isn't dirty.
|
Name | Description | |
---|---|---|
Add(IEntityCollectionCore) |
Adds the specified collection to this context. All contained entities are added to the context as well, if they're not already in the / a context.
This will make sure that any entity added to the entity collection will be added to this context as well.
| |
Add(IEntityCore) |
Adds the specified entity to the Context. If the passed in entity is already in a context, the Add is a no-op.
Also if the entity isn't new and there is already an entity with the same PK values, the Add is a no-op.
| |
Clear |
Clears this context. It removes all cached entity references from this context and also all type definitions.
Per entity to remove, it calls OnRemove before the actual removal and OnRemoveComplete after the actual removal.
| |
EntitySaveCommittedTEntity |
After an entity has been saved and the transaction has been committed (or if no transaction was used: the entity was saved), this routine is called
to move entities which are in the list of new entities and which are now saved to the store.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Get(IEntity) |
The passed in entity is checked if the contained data is already in this / a context in another entity object.
If that's the case, that entity object is returned. If the data is not in this context in another entity object,
the passed in entity is returned and added to this context.
| |
Get(IEntity2) |
The passed in entity is checked if the contained data is already in this / a context in another entity object.
| |
Get(IEntityFactory, Object) |
Tries to find an entity with the same PK values as passed in. The PK values have to be in the same order as they appear in the constructor of the
entity. If an entity in the context has the same PK values, that entity is returned, otherwise a new entity is returned, created with the
factory passed in, with its PK values initialized, though not fetched.
| |
Get(IEntityFactory2, Object) |
Tries to find an entity with the same PK values as passed in. The PK values have to be in the same order as they appear in the constructor of the
entity. If an entity in the context has the same PK values, that entity is returned, otherwise a new entity is returned, created with the
factory passed in, with its PK values initialized, though not fetched.
| |
GetAll |
Returns a readonly arraylist with all the objects of the type passed in which are currently stored in the internal object cache.
No new entities are returned. If the type is not found, an empty array list is returned.
| |
GetAllTypes |
Gets all the Type objects for which objects are located in this Context
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnAddTEntity |
Called at the start of Add(TEntity)
| |
OnAddCollection(IEntityCollection) |
Called at the start of Add(IEntityCollection)
| |
OnAddCollection(IEntityCollection2) |
Called at the start of Add(IEntityCollection2)
| |
OnAddCollectionComplete(IEntityCollection) |
Called at the end of Add(IEntityCollection)
| |
OnAddCollectionComplete(IEntityCollection2) |
Called at the end of Add(IEntityCollection2)
| |
OnAddCompleteTEntity |
Called at the end of Add(TEntity)
| |
OnClear |
Called at the start of the Clear() method
| |
OnClearComplete |
Called at the end of the Clear() method
| |
OnInitComplete |
Called at the end of the InitClass method, which initializes datastructures from the ctor
| |
OnRemove |
Called at the start of the remove action for toRemove
| |
OnRemoveComplete |
Called at the end of Remove(IEntityCore), when toRemove has been removed from this context
| |
Remove |
Removes the specified entity from the store
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |