Syntax
| C# |
|---|
[SerializableAttribute] public abstract class ActiveRecordValidationBase<T> where T : class |
Type Parameters
- T
The type exposes the following members.
Public Constructors
| Name | Description | |
|---|---|---|
| ActiveRecordValidationBase<(Of <T>)>ActiveRecordValidationBase<(Of <T>)>New |
Constructs an ActiveRecordValidationBase
|
Public Methods
| Name | Description | |
|---|---|---|
| Create |
Creates (Saves) a new instance to the database.
(Inherited from ActiveRecordBase.) | |
| CreateAndFlush |
Creates (Saves) a new instance to the database.
(Inherited from ActiveRecordBase.) | |
| Delete |
Deletes the instance from the database.
(Inherited from ActiveRecordBase.) | |
| DeleteAndFlush |
Deletes the instance from the database.
(Inherited from ActiveRecordBase.) | |
| Equals | (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. GetHashCode()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IsValid | Overloaded. | |
| Refresh |
Refresh the instance from the database.
(Inherited from ActiveRecordBase.) | |
| Save |
Saves the instance information to the database.
May Create or Update the instance depending
on whether it has a valid ID.
(Inherited from ActiveRecordBase.) | |
| SaveAndFlush |
Saves the instance information to the database.
May Create or Update the instance depending
on whether it has a valid ID.
(Inherited from ActiveRecordBase.) | |
| SaveCopy |
Saves a copy of the instance information to the database.
May Create or Update the instance depending
on whether it has a valid ID.
(Inherited from ActiveRecordBase.) | |
| SaveCopyAndFlush |
Saves a copy of the instance information to the database.
May Create or Update the instance depending
on whether it has a valid ID.
(Inherited from ActiveRecordBase.) | |
| ToString |
Return the type of the object with its PK value.
Useful for logging/debugging
(Inherited from ActiveRecordBase.) | |
| Update |
Persists the modification on the instance
state to the database.
(Inherited from ActiveRecordBase.) | |
| UpdateAndFlush |
Persists the modification on the instance
state to the database.
(Inherited from ActiveRecordBase.) |
Protected Methods
| Name | Description | |
|---|---|---|
| BeforeDelete |
Hook to perform additional tasks
before removing the object instance representation
from the database.
(Inherited from ActiveRecordHooksBase.) | |
| BeforeLoad |
Hook to transform the read data
from the database before populating
the object instance
(Inherited from ActiveRecordHooksBase.) | |
| BeforeSave |
Override the base hook to call validators required for create.
(Overrides ActiveRecordHooksBase..::BeforeSave(IDictionary).) | |
| Execute |
Invokes the specified delegate passing a valid
NHibernate session. Used for custom NHibernate queries.
(Inherited from ActiveRecordBase.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| FindDirty |
Called from Flush(). The return value determines whether the entity is updated
(Inherited from ActiveRecordHooksBase.) | |
| IsUnsaved |
Called when a transient entity is passed to SaveOrUpdate.
(Inherited from ActiveRecordHooksBase.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| OnDelete |
Lifecycle method invoked during Delete of the entity
(Inherited from ActiveRecordHooksBase.) | |
| OnFlushDirty |
Override the base hook to call validators required for update.
(Overrides ActiveRecordHooksBase..::OnFlushDirty(Object, IDictionary, IDictionary, array<IType>[]()).) | |
| OnLoad |
Lifecycle method invoked during Load of the entity
(Inherited from ActiveRecordHooksBase.) | |
| OnNotValid |
Throws an exception explaining why the save or update
cannot be executed when fields are not ok to pass.
| |
| OnSave |
Lifecycle method invoked during Save of the entity
(Inherited from ActiveRecordHooksBase.) | |
| OnUpdate |
Lifecycle method invoked during Update of the entity
(Inherited from ActiveRecordHooksBase.) | |
| PostFlush |
Called after a flush that actually ends in execution of the SQL statements required to
synchronize in-memory state with the database.
(Inherited from ActiveRecordHooksBase.) | |
| PreFlush |
Called before a flush
(Inherited from ActiveRecordHooksBase.) |
Public Properties
| Name | Description | |
|---|---|---|
| PropertiesValidationErrorMessage |
Maps a specific PropertyInfo to a list of
error messages. Useful for frameworks.
| |
| ValidationErrorMessages |
Returns a list of current validation errors messages.
|