The DatabaseObjectsEnumerable<(Of <(<'T>)>)> type exposes the following members.

Constructors

  Name Description
Protected method DatabaseObjectsEnumerable<(Of <(<'T>)>)>(Database)
Initializes a new DatabaseObjects with it's associated database.
Protected method DatabaseObjectsEnumerable<(Of <(<'T>)>)>(DatabaseObject)
Initializes a new DatabaseObjects with it's associated parent object. The Parent property can be used to access the parent variable passed into this constructor.
Protected method DatabaseObjectsEnumerable<(Of <(<'T>)>)>(RootContainer)
Initializes with it the associated root container and database.

Methods

  Name Description
Protected method DistinctFieldAutoAssignment
Should return whether the Distinct field as specified in the associated collection's DatabaseObject.DistinctField is an identity field (Autonumber in Microsoft Access) or is a unique identifier field. If set to either value then the IDatabaseObject.DistinctValue value is automatically set when a new object is saved.
(Inherited from DatabaseObjects.)
Protected method DistinctFieldAutoIncrements Obsolete.
Should return whether the Distinct field as specified in the associated collection's DatabaseObject.DistinctField is an identity field (Autonumber in Microsoft Access). If set to true, then the DatabaseObject.DistinctValue value is set when a new object is saved.
(Inherited from DatabaseObjects.)
Protected method DistinctFieldName
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.
(Inherited from DatabaseObjects.)
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method 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.)
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method ItemInstance
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.
(Inherited from DatabaseObjects.)
Protected method ItemInstance_
Should return an instance of the class that is associated with this collection of objects. This is the generic version of the ItemInstance function. It is suffixed with an underscore so that it does not conflict with the underlying non-generic equivalent ItemInstance function. It's purpose is indentical to the non-generic version. If this function is not overriden an object of type T will be created. The type T must have a default constructor or a constructor that accepts a type of DatabaseObjects.Generic.DatabaseObjects or a subclass.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method KeyFieldName
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.
(Inherited from DatabaseObjects.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected method Object
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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectByKey
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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectByKeyIfExists
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. Returns Nothing/null if the object does exist with the specified key. This feature is what differentiates DatabaseObjects.ObjectByKey() from DatabaseObjects.ObjectByKeyExists().
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectByOrdinalFirst
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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectByOrdinalLast
Returns the last 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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectDelete(T%)
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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectDelete(IDatabaseObject%)
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.
(Inherited from DatabaseObjects.)
Protected method ObjectExists
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.
(Inherited from DatabaseObjects.)
Protected method ObjectExistsByDistinctValue
Returns whether an object exists for the specified distinct value in the collection.
(Inherited from DatabaseObjects.)
Protected method ObjectFieldValues
Returns the database fields for 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. This is typically used to interogate the database fields before loading the object with a call to ObjectFromFieldValues. This function is rarely used and generally the Object function suffices.
(Inherited from DatabaseObjects.)
Protected method ObjectFromDataReader
Loads an object from the current record of an IDataReader object.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectFromFieldValues
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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectIfExists
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. Returns Nothing/null if the distinct value does not exist in the database. This feature is what differentiates DatabaseObjects.Object() from DatabaseObjects.ObjectIfExists().
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectsArray
Returns an array of objects contained within this collection.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectSave(T)
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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectSave(IDatabaseObject)
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.
(Inherited from DatabaseObjects.)
Protected method ObjectsCount
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. Also utilises the table joins so that any filters specified on the subset can be used.
(Inherited from DatabaseObjects.)
Protected method ObjectsDeleteAll
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.
(Inherited from DatabaseObjects.)
Protected method ObjectsDictionary
Returns an Generic.Dictionary object. Each key/value pair contains a key and the object associated with the key.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectsDictionaryByDistinctValue
Returns a Generic.Dictionary object. Each key/value pair contains a distinct value and the object associated with the distinct value.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectsList
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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method ObjectsSearch
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.
(Inherited from DatabaseObjects<(Of <(<'T>)>)>.)
Protected method OrderBy
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. Should return Nothing if no ordering is required. Implementing this function is optional.
(Inherited from DatabaseObjects.)
Protected method RootContainer<(Of <<'(TRootContainer>)>>)
Returns the root container object that this object is a child of.
(Inherited from DatabaseObjects.)
Protected method Subset
Should return the conditions that define the collection's subset. If the collection should include the entire table then this function should return Nothing. Implementing this function is optional.
(Inherited from DatabaseObjects.)
Protected method TableJoins
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. Should return Nothing if no table joins are required. Implementing this function is optional.
(Inherited from DatabaseObjects.)
Protected method TableName
Should return the name of the table associated with this collection. This function should almost always be implemented.
(Inherited from DatabaseObjects.)
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)

Properties

  Name Description
Protected property Parent
Returns the parent object that this collection is associated with. This property will return Nothing if the 'New(DatabaseObjects.Database)' constructor is used.
(Inherited from DatabaseObjects.)
Protected property ParentDatabase
Returns the database associated with this collection/database table.
(Inherited from DatabaseObjects.)
Protected property ParentDistinctValue
Returns the distinct value of the parent i.e. Parent.DistinctValue Throws a NullReferenceException if there is no parent.
(Inherited from DatabaseObjects.)

See Also