|
Craig's Utility Library
4.0 Beta
|
Object base class helper. This is not required but automatically sets up basic functions and properties to simplify things a bit. More...
Public Member Functions | |
| int | CompareTo (object obj) |
| Compares the object to another object More... | |
| virtual int | CompareTo (ObjectType other) |
| Compares the object to another object More... | |
| virtual void | Delete () |
| Deletes the item More... | |
| override bool | Equals (object obj) |
| Determines if two items are equal More... | |
| override int | GetHashCode () |
| Returns the hash of this item More... | |
| virtual void | Save () |
| Saves the item (if it already exists, it updates the item. Otherwise it inserts the item) More... | |
| virtual void | SetupObject () |
| Sets up the object for saving purposes More... | |
Static Public Member Functions | |
| static IEnumerable< ObjectType > | All (params IParameter[] Params) |
| Loads the items based on type More... | |
| static IEnumerable< ObjectType > | All (string Command, CommandType Type, string ConnectionString, params object[] Params) |
| Loads the items based on the criteria specified More... | |
| static ObjectType | Any (params IParameter[] Params) |
| Loads the item based on the criteria specified More... | |
| static ObjectType | Any (string Command, CommandType Type, string ConnectionString, params object[] Params) |
| Loads the item based on the criteria specified More... | |
| static bool | operator!= (ObjectBaseClass< ObjectType, IDType > first, ObjectBaseClass< ObjectType, IDType > second) |
| != operator More... | |
| static bool | operator< (ObjectBaseClass< ObjectType, IDType > first, ObjectBaseClass< ObjectType, IDType > second) |
| The < operator More... | |
| static bool | operator== (ObjectBaseClass< ObjectType, IDType > first, ObjectBaseClass< ObjectType, IDType > second) |
| The == operator More... | |
| static bool | operator> (ObjectBaseClass< ObjectType, IDType > first, ObjectBaseClass< ObjectType, IDType > second) |
| The > operator More... | |
| static int | PageCount (int PageSize=25, params IParameter[] Params) |
| Gets the page count based on page size More... | |
| static IEnumerable< ObjectType > | Paged (int PageSize=25, int CurrentPage=0, string OrderBy="", params IParameter[] Params) |
| Loads the items based on type More... | |
| static void | Save (IEnumerable< ObjectType > Objects) |
| Saves a list of objects More... | |
Static Public Attributes | |
| static EventHandler< LoadingEventArgs > | Loading |
| Called prior to an object is loading More... | |
Protected Member Functions | |
| ObjectBaseClass () | |
| Constructor More... | |
| virtual void | OnDeleted (DeletedEventArgs e) |
| Called when the item is Deleted More... | |
| virtual void | OnDeleting (DeletingEventArgs e) |
| Called when the item is Deleting More... | |
| virtual void | OnLoaded (LoadedEventArgs e) |
| Called when the item is Loaded More... | |
| virtual void | OnLoading (LoadingEventArgs e) |
| Called when the item is Loading More... | |
| virtual void | OnSaved (SavedEventArgs e) |
| Called when the item is Saved More... | |
| virtual void | OnSaving (SavingEventArgs e) |
| Called when the item is Saving More... | |
Static Protected Member Functions | |
| static void | OnLoading (object sender, LoadingEventArgs e) |
| Called when the item is Loading More... | |
Properties | |
| virtual bool | Active [get, set] |
| Is the object active? More... | |
| virtual DateTime | DateCreated [get, set] |
| Date object was created More... | |
| virtual DateTime | DateModified [get, set] |
| Date last modified More... | |
| EventHandler< DeletedEventArgs > | Deleted [get, set] |
| Called when the object is deleted More... | |
| EventHandler< DeletingEventArgs > | Deleting [get, set] |
| Called prior to an object is deleting More... | |
| virtual IDType | ID [get, set] |
| ID for the object More... | |
| EventHandler< LoadedEventArgs > | Loaded [get, set] |
| Called prior to an object being loaded More... | |
| EventHandler< SavedEventArgs > | Saved [get, set] |
| Called when the object is saved More... | |
| EventHandler< SavingEventArgs > | Saving [get, set] |
| Called prior to an object is saving More... | |
Properties inherited from Utilities.ORM.Interfaces.IObject< IDType > | |
| bool | Active [get, set] |
| Is this item active? More... | |
| DateTime | DateCreated [get, set] |
| Date created More... | |
| DateTime | DateModified [get, set] |
| Date last modified More... | |
| IDType | ID [get, set] |
| ID More... | |
Object base class helper. This is not required but automatically sets up basic functions and properties to simplify things a bit.
| IDType | ID type |
| ObjectType | Object type (must be the child object type) |
| ObjectType | : | ObjectBaseClass | |
| ObjectType | : | ObjectType | |
| ObjectType | : | IDType | |
| ObjectType | : | new() | |
| IDType | : | IComparable |
Definition at line 40 of file ObjectBaseClass.cs.
|
protected |
Constructor
Definition at line 47 of file ObjectBaseClass.cs.
|
static |
Loads the items based on type
| Params | Parameters used to specify what to load |
Definition at line 114 of file ObjectBaseClass.cs.
|
static |
Loads the items based on the criteria specified
| Command | Command to run |
| Type | Command type |
| ConnectionString | Connection string name |
| Params | Parameters used to specify what to load |
Definition at line 138 of file ObjectBaseClass.cs.
|
static |
Loads the item based on the criteria specified
| Params | Parameters used to specify what to load |
Definition at line 159 of file ObjectBaseClass.cs.
|
static |
Loads the item based on the criteria specified
| Command | Command to run |
| Type | Command type |
| ConnectionString | Connection string name |
| Params | Parameters used to specify what to load |
Definition at line 182 of file ObjectBaseClass.cs.
| int Utilities.ORM.ObjectBaseClass< ObjectType, IDType >.CompareTo | ( | object | obj | ) |
Compares the object to another object
| obj | Object to compare to |
Definition at line 306 of file ObjectBaseClass.cs.
|
virtual |
Compares the object to another object
| other | Object to compare to |
Definition at line 318 of file ObjectBaseClass.cs.
|
virtual |
Deletes the item
Definition at line 326 of file ObjectBaseClass.cs.
| override bool Utilities.ORM.ObjectBaseClass< ObjectType, IDType >.Equals | ( | object | obj | ) |
Determines if two items are equal
| obj | The object to compare this to |
Definition at line 343 of file ObjectBaseClass.cs.
| override int Utilities.ORM.ObjectBaseClass< ObjectType, IDType >.GetHashCode | ( | ) |
Returns the hash of this item
Definition at line 354 of file ObjectBaseClass.cs.
|
protectedvirtual |
Called when the item is Deleted
| e | DeletedEventArgs item |
Definition at line 399 of file ObjectBaseClass.cs.
|
protectedvirtual |
Called when the item is Deleting
| e | DeletingEventArgs item |
Definition at line 408 of file ObjectBaseClass.cs.
|
protectedvirtual |
Called when the item is Loaded
| e | LoadedEventArgs item |
Definition at line 417 of file ObjectBaseClass.cs.
|
staticprotected |
Called when the item is Loading
| e | LoadingEventArgs item |
| sender | Sender item |
Definition at line 390 of file ObjectBaseClass.cs.
|
protectedvirtual |
Called when the item is Loading
| e | LoadingEventArgs item |
Definition at line 426 of file ObjectBaseClass.cs.
|
protectedvirtual |
Called when the item is Saved
| e | SavedEventArgs item |
Definition at line 435 of file ObjectBaseClass.cs.
|
protectedvirtual |
Called when the item is Saving
| e | SavingEventArgs item |
Definition at line 444 of file ObjectBaseClass.cs.
|
static |
!= operator
| first | First item |
| second | Second item |
Definition at line 203 of file ObjectBaseClass.cs.
|
static |
The < operator
| first | First item |
| second | Second item |
Definition at line 214 of file ObjectBaseClass.cs.
|
static |
The == operator
| first | First item |
| second | Second item |
Definition at line 229 of file ObjectBaseClass.cs.
|
static |
The > operator
| first | First item |
| second | Second item |
Definition at line 246 of file ObjectBaseClass.cs.
|
static |
Gets the page count based on page size
| PageSize | Page size |
| Params | Parameters used to specify what to load |
Definition at line 261 of file ObjectBaseClass.cs.
|
static |
Loads the items based on type
| PageSize | Page size |
| CurrentPage | Current page (0 based) |
| OrderBy | The order by portion of the query |
| Params | Parameters used to specify what to load |
Definition at line 274 of file ObjectBaseClass.cs.
|
static |
Saves a list of objects
| Objects | List of objects |
Definition at line 294 of file ObjectBaseClass.cs.
|
virtual |
Saves the item (if it already exists, it updates the item. Otherwise it inserts the item)
Definition at line 362 of file ObjectBaseClass.cs.
|
virtual |
Sets up the object for saving purposes
Definition at line 380 of file ObjectBaseClass.cs.
|
static |
Called prior to an object is loading
Definition at line 107 of file ObjectBaseClass.cs.
|
getset |
Is the object active?
Definition at line 58 of file ObjectBaseClass.cs.
|
getset |
Date object was created
Definition at line 65 of file ObjectBaseClass.cs.
|
getset |
Date last modified
Definition at line 72 of file ObjectBaseClass.cs.
|
getset |
Called when the object is deleted
Definition at line 77 of file ObjectBaseClass.cs.
|
getset |
Called prior to an object is deleting
Definition at line 82 of file ObjectBaseClass.cs.
|
getset |
ID for the object
Definition at line 87 of file ObjectBaseClass.cs.
|
getset |
Called prior to an object being loaded
Definition at line 92 of file ObjectBaseClass.cs.
|
getset |
Called when the object is saved
Definition at line 97 of file ObjectBaseClass.cs.
|
getset |
Called prior to an object is saving
Definition at line 102 of file ObjectBaseClass.cs.