Click here to Skip to main content
15,886,069 members
Articles / Programming Languages / Visual Basic

Object-Oriented database design with the DatabaseObjects library

Rate me:
Please Sign up or sign in to vote.
4.00/5 (6 votes)
31 Jan 20076 min read 109.5K   3.9K   64  
Demonstrates creating object-oriented database systems with the DatabaseObjects library.
<?xml version="1.0" encoding="us-ascii"?>
<doc>
  <assembly>
    <name>DatabaseObjects</name>
    <version>1.2.0.0</version>
    <fullname>DatabaseObjects, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null</fullname>
  </assembly>
  <members>
    <member name="M:DatabaseObjects.FieldMappingAttribute.#ctor(System.String)">
      <param name="strFieldName">
 The name of the database field associated with this property or field. 
 </param>
    </member>
    <member name="T:DatabaseObjects.Database">
      <summary>
 Represents a database connection and provides a set of functions that work 
 in conjunction with classes implementing IDatabaseObjects and IDatabaseObject. 
 The Database class automatically generates and executes the required SQL 
 statements to perform common database operations such as saving, deleting 
 searching etc. based on the values returned via the IDatabaseObjects and 
 IDatabaseObject interfaces. 
 Typically, this class is only used when explicitly implementing the IDatabaseObjects 
 and IDatabaseObject interfaces rather than inheriting from DatabaseObjects (or 
 DatabaseObjectsEnumerable) and DatabaseObject. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.Database.#ctor(System.String,DatabaseObjects.Database.ConnectionType)">
      <summary>
 Creates a new Database instance specifying the database to connect to and SQL 
 syntax to use with the database. Each function call of the Database class opens 
 and closes a connection. Therefore, connection pooling should be enabled 
 for optimal performance. 
 </summary>
 
 <param name="strConnectionString">
 A database connection string to either a Microsoft Access, SQLServer, or MySQL 
 database. For example, 'Provider=Microsoft.Jet.OLEDB.4.0;Data 
 Source=northwind.mdb;Jet OLEDB:Database Password=;'. 
 </param>
 
 <param name="eConnectionType">
 Indicates the SQL syntax to generate for the database specified in strConnectionString. 
 </param></member>
    <member name="M:DatabaseObjects.Database.Object(DatabaseObjects.IDatabaseObjects,System.Object)">
      <summary>
 Returns an instance of an object from the collection using a distinct value (see 
 IDatabaseObjects.DistinctFieldName). If the collection has implemented the 
 IDatabaseObjects.Subset function then the objDistinctValue need only be unique 
 within the collection's subset, not the entire database table. 
 </summary>
 
 <param name="objCollection">
 The collection that contains the object. 
 </param>
 
 <param name="objDistinctValue">
 The value that uniquely identifies the object within the collection. This is the value 
 of the field defined by the collection's IDatabaseObjects.DistinctFieldName function. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns>
 
 <example> Loads a product using a product ID of 123 
 <code>
 objProduct = objDatabase.Object(NorthwindDB.Products, 123) 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectSave(DatabaseObjects.IDatabaseObjects,DatabaseObjects.IDatabaseObject)">
      <summary>
 Extracts the fields to save to the database from the objItem.SaveFields function. 
 The fields are then written to the database using either an SQL INSERT or UPDATE 
 depending on whether the object has already been saved. If the collection has 
 implemented IDatabaseObjects.KeyFieldName then objItem's key is also validated to 
 ensure it is not null and unique within the collection. If objCollection has 
 implemented IDatabaseObjects.Subset then objItem should exist within objCollection. 
 If not, a duplicate key error may occur if the obItem's key is being used in 
 another subset in the same table. If a record is being amended 
 (IDatabaseObject.IsSaved returns true) then the function will "AND" the collection's 
 IDatabaseObjects.Subset conditions and the objItem's IDatabaseObject.DistinctValue 
 value to create the WHERE clause in the UPDATE statement. Therefore, the 
 combination of the IDatabaseObjects.Subset and IDatabaseObject.DistinctValue 
 conditions MUST identify only one record in the table. Otherwise multiple records 
 will be updated with the same data. If data is only inserted and not amended 
 (usually a rare occurance) then this requirement is unnecessary. 
 </summary>
 
 <param name="objCollection">
 The collection which contains or will contain the object to save. 
 </param>
 
 <param name="objItem">
 The object to save to the database. The values saved to the database are extracted from the 
 SQLFieldValues object returned from IDatabaseObject.SaveFields. 
 </param>
 
 <example> Saves a product object (Me) to the database. 
 <code>
 Public Sub Save() 
 
     objDatabase.ObjectSave(NorthwindDB.Products, Me) 
 
 End Sub 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectByKey(DatabaseObjects.IDatabaseObjects,System.Object)">
      <summary>
 Returns an object from the collection using a unique key value. 
 The key must be unique within the collection. If the collection's 
 IDatabaseObjects.Subset has been implemented then the key need only be unique 
 within the subset specified, not the entire database table. 
 </summary>
 
 <param name="objCollection">
 The collection which contains the object. 
 </param>
 
 <param name="objKey">
 The key that identifies the object with the collection. The key is the value of 
 the field defined by the collection's IDatabaseObjects.KeyFieldName. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns>
 
 <example>
 <code>
 Default Public ReadOnly Property Item(ByVal strProductCode As String) As Product 
     Get 
 
         Return objDatabase.ObjectByKey(Me, strProductCode) 
 
     End Get 
 End Property 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectByOrdinalFirst(DatabaseObjects.IDatabaseObjects)">
      <summary>
 ObjectByOrdinalFirst returns the first object in the collection respectively 
 filtered and sorted by the collection's IDatabaseObjects.Subset and 
 IDatabaseObjects.OrderBy values. It differs from ObjectByOrdinal in that it only 
 loads the first record from the database table not the entire table. 
 </summary>
 
 <param name="objCollection">
 The collection which contains the object. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns>
 
 <example>
 <code>
 'Ideal for loading default objects 
 Dim objDefaultSupplier As Supplier = objDatabase.ObjectByOrdinalFirst(objGlobalSuppliersInstance) 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectByOrdinal(DatabaseObjects.IDatabaseObjects,System.Int32)">
      <summary>
 ObjectByOrdinal returns an object from the collection at a specific ordinal 
 position. The ordinal position is related to the collection's 
 IDatabaseObjects.Subset and IDatabaseObjects.OrderBy values. 
 Typically, this function is used to enumerate through a collection of objects. 
 ObjectByOrdinal will load the collection's entire recordset on the first call 
 and on subsequent calls the preloaded objects are returned. 
 Avoid making alternate calls to ObjectByOrdinal for different tables, as the 
 entire recordset will be reloaded on each call. 
 To load the first object in a table without loading the entire table, use the 
 ObjectByOrdinalFirst function. 
 </summary>
 
 <param name="objCollection">
 The collection that contains the object at the specified ordinal position. 
 </param>
 
 <param name="intIndex">
 The ordinal position of the object. The ordinal position depends on the collection's 
 IDatabaseObjects.Subset and IDatabaseObjects.OrderBy values 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns>
 
 <example>
 <code>
 Default Public ReadOnly Property Item(ByVal intIndex As Integer) As Product 
     Get 
 
         Return objDatabase.ObjectByOrdinal(Me, intIndex) 
 
     End Get 
 End Property 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectsCount(DatabaseObjects.IDatabaseObjects)">
      <summary>
 Returns the number of items in the collection. If the collection's 
 IDatabaseObjects.Subset has been implemented then this function returns the 
 number of records within the subset, not the entire table. 
 </summary>
 
 <param name="objCollection">
 The object for which the number of records are returned. 
 </param>
 
 <returns><see cref="Int32" />	(System.Int32)</returns>
 
 <example>
 <code>
 'Return the number of items in this collection. 
 Public ReadOnly Property Count() As Integer 
     Get 
 
         Return objDatabase.ObjectsCount(Me) 
 
     End Get 
 End Property 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectExists(DatabaseObjects.IDatabaseObjects,System.Object)">
      <summary>
 Returns whether the key exists within the collection. If the collection's 
 IDatabaseObjects.Subset has been set then only the subset is searched not the 
 entire table. 
 </summary>
 
 <param name="objCollection">
 The collection to search within. 
 </param>
 
 <param name="objKey">
 The key value to search by. 
 </param>
 
 <returns><see cref="Boolean" />	(System.Boolean)</returns>
 
 <example>
 <code>
 Public Function Exists(ByVal strProductCode As String) As Boolean 
 
     Return objDatabase.ObjectExists(Me, strProductCode) 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectDelete(DatabaseObjects.IDatabaseObjects,DatabaseObjects.IDatabaseObject@)">
      <summary>
 Deletes an object's database record. If the collection's IDatabaseObjects.Subset 
 has been implemented then the object must exist within the subset, otherwise the 
 object will not be deleted. If the object has not been saved to the database the 
 function will exit without executing an SQL DELETE command. After deleting the 
 database record the object is set to Nothing. The calling function should receive 
 the object ByRef for this to have any affect. Setting the object to Nothing 
 minimises the possibility of the deleted object being used in code after 
 ObjectDelete has been called. 
 </summary>
 
 <param name="objCollection">
 The collection that contains the object to delete. If the item does not exist 
 within the collection then the object will not be deleted. 
 </param>
 
 <param name="objItem">
 The object to delete. The calling function should receive this object ByRef 
 as the object is set to Nothing after deletion. 
 Reference Type: <see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject) 
 </param>
 
 <example>
 <code>
 Public Sub Delete(ByRef objProduct As Product) 
 
     objDatabase.ObjectDelete(Me, objProduct) 
     'objProduct will now be Nothing 
 
 End Sub 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectsDeleteAll(DatabaseObjects.IDatabaseObjects)">
      <summary>
 Deletes all of the objects in the collection. If IDatabaseObjects.Subset 
 has been implemented then only the objects within the subset are deleted, not 
 the table's entire contents. 
 </summary>
 
 <param name="objCollection">
 The collection from which all objects are to be deleted. 
 </param></member>
    <member name="M:DatabaseObjects.Database.ObjectsList(DatabaseObjects.IDatabaseObjects)">
      <summary>
 Returns an IList object containing all of the collection's associated child 
 objects. This function is useful when loading a set of objects for a subset or 
 for use with the IEnumerable interface. 
 </summary>
 
 <param name="objCollection">
 The collection which contains the objects to load. 
 </param>
 
 <returns><see cref="Collections.IList" />	(System.Collections.IList)</returns>
 
 <example>
 <code>
 'Can be used to provide an enumerator for use with the "For Each" clause 
 Private Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator 
 
     Return objDatabase.ObjectsList(objGlobalProductsInstance).GetEnumerator 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectsDictionary(DatabaseObjects.IDatabaseObjects)">
      <summary>
 Returns an IDictionary object. Each key/value pair contains a key and 
 the object associated with the key. 
 </summary>
 
 <param name="objCollection">
 The collection which specifies the objects to load. 
 </param>
 
 <returns><see cref="Collections.IDictionary" />	(System.Collections.IDictionary)</returns></member>
    <member name="M:DatabaseObjects.Database.ObjectsDictionaryByDistinctValue(DatabaseObjects.IDatabaseObjects)">
      <summary>
 Returns an IDictionary object. Each key/value pair contains a distinct 
 value and the object associated with the distinct value. 
 </summary>
 
 <param name="objCollection">
 The collection which specifies the objects to load. 
 </param>
 
 <returns><see cref="Collections.IDictionary" />	(System.Collections.IDictionary)</returns></member>
    <member name="M:DatabaseObjects.Database.ObjectsSearch(DatabaseObjects.IDatabaseObjects,DatabaseObjects.SQL.SQLConditions)">
      <summary>
 Returns a collection of objects that match the specified search criteria. 
 This function utilises any subsets, ordering or table joins specified in the 
 collection. To add a set of conditions to the objSearchCriteria object with 
 higher precendance use the "Add(SQLConditions)" overloaded function as this will 
 wrap the conditions within parentheses. 
 </summary>
 
 <param name="objCollection">
 The collection to search within. 
 </param>
 
 <param name="objSearchCriteria">
 The criteria to search for within the collection. To add a set of conditions with 
 with higher precendance use the "Add(SQLConditions)" overloaded function as this 
 will wrap the conditions within parentheses. 
 </param>
 
 <returns><see cref="Collections.IList" />	(System.Collections.IList)</returns>
 
 <remarks>
 The following wildcard characters are used when using the LIKE operator (extract 
 from Microsoft Transact-SQL Reference) 
 
 
 <font size="1">
 <table width="659" border="1" cellspacing="1" cellpadding="4">
   <tr>
     <th width="16%" height="20">Wildcard character</th>
     <th width="22%">Description</th>
     <th width="62%">Example</th>
   </tr>
   <tr>
     <td>%</td>
     <td>Any string of zero or more characters.</td>
     <td>WHERE title LIKE '%computer%' finds all book titles with the word 
         'computer' anywhere in the book title.</td>
   </tr>
   <tr>
     <td>_ (underscore)</td>
     <td>Any single character.</td>
     <td>WHERE au_fname LIKE '_ean' finds all four-letter first names that end 
       with ean (Dean, Sean, and so on).</td>
   </tr>
 </table>
 </font>
 </remarks>
 
 <example>
 <code>
 Public Function Search(ByVal objSearchCriteria As Object, ByVal eType As SearchType) As IList 
 
     Dim objConditions As SQL.SQLConditions = New SQL.SQLConditions 
 
     Select Case eType 
         Case SearchType.DescriptionPrefix 
             objConditions.Add("ProductName", SQL.ComparisonOperator.Like, objSearchCriteria &amp; "%") 
         Case SearchType.Description 
             objConditions.Add("ProductName", SQL.ComparisonOperator.Like, "%" &amp; objSearchCriteria &amp; "%") 
     End Select 
 
     Return objDatabase.ObjectsSearch(objGlobalProductsInstance, objConditions) 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.ObjectFromDataReader(DatabaseObjects.IDatabaseObjects,System.Data.IDataReader)">
      <summary>
 Loads an object from the current record of an IDataReader object. 
 </summary>
 
 <param name="objCollection">
 The collection associated with the IDataReader object. 
 </param>
 
 <param name="objReader">
 The data to be copied into a new IDatabaseObject object. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns></member>
    <member name="M:DatabaseObjects.Database.ObjectFromFieldValues(DatabaseObjects.IDatabaseObjects,DatabaseObjects.SQL.SQLFieldValues)">
      <summary>
 Loads an object from the values contained in an SQLFieldValues object. 
 This function is generally used from within an IDatabaseObject.Load function when 
 the IDatabaseObjects.TableJoins function has been implemented. 
 </summary>
 
 <param name="objCollection">
 The collection associated with the field values. 
 </param>
 
 <param name="objFieldValues">
 The data container from which to load a new object. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns></member>
    <member name="T:DatabaseObjects.Database.TransactionsClass">
      <summary>
 Provides a mechanism for starting beginning, commiting and rolling back transactions. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.Database.TransactionsClass.Begin">
      <summary>
 Notifies that a transaction has begun and that all modifications to the database 
 are only committed after a call to Commit. Alternatively, if 
 Rollback is called then all changes are aborted. To execute other 
 statements for the transaction call the Execute and ExecuteNonQuery functions. 
 Because all changes to the database must be executed on the same connection 
 DatabaseObjects maintains an open connection until the Commit or Rollback functions 
 are called. When transactions are not being used connections are opened and closed 
 for each SQL statement executed i.e. (INSERT/UPDATE/SELECT...). 
 </summary>
 
 <example>
 <code>
 Public Sub Shadows Save() 
 
     Mybase.ParentDatabase.Transactions.Begin() 
 
     MyBase.Save 
     Me.Details.Save 
 
     'Execute any other statements here via 
     'MyBase.ParentDatabase.Transactions.Execute()... 
 
     Mybase.ParentDatabase.Transactions.Commit() 
 
 End sub 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.TransactionsClass.Commit">
      <summary>
 Commits all statements that have been executed after the Begin() call. 
 The database connection is closed after the transaction has been committed. 
 </summary>
 
 <example>
 <code>
 Public Sub Shadows Save() 
 
     Mybase.ParentDatabase.Transactions.Begin() 
 
     MyBase.Save 
     Me.Details.Save 
 
     'Execute any other statements here via 
     'MyBase.ParentDatabase.Transactions.Execute()... 
 
     Mybase.ParentDatabase.Transactions.Commit() 
 
 End sub 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.Database.TransactionsClass.Rollback">
      <summary>
 Rollsback all statements that have been executed after the Begin() call. 
 The database connection is closed after the transaction has been rolled back. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.Database.TransactionsClass.ExecuteNonQuery(DatabaseObjects.SQL.ISQLStatement)">
      <summary>
 Allows an SQL statement to be executed on the current transaction connection. 
 If a transaction is not in progress and exception will occur. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.Database.TransactionsClass.Execute(DatabaseObjects.SQL.ISQLStatement)">
      <summary>
 Allows an SQL statement to be executed on the current transaction connection. 
 If a transaction is not in progress and exception will occur. 
 </summary>
    </member>
    <member name="T:DatabaseObjects.DatabaseObject">
      <summary>
 This class can be used in conjunction with the DatabaseObjects class to simplify 
 the process of using the DatabaseObjects library. This class implements the 
 IDatabaseObject interface and provides the basic "plumbing" code required by the 
 interface. For this reason, inheriting from this class is preferable to 
 implementing the IDatabaseObject interface directly. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObject.#ctor(DatabaseObjects.DatabaseObjects)">
      <summary>
 Initializes a new DatabaseObject with the parent collection that this object is 
 associated with. 
 </summary>
 
 <example>
 <code>
 'Code from a class that has inherited from DatabaseObjects 
 'So that this object has a reference to the parent 
 Protected Overrides Function ItemInstance() As DatabaseObjects.IDatabaseObject 
 
     Return New Product(Me) 
 
 End Function 
 </code>
 </example></member>
    <member name="P:DatabaseObjects.DatabaseObject.ParentCollection">
      <summary>
 Returns the parent collection (DatabaseObjects instance) that this object is 
 associated with. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObject.ParentDatabase">
      <summary>
 Returns the database associated with this object. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObject.Save">
      <summary>
 Extracts the fields to save to the database from the objItem.SaveFields function. 
 The fields are then written to the database using either an SQL INSERT or UPDATE 
 depending on whether the object has already been saved. If the collection has 
 implemented IDatabaseObjects.KeyFieldName then objItem's key is also validated to 
 ensure it is not null and unique within the collection. 
 If the parent collection has implemented Subset then this object should exist 
 within the parent collection. If not, a duplicate key error may occur if the key 
 is being used in another subset in the same table. If a record is being amended 
 (MyBase.IsSaved is True) then the function will "AND" the parent collection's 
 Subset conditions and the DistinctValue value to create the WHERE clause in the 
 UPDATE statement. Therefore, the combination of the IDatabaseObjects.Subset and 
 IDatabaseObject.DistinctValue conditions MUST identify only one record in the 
 table. Otherwise multiple records will be updated with the same data. If data is 
 only inserted and not amended (usually a rare occurance) then this requirement 
 is unnecessary. 
 </summary>
 
 <example>
 <code>
 'Make the inherited "Protected Sub Save" public 
 Public Overrides Sub Save() 
 
     MyBase.Save() 
 
 End Sub 
 </code>
 </example></member>
    <member name="P:DatabaseObjects.DatabaseObject.DistinctValue">
      <summary>
 Returns the distinct value that uniquely identifies this object in the 
 database. If a new object is saved or an existing object is loaded then this 
 property is automatically set by the library. 
 Typically, this is the value of an identity or auto increment database field. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObject.IsSaved">
      <summary>
 Returns whether this object has been saved to the database. If a new object is 
 saved (which uses an auto increment field) or an existing object is loaded then 
 this property is automatically set to true by the library. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObject.LoadFields(DatabaseObjects.SQL.SQLFieldValues)">
      <summary>
 Should copy the database fields from objFields to this object's variables. 
 objFields is populated with all of the fields from the associated record. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Sub LoadFields(ByVal objFields As DatabaseObjects.SQL.SQLFieldValues) 
 
     pstrCode = objFields("ProductCode").Value 
     pstrDescription = objFields("ProductDescription").Value 
 
 End Sub 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObject.SaveFields">
      <summary>
 Should return an SQLFieldValues object populated with the 
 fields to be written to the database. The first argument of the 
 SQLFieldValues.Add function is the database field name, the second is the 
 field's value. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function SaveFields() As DatabaseObjects.SQL.SQLFieldValues 
 
     SaveFields = New SQL.SQLFieldValues 
     SaveFields.Add("ProductCode", pstrCode) 
     SaveFields.Add("ProductDescription", pstrDescription) 
 
 End Function 
 </code>
 </example></member>
    <member name="T:DatabaseObjects.DatabaseObjectLockable">
      <summary>
 Extends the capabilities of the DatabaseObject by providing a set of routines 
 that lock and unlock this object for exclusive access for a particular user. 
 When Lock() is called a record is written to the lock table which includes the 
 object's associated table name, the object's distinct value and the user ID 
 specified in the DatabaseObjectLockController. When Unlock() is called this 
 record is deleted. If another or the current user has locked the object then the 
 IsLocked property will return true. 
 The DatabseObjects library does not inhibit the loading and/or saving of any 
 locked objects. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectLockable.#ctor(DatabaseObjects.DatabaseObjects,DatabaseObjects.DatabaseObjectLockController)">
      <summary>
 Initializes a new DatabaseObject with the parent collection that this object is 
 associated with and the lock controller to be used with this object. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObjectLockable.IsLocked">
      <summary>
 Indicates whether the current object is Locked either by the current user or 
 another user. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObjectLockable.LockedByUserID">
      <summary>
 Returns the user identifier that currently has the object locked. Throws an 
 exception if the object is not locked by a user. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectLockable.Lock">
      <summary>
 Locks the current object. Throws an exception if the object is already locked. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectLockable.UnLock">
      <summary>
 UnLocks the current object. Throws an exception if the object is not locked. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObjectLockable.IsLockedByCurrentUser">
      <summary>
 Returns whether the current user has the object locked. 
 </summary>
    </member>
    <member name="T:DatabaseObjects.DatabaseObjectLockController">
      <summary>
 This is the controller class that initializes the lock table and the user 
 ID that is to be associated with all locking operations. In most situations, 
 only one instance of this class is ever created and this instance is passed into 
 the constructor for all DatabaseObjectLockable and DatabaseObjectUsingAttributesLockable 
 instances. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectLockController.UnlockAll">
      <summary>
 Provides a means by which to ensure all locks have been removed for this user 
 in situations where an unexpected exception occurs and/or the user logs out of 
 system. 
 </summary>
    </member>
    <member name="T:DatabaseObjects.DatabaseObjects">
      <summary>
 This class can be used in conjunction with the DatabaseObject class to simplify 
 the process of using the DatabaseObjects library. This class implements the 
 IDatabaseObjects interface and provides the basic "plumbing" code required by 
 the interface. For this reason, inheriting from this class is preferable to 
 implementing the IDatabaseObjects interface directly. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjects.#ctor(DatabaseObjects.Database)">
      <summary>
 Initializes a new DatabaseObjects with it's associated database. 
 </summary>
 
 <param name="objDatabase">
 The database that this collection is associated with. 
 </param></member>
    <member name="M:DatabaseObjects.DatabaseObjects.Object(System.Object)">
      <summary>
 Returns an instance of an object from this collection using a distinct value as 
 specified by DistinctFieldName. If Subset has been implemented then the objDistinctValue 
 need only be unique within the subset specified, not the entire database table. 
 </summary>
 
 <param name="objDistinctValue">
 The value that uniquely identifies the object within this collection. This is the value 
 of the field defined by this collection's DistinctFieldName function. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns>
 
 <example> Loads a product using a product ID of 123 
 <code>
 Dim objProduct As Product = MyBase.Object(123) 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectByKey(System.Object)">
      <summary>
 Returns an object using a unique key value. 
 The key must be unique within this collection. If the collection's DatabaseObjects.Subset 
 has been implemented then the key need only be unique within the subset specified, not the 
 entire database table. 
 </summary>
 
 <param name="objKey">
 The key that identifies the object with this collection. The key is the value of the field 
 defined by this collection's KeyFieldName. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns>
 
 <example>
 <code>
 Default Public ReadOnly Property Item(ByVal strProductCode As String) As Product 
     Get 
 
         Return MyBase.ObjectByKey(strProductCode) 
 
     End Get 
 End Property 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectByOrdinal(System.Int32)">
      <summary>
 Returns an object from this collection at a specific ordinal/index position. 
 The ordinal position is related to this collection' Subset and OrderBy values. 
 Typically, this function is used to enumerate through a collection of objects. 
 ObjectByOrdinal will load the collection's entire recordset on the first call 
 and on subsequent calls the preloaded objects are returned. 
 Avoid making alternate calls to ObjectByOrdinal for different tables, as the 
 entire recordset will be reloaded on each call. 
 To load the first object in a table without loading the entire table, use the 
 ObjectByOrdinalFirst function. 
 </summary>
 
 <param name="intIndex">
 The ordinal position of the object. The ordinal position depends on this collection's 
 Subset and OrderBy values 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns>
 
 <example>
 <code>
 Default Public ReadOnly Property Item(ByVal intIndex As Integer) As Product 
     Get 
 
         Return MyBase.ObjectByOrdinal(intIndex) 
 
     End Get 
 End Property 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectByOrdinalFirst">
      <summary>
 ObjectByOrdinalFirst returns the first object in the collection respectively 
 filtered and sorted by the collection's Subset and OrderBy values. It differs 
 from ObjectByOrdinal in that it only loads the first record from the database 
 table not the entire table. 
 </summary>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns>
 
 <example>
 <code>
 'Assuming this class is the Suppliers class 
 
 'Ideal for loading default objects 
 Dim objDefaultSupplier As Supplier = MyBase.ObjectByOrdinalFirst 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectDelete(DatabaseObjects.IDatabaseObject@)">
      <summary>
 Deletes an object's database record. If this collection's Subset has been 
 implemented then the object must exist within the subset, otherwise the object 
 will not be deleted. If the object has not been saved to the database the function 
 will exit without executing an SQL DELETE command. After deleting the database 
 record the object is set to Nothing. The calling function should receive the 
 object ByRef for this to have any affect. Setting the object to Nothing 
 minimises the possibility of the deleted object being used in code after 
 ObjectDelete has been called. 
 </summary>
 
 <param name="objItem">
 The object to delete. The calling function should receive this object ByRef 
 as the object is set to Nothing after deletion. 
 </param>
 
 <example>
 <code>
 Public Sub Delete(ByRef objProduct As Product) 
 
     MyBase.ObjectDelete(objProduct) 
 
 End Sub 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectExists(System.Object)">
      <summary>
 Returns whether the key exists within the collection. If this collection's Subset 
 has been set then only the subset is searched not the entire table. 
 </summary>
 
 <param name="objKey">
 The key value to search by. 
 </param>
 
 <returns><see cref="Boolean" />	(System.Boolean)</returns>
 
 <example>
 <code>
 Public Function Exists(ByVal strProductCode As String) As Boolean 
 
     Return MyBase.ObjectExists(strProductCode) 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectFromDataReader(System.Data.IDataReader)">
      <summary>
 Loads an object from the current record of an IDataReader object. 
 </summary>
 
 <param name="objReader">
 The data to be copied into a new DatabaseObject object. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectFromFieldValues(DatabaseObjects.SQL.SQLFieldValues)">
      <summary>
 Loads an object from the values contained in an SQLFieldValues object. 
 This function is generally used from within an DatabaseObject.Load function when 
 the TableJoins function has been implemented. 
 </summary>
 
 <param name="objFieldValues">
 The data container from which to load a new object. 
 </param>
 
 <returns><see cref="IDatabaseObject" />	(DatabaseObjects.IDatabaseObject)</returns></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectsList">
      <summary>
 Returns an IList object containing all of this collection's objects. This 
 function is useful when loading a set of objects for a subset or for use with 
 the IEnumerable interface. 
 </summary>
 
 <returns><see cref="Collections.IList" />	(System.Collections.IList)</returns>
 
 <example>
 <code>
 'Alternatively, the DatabaseObjectsEnumerable class can be used which 
 'automatically incorporates an enumerator 
 Private Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator 
 
     Return MyBase.ObjectsList.GetEnumerator 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectsDictionary">
      <summary>
 Returns an IDictionary object. Each key/value pair contains a key and 
 the object associated with the key. 
 </summary>
 
 <returns><see cref="Collections.IDictionary" />	(System.Collections.IDictionary)</returns></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectsDictionaryByDistinctValue">
      <summary>
 Returns an IDictionary object. Each key/value pair contains a distinct 
 value and the object associated with the distinct value. 
 </summary>
 
 <returns><see cref="Collections.IDictionary" />	(System.Collections.IDictionary)</returns></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectsCount">
      <summary>
 Returns the number of items in this collection. If this collection's Subset 
 has been implemented then this function returns the number of records within the 
 subset, not the entire table. 
 </summary>
 
 <returns><see cref="Int32" />	(System.Int32)</returns>
 
 <example>
 <code>
 'Return the number of items in this collection. 
 Public ReadOnly Property Count() As Integer 
     Get 
 
         Return MyBase.ObjectsCount 
 
     End Get 
 End Property 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectsDeleteAll">
      <summary>
 Deletes all of the objects in this collection. If Subset has been implemented 
 then only the objects within the subset are deleted, not the table's entire 
 contents. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjects.ObjectsSearch(DatabaseObjects.SQL.SQLConditions)">
      <summary>
 Returns a collection of objects that match the specified search criteria. 
 This function utilises any subsets, ordering or table joins specified in this 
 collection. To add a set of conditions to the objSearchCriteria object with 
 higher precendance use the "Add(SQLConditions)" overloaded as this will wrap 
 the conditions within parentheses. 
 </summary>
 
 <param name="objSearchCriteria">
 The criteria to search for within this collection. To add set a of conditions with 
 with higher precendance use the "Add(SQLConditions)" overloaded function as this 
 will wrap the conditions within parentheses. 
 </param>
 
 <returns><see cref="Collections.IList" />	(System.Collections.IList)</returns>
 
 <remarks>
 The following wildcard characters are used when using the LIKE operator (extract 
 from Microsoft Transact-SQL Reference): 
 
 <table width="659" border="1" cellspacing="1" cellpadding="4">
   <tr>
     <th width="16%" height="20">Wildcard character</th>
     <th width="22%">Description</th>
     <th width="62%">Example</th>
   </tr>
   <tr>
     <td>%</td>
     <td>Any string of zero or more characters.</td>
     <td>WHERE title LIKE '%computer%' finds all book titles with the word 
         'computer' anywhere in the book title.</td>
   </tr>
   <tr>
     <td>_ (underscore)</td>
     <td>Any single character.</td>
     <td>WHERE au_fname LIKE '_ean' finds all four-letter first names that end 
       with ean (Dean, Sean, and so on).</td>
   </tr>
 </table>
 </remarks>
 
 <example>
 <code>
 Public Function Search(ByVal objSearchCriteria As Object, ByVal eType As SearchType) As IList 
 
     Dim objConditions As SQL.SQLConditions = New SQL.SQLConditions 
 
     Select Case eType 
         Case SearchType.DescriptionPrefix 
             objConditions.Add("ProductName", SQL.ComparisonOperator.Like, objSearchCriteria &amp; "%") 
         Case SearchType.Description 
             objConditions.Add("ProductName", SQL.ComparisonOperator.Like, "%" &amp; objSearchCriteria &amp; "%") 
     End Select 
 
     Return MyBase.ObjectsSearch(objConditions) 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.DistinctFieldAutoIncrements">
      <summary>
 Should return whether the Distinct field as specified in the 
 associated collection's DatabaseObject.DistinctField is an identity (SQL Server) 
 or auto number (Microsoft Access) field. If set to true, then the 
 DatabaseObject.DistinctValue value is set when a new object is saved. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function DistinctFieldAutoIncrements() As Boolean 
 
     Return True 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.DistinctFieldName">
      <summary>
 Should return the field name that uniquely identifies each object 
 within the collection. Typically, this is the field name of an identity or auto 
 increment field. If the DatabaseObjects.SubSet function has been implemented 
 then the DistinctFieldName need only be unique within the subset not the 
 entire table. The DistinctFieldName and KeyFieldName can be identical. This 
 function should almost always be implemented. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function DistinctFieldName() As String 
 
     Return "ProductID" 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.ItemInstance">
      <summary>
 Should return an instance of the class that is associated with this 
 collection of objects. The associated class must implement the IDatabaseObject 
 interface. Typically, a DatabaseObject (implements IDatabaseObject) instance is 
 returned from this function. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function ItemInstance() As IDatabaseObject 
 
     Return New Product 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.KeyFieldName">
      <summary>
 This property should return the field name that uniquely identifies each object 
 within the collection. As opposed to the ordinal/index position, the key field 
 provides another method of accessing a particular object within the collection. 
 The key field must be unique within the collection. If the DatabaseObjects.Subset 
 function has been implemented then the key field only needs to be unique within 
 the specified subset, not the entire table. Implementing this function is optional. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function KeyFieldName() As String 
 
     Return "ProductCode" 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.OrderBy">
      <summary>
 Should return an SQLSelectOrderByFields object containing the list 
 of fields the collection will be sorted by. Just as with an SQL statement, the 
 order of the fields added to the collection indicates the group sorting. If 
 DatabaseObjects.TableJoins has been implemented then fields from the adjoining 
 table or tables can be utilized. The sort order is used by the ObjectByOrdinal, 
 ObjectByOrdinalFirst and ObjectsSearch functions. Implementing this function is 
 optional. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function OrderBy() As SQL.SQLSelectOrderByFields 
 
     OrderBy = New SQL.SQLSelectOrderByFields 
     OrderBy.Add("ProductCode", SQL.OrderBy.Ascending) 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.Subset">
      <summary>
 Should return the conditions that define the collection's subset. 
 If the collection should include the entire table then this function should be 
 left blank. Implementing this function is optional. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function Subset() As SQL.SQLConditions 
 
     Dim objConditions As New SQL.SQLConditions 
 
     'Only include products that are in group ID 1234 
     objConditions.Add("GroupID", SQL.ComparisonOperator.EqualTo, 1234) 
 
     Return objConditions 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.TableJoins(DatabaseObjects.SQL.SQLSelectTable,DatabaseObjects.SQL.SQLSelectTables)">
      <summary>
 Should return an SQLSelectTableJoins object containing the table 
 or tables to be joined to the primary table. This function is useful in 
 optimising database loading speeds by allowing multiple tables to be joined into 
 one data set. The resultant data set can then be used to load 
 objects from the associated tables avoiding subsequent SQL calls. For a complete 
 example, see the demonstration program. Implementing this function is optional. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function TableJoins(ByVal objPrimaryTable As SQL.SQLSelectTable, ByVal objTables As SQL.SQLSelectTables) As SQL.SQLSelectTableJoins 
 
     'Implementing this function is optional, but is useful when attempting to optimise loading speeds. 
     'This function is used by the ObjectsList, Object, ObjectByKey, ObjectOrdinal and ObjectSearch functions. 
     'If this function has been implemented Search can also search fields in the joined table(s). 
     'In this example, the Products table will always be joined with the Supplier table. We could also join the Products 
     'table to the Category table, however the Product.Category property is not used often enough to warrant 
     'always joining the category table whenever loading a product. Of course, you can always join different 
     'tables in different situations, for example you might want join to other tables when searching and to 
     'not join other tables in normal circumstances. 
 
     Dim objTableJoins As SQL.SQLSelectTableJoins = New SQL.SQLSelectTableJoins 
 
     With objTableJoins.Add(objPrimaryTable, SQL.SQLSelectTableJoin.Type.Inner, objTables.Add("Suppliers")) 
         .Where.Add("SupplierID", SQL.ComparisonOperator.EqualTo, "SupplierID") 
     End With 
 
     With objTableJoins.Add(objPrimaryTable, SQL.SQLSelectTableJoin.Type.Inner, objTables.Add("Categories")) 
         .Where.Add("CategoryID", SQL.ComparisonOperator.EqualTo, "CategoryID") 
     End With 
 
     Return objTableJoins 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjects.TableName">
      <summary>
 Should return the name of the table associated with this collection. 
 This function should almost always be implemented. 
 </summary>
 
 <example>
 <code>
 Protected Overrides Function TableName() As String 
 
     Return "Products" 
 
 End Function 
 </code>
 </example></member>
    <member name="T:DatabaseObjects.DatabaseObjectsEnumerable">
      <summary>
 This class is identical to DatabaseObjects except that it implements the 
 IEnumerable interface, therefore providing support for the "For Each" construct. 
 If IEnumerable is not required then inherit from DatabaseObjects. Generally, 
 inheriting from DatabaseObjectsEnumerable is preferable to DatabaseObjects as it 
 generates simpler and more readable code. 
 </summary>
    </member>
    <member name="T:DatabaseObjects.DatabaseObjectsVolatile">
      <summary>
 This class extends DatabaseObjects by storing all objects associated with this 
 DatabaseObjects collection in memory. Any objects added via VolatileObjectAdd 
 or VolatileObjectDelete only affect the memory list until VolatileObjectsSave() is 
 called. VolatileObjectsSave will actually delete all objects in the database 
 and then save all objects in the memory list to the database. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectsVolatile.#ctor(DatabaseObjects.Database)">
      <summary>
 Initializes a new DatabaseObjects with it's associated database. 
 </summary>
 
 <param name="objDatabase">
 The database that this collection is associated with. 
 </param></member>
    <member name="M:DatabaseObjects.DatabaseObjectsVolatile.#ctor(DatabaseObjects.Database,System.Object)">
      <summary>
 Initializes a new DatabaseObjects with it's associated database. 
 </summary>
 
 <param name="objDatabase">
 The database that this collection is associated with. 
 </param>
 
 <param name="objParent">
 The parent collection that this collection is associated with. This is often 
 useful so that the SubSet property can use the Parent to filter 
 by a particular value pertinent to the parent object. Using the object 
 is optional. 
 </param></member>
    <member name="P:DatabaseObjects.DatabaseObjectsVolatile.Parent">
      <summary>
 Returns the parent object that this collection is associated with. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectsVolatile.VolatileObjectAdd(DatabaseObjects.IDatabaseObject)">
      <summary>
 Adds an item to the in-memory list, and flags the item to be saved to the database 
 when VolatileObjectsSave() is called. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObjectsVolatile.VolatileObjectByOrdinal(System.Int32)">
      <summary>
 Returns an item at the specific index in the in-memory list. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectsVolatile.VolatileObjectDelete(DatabaseObjects.IDatabaseObject)">
      <summary>
 Removes the item from the in-memory list, and flags the item to be deleted when 
 VolatileObjectsSave() is called. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectsVolatile.VolatileObjectsSave">
      <summary>
 Firstly, all items flagged for deletion (via VolatileObjectDelete) are deleted 
 in the database. 
 Secondly, all items that have been added to the in-memory list (via VolatileObjectAdd) 
 are added/saved to the database. 
 </summary>
 
 <example>
 <code>
 Friend Sub SaveAll() 
 
     Mybase.VolatileObjectsSave() 
 
 End Sub 
 </code>
 </example></member>
    <member name="P:DatabaseObjects.DatabaseObjectsVolatile.VolatileObjectsCount">
      <summary>
 Returns the number of items in the in-memory list. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectsVolatile.VolatileObjectsEnumerator">
      <summary>
 Returns the enumerator for all objects currently in the in-memory list. 
 </summary>
    </member>
    <member name="T:DatabaseObjects.DatabaseObjectUsingAttributes">
      <summary>
 This class is identical to DatabaseObject except that rather than using the 
 LoadFields and SaveFields the properties are automatically set and retrieved 
 using the FieldMappingAttribute attribute. If necessary, the LoadFields and 
 SaveFields functions can still be overridden and the MyBase.LoadFields and 
 MyBase.SaveFields functions explicity called to load the database fields 
 that have been marked with the FieldMappingAttribute attribute. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectUsingAttributes.#ctor(DatabaseObjects.DatabaseObjects)">
      <summary>
 Initializes a new DatabaseObject with the parent collection that this object is 
 associated with. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectUsingAttributes.LoadFields(DatabaseObjects.SQL.SQLFieldValues)">
      <summary>
 Sets the properties and fields marked with the FieldMappingAttribute with the 
 values from the database record. Properties or fields that are an enum data 
 type are automatically converted from the database integer value to the equivalent 
 enum. For properties and fields marked with the FieldMappingObjectHookAttribute 
 the property's or field's object is also traversed for properties or fields marked 
 with the FieldMappingAttribute. 
 </summary>
 <example>
 <code>
 
 &lt;DatabaseObjects.FieldMapping("Name")&gt; _ 
 Private pstrName As String 
 
 OR 
 
 &lt;DatabaseObjects.FieldMapping("Name")&gt; _ 
 Public Property Name() As String 
     Get 
 
         Return pstrName 
 
     End Get 
 
     Set(ByVal Value As String) 
 
         pstrName = Value 
 
     End Set 
 
 End Property 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.DatabaseObjectUsingAttributes.SaveFields">
      <summary>
 Gets the values from the properties and fields marked with the FieldMappingAttribute 
 to be saved to the database. Properties or fields that return an enum data type are 
 automatically converted from the enum to the equivalent integer value for database 
 storage. For properties and fields marked with the FieldMappingObjectHookAttribute 
 the property's or field's object is also traversed for properties or fields marked 
 with the FieldMappingAttribute. 
 </summary>
 <example>
 <code>
 
 &lt;DatabaseObjects.FieldMapping("Name")&gt; _ 
 Private pstrName As String 
 
 OR 
 
 &lt;DatabaseObjects.FieldMapping("Name")&gt; _ 
 Public Property Name() As String 
     Get 
 
         Return pstrName 
 
     End Get 
 
     Set(ByVal Value As String) 
 
         pstrName = Value 
 
     End Set 
 
 End Property 
 </code>
 </example></member>
    <member name="T:DatabaseObjects.DatabaseObjectUsingAttributesLockable">
      <summary>
 Extends the capabilities of the DatabaseObjectUsingAttributes by providing a set of routines 
 that lock and unlock this object for exclusive access for a particular user. 
 When Lock() is called a record is written to the lock table which includes the 
 object's associated table name, the object's distinct value and the user ID 
 specified in the DatabaseObjectLockController. When Unlock() is called this 
 record is deleted. If another or the current user has locked the object then the 
 IsLocked property will return true. 
 The DatabseObjects library does not inhibit the loading and/or saving of any 
 locked objects. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObjectUsingAttributesLockable.IsLocked">
      <summary>
 Indicates whether the current object is Locked either by the current user or 
 another user. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObjectUsingAttributesLockable.LockedByUserID">
      <summary>
 Returns the user identifier that currently has the object locked. Throws an 
 exception if the object is not locked by a user. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectUsingAttributesLockable.Lock">
      <summary>
 Locks the current object. Throws an exception if the object is already locked. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.DatabaseObjectUsingAttributesLockable.UnLock">
      <summary>
 UnLocks the current object. Throws an exception if the object is not locked. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.DatabaseObjectUsingAttributesLockable.IsLockedByCurrentUser">
      <summary>
 Returns whether the current user has the object locked. 
 </summary>
    </member>
    <member name="T:DatabaseObjects.IDatabaseObject">
      <summary>
 An IDatabaseObject object represents a single record in a database table. The 
 Database class provides the facility for classes implementing IDatabaseObject to 
 copy data to and from the associated database record. Rather than directly 
 implementing IDatabaseObject inherit from DatabaseObject as the DatabaseObject 
 class provides the basic "plumbing" code required by IDatabaseObjects. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.IDatabaseObject.IsSaved">
      <summary>
 Should return whether the object has been saved to the database. Generally, 
 this is implemented using a private variable that stores the object's saved state. 
 If a new object is saved or an existing object is loaded then this property 
 is automatically set to true by the library. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.IDatabaseObject.DistinctValue">
      <summary>
 Should return the distinct value that uniquely identifies this 
 object in the database. If a new object is saved (which uses an auto increment 
 field) or an existing object is loaded then this property is automatically 
 set by the library. 
 Typically, this is the value of an identity or auto increment database field. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.IDatabaseObject.LoadFields(DatabaseObjects.SQL.SQLFieldValues)">
      <summary>
 This subroutine should copy the database fields from objFields to the object's 
 variables. objFields is populated with all of the fields from the associated record. 
 </summary>
 
 <example>
 <code>
 Protected Sub LoadFields(ByVal objFields As SQL.SQLFieldValues) Implements IDatabaseObject.LoadFields 
 
     pstrCode = objFields("ProductCode").Value 
     pstrDescription = objFields("ProductDescription").Value 
 
 End Sub 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.IDatabaseObject.SaveFields">
      <summary>
 Should return an SQLFieldValues object populated with the 
 fields to be written to the database. The first argument of the SQLFieldValues.Add 
 function is the database field name, the second is the field's value. 
 </summary>
 
 <example>
 <code>
 Protected Function SaveFields() As SQL.SQLFieldValues Implements IDatabaseObject.SaveFields 
 
     SaveFields = New SQL.SQLFieldValues 
     SaveFields.Add("ProductCode", pstrCode) 
     SaveFields.Add("ProductDescription", pstrDescription) 
 
 End Function 
 </code>
 </example></member>
    <member name="T:DatabaseObjects.IDatabaseObjects">
      <summary>
 An IDatabaseObjects object represents either a database table or a sub set of a 
 database table. The Database class provides the facility for classes implementing 
 IDatabaseObjects to specify the database table the class is bound to, how to 
 identify each unique record within the table (or subset), how the table should 
 be sorted and table joins (in order to improve performance). Rather than 
 directly implementing IDatabaseObjects inherit from DatabaseObjects 
 as the DatabaseObjects class provides the basic "plumbing" code required by 
 IDatabaseObjects. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.IDatabaseObjects.ItemInstance">
      <summary>
 Should return an instance of the class that is associated with this 
 collection of objects. The associated class must implement the IDatabaseObject interface. 
 </summary>
 
 <example>
 <code>
 Protected Function ItemInstance() As IDatabaseObject Implements IDatabaseObjects.ItemInstance 
 
     Return New Product 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.IDatabaseObjects.Subset">
      <summary>
 Should return the conditions that define the collection's subset. 
 If the collection should include the entire table then this function should be 
 left blank. Implementing this function is optional. 
 </summary>
 
 <example>
 <code>
 Protected Function Subset() As SQL.SQLConditions Implements IDatabaseObjects.Subset 
 
     Dim objConditions As New SQL.SQLConditions 
 
     'Only include products that are in group ID 1234 
     objConditions.Add("GroupID", SQL.ComparisonOperator.EqualTo, 1234) 
 
     Return objConditions 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.IDatabaseObjects.TableName">
      <summary>
 Should return the name of the table associated with this collection. 
 This function should almost always be implemented. 
 </summary>
 
 <example>
 <code>
 Protected Function TableName() As String Implements IDatabaseObjects.TableName 
 
     Return "Products" 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.IDatabaseObjects.KeyFieldName">
      <summary>
 This property should return the field name that uniquely identifies each object 
 within the collection. As opposed to the ordinal/index position, the key field 
 provides another method of accessing a particular object within the collection. 
 The key field must be unique within the collection. If the IDatabaseObjects.Subset 
 function has been implemented then the key field only needs to be unique within 
 the specified subset, not the entire table. Implementing this function is optional. 
 </summary>
 
 <example>
 <code>
 Protected Function KeyFieldName() As String Implements IDatabaseObjects.KeyFieldName 
 
     Return "ProductCode" 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.IDatabaseObjects.DistinctFieldName">
      <summary>
 Should return the field name that uniquely identifies each object 
 within the collection. Typically, this is the field name of an identity or auto 
 increment field. If the IDatabaseObjects.SubSet function has been implemented 
 then the DistinctFieldName need only be unique within the subset not the 
 entire table. The DistinctFieldName and KeyFieldName can be identical. This 
 function should almost always be implemented. 
 </summary>
 
 <example>
 <code>
 Protected Function DistinctFieldName() As String Implements IDatabaseObjects.DistinctFieldName 
 
     Return "ProductID" 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.IDatabaseObjects.DistinctFieldAutoIncrements">
      <summary>
 Should return whether the Distinct field as specified in the 
 associated collection's IDatabaseObject.DistinctField is an identity (SQL Server) 
 or autonumber (Microsoft Access) field. If set to true, then the 
 IDatabaseObject.DistinctValue value is set when a new object is saved. 
 </summary>
 
 <example>
 <code>
 Protected Function DistinctFieldAutoIncrements() As Boolean Implements IDatabaseObjects.DistinctFieldAutoIncrements 
 
     Return True 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.IDatabaseObjects.OrderBy">
      <summary>
 Should return an SQLSelectOrderByFields object containing the list 
 of fields the collection will be sorted by. Just as with an SQL statement, the 
 order of the fields added to the collection indicates the group sorting. If 
 IDatabaseObjects.TableJoins has been implemented then fields from the adjoining 
 table or tables can be utilized. The sort order is used by the ObjectByOrdinal, 
 ObjectByOrdinalFirst and ObjectsSearch functions. Implementing this function is 
 optional. 
 </summary>
 
 <example>
 <code>
 Protected Function OrderBy() As SQL.SQLSelectOrderByFields Implements IDatabaseObjects.OrderBy 
 
     OrderBy = New SQL.SQLSelectOrderByFields 
     OrderBy.Add("ProductCode", SQL.OrderBy.Ascending) 
 
 End Function 
 </code>
 </example></member>
    <member name="M:DatabaseObjects.IDatabaseObjects.TableJoins(DatabaseObjects.SQL.SQLSelectTable,DatabaseObjects.SQL.SQLSelectTables)">
      <summary>
 Should return an SQLSelectTableJoins object containing the table 
 or tables to be joined to the primary table. This function is useful in 
 optimising database loading speeds by allowing multiple tables to be joined into 
 one data set. The resultant data set can then be used to load 
 objects from the associated tables avoiding subsequent SQL calls. For a complete 
 example, see the demonstration program. Implementing this function is optional. 
 </summary>
 
 <example>
 <code>
 Protected Function TableJoins(ByVal objPrimaryTable As SQL.SQLSelectTable, ByVal objTables As SQL.SQLSelectTables) As SQL.SQLSelectTableJoins Implements IDatabaseObjects.TableJoins 
 
     'Implementing this function is optional, but is useful when attempting to optimise loading speeds. 
     'This function is used by the ObjectsList, Object, ObjectByKey, ObjectOrdinal and ObjectSearch functions. 
     'If this function has been implemented Search can also search fields in the joined table(s). 
     'In this example, the Products table will always be joined with the Supplier table. We could also join the Products 
     'table to the Category table, however the Product.Category property is not used often enough to warrant 
     'always joining the category table whenever loading a product. Of course, you can always join different 
     'tables in different situations, for example you might want join to other tables when searching and to 
     'not join other tables in normal circumstances. 
 
     Dim objTableJoins As SQL.SQLSelectTableJoins = New SQL.SQLSelectTableJoins 
 
     With objTableJoins.Add(objPrimaryTable, SQL.SQLSelectTableJoin.Type.Inner, objTables.Add("Suppliers")) 
         .Where.Add("SupplierID", SQL.ComparisonOperator.EqualTo, "SupplierID") 
     End With 
 
     With objTableJoins.Add(objPrimaryTable, SQL.SQLSelectTableJoin.Type.Inner, objTables.Add("Categories")) 
         .Where.Add("CategoryID", SQL.ComparisonOperator.EqualTo, "CategoryID") 
     End With 
 
     Return objTableJoins 
 
 End Function 
 </code>
 </example></member>
    <member name="T:DatabaseObjects.IGlobalDatabaseObjects">
      <summary>
 The IGlobalDatabaseObjects interface aids in maintaining a class library's 
 abstraction layer when external objects (objects outside of the class library) 
 need to be used. For example, if we had two DLL class libraries, the first an 
 Inventory class library that exposes, amongst other classes a collection of 
 Product objects and the second library needs to use the Product objects provided 
 by the Inventory library. In particular, it needs to be able to store and load a 
 Product using it's distinct value (ProductID). So, rather than exposing a public 
 function in the Inventory library to load a Product using it's distinct value 
 (ProductID) the Products class can implement the IGlobalDatabaseObjects interface. 
 Implementing this interface allows a product to be loaded from it's distinct value 
 without exposing a public function - thereby maintaining a degree of abstraction 
 between the two dlls. Conversely, the product's distinct value (ProductID) can 
 be extracted by calling DirectCast(objProduct, IDatabaseObject).DistinctValue. 
 An example of using an external DLL that implements IGlobalDatabaseObjects: 
 Dim objProduct As Product = DirectCast(objProducts, IGlobalDatabaseObjects).Object(1234) 
 </summary>
    </member>
    <member name="M:DatabaseObjects.IGlobalDatabaseObjects.Object(System.Object)">
      <summary>
 Should return the object in the collection for the distinct value 
 argument. 
 </summary>
    </member>
    <member name="T:DatabaseObjects.ObjectReference">
      <summary>
 This class can be used to simplify the process of creating and returning late-bound 
 IDatabaseObject or DatabaseObject objects. This is is particularly useful in speeding 
 up load times of referenced objects by delaying loading the associated object or 
 objects until the property or method is actually called. This is opposed to loading 
 the object when the container object is loaded. 
 The object is loaded only on the first call to the Object property. 
 Subsequent calls to the Object property return the already loaded object. 
 If pobjDistinctValue is nothing (0 if an integer or "" if a string) then the Object 
 property will always return Nothing. Similarly if the default constructor is called 
 then the Object property will always return Nothing. 
 If IfNothingUseObjectByOrdinalFirst is true and the distinct value is nothing then the 
 first item in the collection will be returned. 
 </summary>
    </member>
    <member name="M:DatabaseObjects.ObjectReference.#ctor">
      <summary>
 If this constructor is used then the Object property will always return Nothing 
 which is useful for a new object that should always return Nothing for the associated object 
 </summary>
    </member>
    <member name="M:DatabaseObjects.ObjectReference.#ctor(DatabaseObjects.DatabaseObjects,System.Object,System.Boolean)">
      <summary>
 Initializes the object reference with the distinct value of the object reference 
 and the collection that contains the object reference. The object is not loaded 
 by the constructor - only when the Object property is called. 
 </summary>
 <param name="objCollection">
 The collection that contains the referenced object. The class' Mybase.Object 
 function is called to load the object. 
 </param>
 <param name="objDistinctValue">
 The distinct value (usually an identity or auto increment value) that identifies 
 the referenced object. 
 </param>
 <param name="bIfNothingUseObjectByOrdinalFirst">
 If the distinct value is nothing (0 if an integer or "" if a string) then the 
 ObjectByOrdinalFirst function is used to load the default object when the Object 
 function is first called. Subsequent calls return the already loaded object. 
 </param></member>
    <member name="M:DatabaseObjects.ObjectReference.#ctor(DatabaseObjects.Database,DatabaseObjects.IDatabaseObjects,System.Object,System.Boolean)">
      <summary>
 Initializes the object reference with the distinct value of the object reference 
 and the collection that contains the object reference. The object is not loaded 
 by the constructor - only when the Object property is called. 
 </summary>
 <param name="objCollection">
 The collection that contains the referenced object. The class' MyBase.Object 
 function is called to load the object. 
 </param>
 <param name="objDistinctValue">
 The distinct value (usually an identity or auto increment value) that identifies 
 the referenced object. 
 </param>
 <param name="bIfNothingUseObjectByOrdinalFirst">
 If the distinct value is nothing (0 if an integer or "" if a string) then the 
 ObjectByOrdinalFirst function is used to load the default object when the Object 
 function is first called. Subsequent calls return the already loaded object. 
 </param></member>
    <member name="P:DatabaseObjects.ObjectReference.Object">
      <summary>
 Sets/returns the referenced object. 
 When getting the value of this property on the first call the associated object 
 is loaded. If bIfNothingUseObjectByOrdinalFirst is true and the DistinctValue is 
 nothing then the default object is loaded. 
 Subsequent get calls will not load the object but return the already loaded object. 
 </summary>
    </member>
    <member name="P:DatabaseObjects.ObjectReference.DistinctValue">
      <summary>
 This property can be used when saving the distinct value associated with this object 
 The Me.Object.DistinctValue could be used but this could cause an unnecessary loading 
 of the associated object when saving if the 'Property Get Object' hadn't been called 
 while the object was loaded. 
 </summary>
 <example>
 <code>
 
 Private pobjGroup As New ObjectReference 
 
 &lt;DatabaseObjects.FieldMapping("ProductGroupID")&gt; _ 
 Private Property GroupID() As Integer 
     Get 
 
         Return pobjGroup.DistinctValue 
 
     End Get 
 
     Set(ByVal Value As Integer) 
 
         pobjGroup = New ObjectReference(ProductGroups, Value) 
 
     End Set 
 End Property 
 </code>
 </example></member>
    <member name="P:DatabaseObjects.ObjectReference.ObjectIsNothing">
      <summary>
 This property can be used when saving the object. Me.Object Is nothing could be 
 used but this could cause an unnecessary loading of the associated object when 
 saving if the 'Property Get Object' hadn't been called while the object was loaded. 
 If this property is true then DistinctValue will be either 0 or "" (depending 
 on the data type of the distinct value passed to the constructor). 
 </summary>
    </member>
    <member name="T:DatabaseObjects.SQL.DataType">
      <summary>
 Provides a set of uniform and portable data types that can be used between 
 Microsoft Access, SQLServer and MySQL. Please refer to the DataTypeString 
 function in the Source\SQL\SQLTable.vb file for the actual SQL equivalents for 
 each database. 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.TinyInteger">
      <summary>
 Integer data from 0 through 255 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.SmallInteger">
      <summary>
 Integer data from 2^15 (-32,768) through 2^15 - 1 (32,767) 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Integer">
      <summary>
 Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647) 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.BigInteger">
      <summary>
 Integer (whole number) data from -2^63 (-9223372036854775808) through 2^63-1 (9223372036854775807) 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Character">
      <summary>
 SQLServer limitation: Fixed-length non-Unicode character data with a maximum length of 8,000 characters 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.UnicodeCharacter">
      <summary>
 SQLServer limitation: Fixed-length Unicode data with a maximum length of 4,000 characters 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.VariableCharacter">
      <summary>
 SQLServer limitation: Variable-length non-Unicode data with a maximum of 8,000 characters 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.UnicodeVariableCharacter">
      <summary>
 SQLServer limitation: Variable-length Unicode data with a maximum length of 4,000 characters 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Decimal">
      <summary>
 Fixed precision and scale numeric data. 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Real">
      <summary>
 Floating precision number data from -3.40E + 38 through 3.40E + 38. Equivalent 
 to VB.NET Single data type. The MySQL equivalent used is FLOAT. 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Float">
      <summary>
 Floating precision number data from -1.79E + 308 through 1.79E + 308. Equivalent 
 to .NET Double data type. The MySQL equivalent used is DOUBLE. 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.SmallMoney">
      <summary>
 Monetary data values from -214,748.3648 through +214,748.3647, with accuracy to a 
 ten-thousandth of a monetary unit. The MySQL equivalent used is DECIMAL(10,4). 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Money">
      <summary>
 Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 - 1 
 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit. 
 The MySQL equivalent used is DECIMAL(19,4). 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Boolean">
      <summary>
 Integer data with either a 1 or 0 value 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.SmallDateTime">
      <summary>
 SQL Server: Date and time data from January 1, 1900, through June 6, 2079, with 
 an accuracy of one minute. This data type for Access and MySQL is equivalent to 
 DATETIME. 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.DateTime">
      <summary>
 Date and time data from January 1, 1753, through December 31, 9999, with an 
 accuracy of three-hundredths of a second, or 3.33 milliseconds. This is a SQLServer 
 limitation. MySQL supports '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. To 
 provide portability, accuracy to only 1 second can be assumed. 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.TimeStamp">
      <summary>
 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Text">
      <summary>
 Variable-length non-Unicode data with a maximum length of 2^31 - 1 (2,147,483,647) characters 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.UnicodeText">
      <summary>
 Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Binary">
      <summary>
 SQLServer limitation: Fixed-length binary data with a maximum length of 8,000 bytes 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.VariableBinary">
      <summary>
 SQLServer limitation: Variable-length binary data with a maximum length of 8,000 bytes 
 </summary>
    </member>
    <member name="F:DatabaseObjects.SQL.DataType.Image">
      <summary>
 Variable-length binary data with a maximum length of 2^31 - 1 (2,147,483,647) bytes 
 </summary>
    </member>
    <member name="P:DatabaseObjects.SQL.SQLStatement.DefaultConnectionType">
      <summary>
 This is used as the default connection type when manually instantiating a 
 SQLSelect, SQLDelete, SQLUpdate or SQLInsert command (which all inherit from 
 SQLStatement) and is set by the last Database.Connect function's ConnectionType 
 argument. However, the Database class does not rely on this property as the 
 ConnectionType property is set before any SQL statements are executed. This 
 allows different Database instances to use different databases. 
 </summary>
    </member>
    <member name="T:DatabaseObjects.SQL.SQLTableExists">
      <summary>
 This class can be used to determine whether a table exists. This class can be 
 used will all databases. If after running the SQL statement the data set is not 
 empty then the table exists. 
 </summary>
    </member>
  </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions