Update of /cvsroot/jcframework/dotnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15927 Modified Files: AFCustomAttributes.vb AFExceptions.vb AssemblyInfo.vb AtomsFramework.ndoc AtomsFramework.xml CAssociationKey.vb CAssociationTable.vb CAttributeMap.vb CBetweenCriteria.vb CCacheEntry.vb CClassMap.vb CColumnMap.vb CConnection.vb CCriteriaCondition.vb CCursor.vb CDatabaseMap.vb CDeleteCriteria.vb CEqualToCriteria.vb CGreaterThanCriteria.vb CGreaterThanOrEqualToCriteria.vb CInCriteria.vb CInjectedObject.vb CJoin.vb CLessThanCriteria.vb CLessThanOrEqualToCriteria.vb CLikeCriteria.vb CMultiRetrieveCriteria.vb CMultiSummaryCriteria.vb CNotBetweenCriteria.vb CNotEqualToCriteria.vb CNotInCrieteria.vb COID.vb COIDFactory.vb COrderEntry.vb CPersistenceBroker.vb CPersistentCollection.vb CPersistentCriteria.vb CPersistentObject.vb CRelationalDatabase.vb CResultset.vb CRetrieveCriteria.vb CSelectInCriteria.vb CSelectInListCriteria.vb CSelectionCriteria.vb CSqlStatement.vb CSummaryCriteria.vb CTableMap.vb CUDAMap.vb CUDAMapEntry.vb CXMLConfigLoader.vb IClassFactory.vb IConfigLoader.vb modAliasNull.vb modPersistenceBrokerSingleton.vb Log Message: Documentation updates Index: modAliasNull.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/modAliasNull.vb,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- modAliasNull.vb 11 Apr 2005 00:31:44 -0000 1.8 +++ modAliasNull.vb 20 May 2005 06:03:42 -0000 1.9 @@ -2,7 +2,7 @@ Option Explicit On '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Module : modAliasNull ''' '''----------------------------------------------------------------------------- @@ -223,7 +223,7 @@ ''' <remarks>The calculation is based on a period (".") and will need ''' reworking in locales where the decimal is the thousands separator and ''' a comma is used for the decimal. - ''' <para>The function is unused by the Atoms.Framework.</para></remarks> + ''' <para>The function is unused by the AtomsFramework.</para></remarks> ''' <history> ''' [rbanks] 18/12/2003 Created ''' </history> @@ -255,7 +255,7 @@ ''' <remarks>The calculation is based on a period (".") and will need ''' reworking in locales where the decimal is the thousands separator and ''' a comma is used for the decimal. - ''' <para>The function is unused by the Atoms.Framework.</para></remarks> + ''' <para>The function is unused by the AtomsFramework.</para></remarks> ''' <history> ''' [rbanks] 18/12/2003 Created ''' </history> Index: COIDFactory.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/COIDFactory.vb,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- COIDFactory.vb 11 Apr 2005 00:31:43 -0000 1.5 +++ COIDFactory.vb 20 May 2005 06:03:40 -0000 1.6 @@ -1,14 +1,14 @@ Option Explicit On '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : OIDFactory ''' '''----------------------------------------------------------------------------- ''' <summary> ''' Class used to generate object ID's ''' </summary> -''' <remarks>This class is used to generate new <see cref="T:Atoms.Framework.OID">object ids</see> +''' <remarks>This class is used to generate new <see cref="T:AtomsFramework.OID">object ids</see> ''' and manages the pool of B-values for a single session id (the A value). When the ''' pool is exhausted a new session id is retrieved and the pool is reset.</remarks> ''' <history> Index: CSelectionCriteria.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CSelectionCriteria.vb,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- CSelectionCriteria.vb 11 Apr 2005 00:31:44 -0000 1.9 +++ CSelectionCriteria.vb 20 May 2005 06:03:42 -0000 1.10 @@ -17,7 +17,7 @@ End Interface '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : SelectionCriteria ''' '''----------------------------------------------------------------------------- Index: CInjectedObject.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CInjectedObject.vb,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- CInjectedObject.vb 21 Apr 2005 23:00:28 -0000 1.28 +++ CInjectedObject.vb 20 May 2005 06:03:40 -0000 1.29 @@ -1,10 +1,25 @@ Imports System.Reflection Imports System.Runtime.Remoting -'Class to manage objects injected into the persistence broker -'These will be objects that do not inherit from the cperistentobject class, but which -'still need to be saved/retrieved from the database. - +''' ----------------------------------------------------------------------------- +''' Project : AtomsFramework +''' Class : InjectedObject +''' +''' ----------------------------------------------------------------------------- +''' <summary> +''' Class to manage objects that have been added (injected) into the persistence broker. +''' </summary> +''' <remarks>For persisting objects for classes that are not inheriting from the PersistentObject class we need a method to track and manage +''' the state of those objects. This is done through the InjectedObject class. +''' <para>The InjectedObject class acts a wrapper around a user-defined object in order to extend it's functionality and to provide meta +''' data information such as the objects class mapping, and status details.</para> +''' <para>The InjectedObject implements the IPersistableObject interface to provide a common referencing mechanism between +''' both inherited and non-inherited objects internally in the framework</para> +''' </remarks> +''' <history> +''' [rbanks] 20/05/2005 Created +''' </history> +''' ----------------------------------------------------------------------------- Public Class InjectedObject Implements IPersistableObject @@ -26,6 +41,19 @@ Private m_oneToManyCollections As New Collection 'Private m_strongReference As Object + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Creates a new InjectedObject instance to wrap aound the referenced object. + ''' </summary> + ''' <param name="obj">The object to reference</param> + ''' <remarks>When an instance is created both the ReferencedObject and OriginalObject properties are + ''' initialised. The ReferencedObject references the pass in object, while the OriginalObject is initialised + ''' with a new instance of the objects class. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Sub New(ByVal obj As Object) MyBase.New() If TypeOf obj Is IPersistableObject Then @@ -35,6 +63,17 @@ m_originalObject = Activator.CreateInstance(obj.GetType) End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' The object referenced by the InjectedObject instance. + ''' </summary> + ''' <value></value> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property ReferencedObject() As Object Get 'If m_object.IsAlive Then @@ -48,6 +87,17 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' An original copy of the object before changes were made. + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property OriginalObject() As Object Get Return m_originalObject @@ -57,11 +107,34 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Resets the current object to it's original state. + ''' </summary> + ''' <remarks>Values of the original objects properties are copied over the top of the current object, without changing any references. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Sub ResetToOriginal() ReplaceValues(m_originalObject, m_object, False) End Sub - Sub ReplaceWith(ByVal obj As IPersistableObject, ByVal copyEventHandlers As Boolean) Implements IPersistableObject.ReplaceWith + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Replaces the current object with the referenced object + ''' </summary> + ''' <param name="obj">The object to get values from</param> + ''' <param name="copyEventHandlers">Flag to indicate wether any EventHandlers should be copied as well.</param> + ''' <remarks>Replaces the values of the ReferencedObject with the values from the passed in object. If copyEventHandlers is True then + ''' any eventlisteners for the passed in object are also wired up to the ReferencedObject. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- + Public Sub ReplaceWith(ByVal obj As IPersistableObject, ByVal copyEventHandlers As Boolean) Implements IPersistableObject.ReplaceWith If Not obj.GetObjectType Is Me.GetObjectType Then Throw New AtomsFrameworkException("Objects must be of the same type") End If @@ -74,6 +147,24 @@ End If End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Copies the property values of one object to another via reflection + ''' </summary> + ''' <param name="source">The source object</param> + ''' <param name="target">The target object</param> + ''' <param name="copyEventHandlers">Indicates if event handlers should also be copied.</param> + ''' <remarks>Objects must be of the same type, or the source object must be a subclass of the target object. + ''' <para>Copies all public, instance and private fields and properties from the source object to the target object using reflection. + ''' If the copyEventHandlers parameter is True then any EventHandlers listening to events on the source object will also listen + ''' to events on the Target object (they are wired up).</para> + ''' <para>If the object contains any IList or IDictionary based collections then those collections are also copied. Note that this copy + ''' is not a shallow reference only copy, but a deep copy so that the two collections can be updated independantly.</para> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Shared Sub ReplaceValues(ByVal source As Object, ByVal target As Object, ByVal copyEventHandlers As Boolean) 'Use reflection to copy all of the fields from sourceObj to targetobject (by value) If source Is Nothing OrElse target Is Nothing Then Return @@ -115,6 +206,17 @@ End Try End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Obtain a class map for the ReferencedObject. + ''' </summary> + ''' <returns>A class map for the referenced object</returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetClassMap() As ClassMap Implements IPersistableObject.getClassMap 'Dim tmpCMap As ClassMap If m_classmap Is Nothing Then @@ -143,6 +245,17 @@ Return m_classmap End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Gets the Type for the ReferencedObject + ''' </summary> + ''' <returns>A Type object for the ReferencedObject</returns> + ''' <remarks>If the object is null (nothing) then the type returned is System.Object. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetObjectType() As Type Implements IPersistableObject.GetObjectType If m_object Is Nothing Then 'OrElse Not m_object.IsAlive Then Return GetType(Object) @@ -150,6 +263,19 @@ Return m_object.GetType End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Gets the value for a particular attribute of an object + ''' </summary> + ''' <param name="obj">The object to process. Can be in "a.b" format if desired</param> + ''' <param name="name">The attribute name (property name)</param> + ''' <returns>An object or nothing</returns> + ''' <remarks>Uses the CallByName method to get the value for a property of the object. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Shared Function GetValueByAttribute(ByVal obj As Object, ByVal name As String) As Object Dim dotPos As Integer dotPos = name.IndexOf(".") @@ -169,14 +295,46 @@ End If End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Gets the value for the name attribute from the ReferencedObject + ''' </summary> + ''' <param name="name">The attribute name (property name)</param> + ''' <returns>An object or nothing</returns> + ''' <remarks>Uses the CallByName method to get the value for a property of the object. + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetValueByAttribute(ByVal name As String) As Object Implements IPersistableObject.getValueByAttribute Return GetValueByAttribute(m_object, name) End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Gets the value for the name attribute from the OriginalObject + ''' </summary> + ''' <param name="name">The attribute name (property name)</param> + ''' <returns>An object or nothing</returns> + ''' <remarks>Uses the CallByName method to get the value for a property of the object. + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> Public Function GetOriginalValueByAttribute(ByVal name As String) As Object Return GetValueByAttribute(m_originalObject, name) End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Indicates wether Associations have been loaded for the ReferencedObject + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property AssociationsLoaded() As Boolean Implements IPersistableObject.AssociationsLoaded Get If Me.GetClassMap.AssociationMapCount > 0 Then @@ -192,6 +350,17 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' The expiry interval for the InjectedObject in the Cache + ''' </summary> + ''' <returns></returns> + ''' <remarks>This is the expiry interval of the object in the persistence cache, not the Injected Object Cache. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property ExpiryInterval() As Double Implements IPersistableObject.ExpiryInterval Get Return m_cacheExpiry @@ -201,6 +370,18 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Indicates wether the object has been marked for deletion. + ''' </summary> + ''' <returns></returns> + ''' <remarks>InjectedObjects must be marked for deletion before the PersistChanges method of the PersistenceBroker is called if they are + ''' to be removed from the database. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property MarkedForDeletion() As Boolean Get Return m_markedForDeletion @@ -210,6 +391,17 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Indicates if deleting this object will also delete any of it's parent objects. + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property WillDeleteParents() As Boolean Get Return m_deleteParents @@ -219,14 +411,49 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <param name="propertyName"> </param> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetFieldLengthByName(ByVal propertyName As String) As Integer Implements IPersistableObject.getFieldLengthByName Return GetClassMap.GetAttributeMapByString(propertyName, True).ColumnMap.StorageSize() End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <param name="propertyName"> </param> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetFieldTypeByName(ByVal propertyName As String) As System.Type Implements IPersistableObject.getFieldTypeByName Return GetClassMap.GetAttributeMapByString(propertyName, True).ColumnMap.StorageType End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Gets or generates a Guid for the ReferencedObject + ''' </summary> + ''' <returns>A string representation of the Guid</returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property GuidValue() As String Implements IPersistableObject.GUIDValue Get If m_guid.Equals(Guid.Empty) Then @@ -239,6 +466,20 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Check wether two objects are identical (in terms of value, not references) + ''' </summary> + ''' <param name="source">The first object</param> + ''' <param name="target">The second object</param> + ''' <returns>Boolean indicating success</returns> + ''' <remarks>Each mapped attribute in the objects are checked against each other. Success is determined when all mapped attributes + ''' are found to be equal. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function ObjectsMatch(ByVal source As Object, ByVal target As Object) As Boolean If source Is Nothing AndAlso target Is Nothing Then Return True If source Is Nothing OrElse target Is Nothing Then Return False @@ -274,6 +515,17 @@ End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Indicates that the ReferencedObject has changed and requires saving to the database. + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property IsDirty() As Boolean Implements IPersistableObject.IsDirty Get Return Not ObjectsMatch(m_object, m_originalObject) @@ -289,6 +541,17 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Inidicates if the ReferencedObject is being loaded from the database + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property IsLoading() As Boolean Implements IPersistableObject.IsLoading Get Return m_loading @@ -301,6 +564,17 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property IsQueued() As Boolean Implements IPersistableObject.IsQueued Get Return m_queued @@ -310,12 +584,34 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public ReadOnly Property IsModifyOnly() As Boolean Implements IPersistableObject.isModifyOnly Get Return GetClassMap.IsModifyOnly End Get End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property IsProxy() As Boolean Implements IPersistableObject.IsProxy Get Return m_proxy @@ -325,12 +621,34 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public ReadOnly Property IsReadOnly() As Boolean Implements IPersistableObject.isReadOnly Get Return GetClassMap.IsReadOnly End Get End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersiatableObject + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property OidValue() As String Implements IPersistableObject.OIDValue Get Dim oidfactory As ObjectIdFactory @@ -348,6 +666,17 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property Persistent() As Boolean Implements IPersistableObject.Persistent Get Return m_persistent @@ -357,6 +686,17 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns></returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property State() As PersistenceState Implements IPersistableObject.State Get Return m_state @@ -366,6 +706,18 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <param name="name"> </param> + ''' <returns> </returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetCollectionByAttribute(ByVal name As String) As IList Implements IPersistableObject.getCollectionByAttribute Return GetCollectionByAttribute(m_object, name) End Function @@ -393,6 +745,18 @@ End Try End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <param name="name"> </param> + ''' <returns> </returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetObjectByAttribute(ByVal name As String) As IPersistableObject Implements IPersistableObject.getObjectByAttribute Return GetObjectByAttribute(m_object, name) End Function @@ -433,10 +797,35 @@ Return injobj End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <param name="name"> </param> + ''' <param name="value"> </param> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Sub SetAttributeValue(ByVal name As String, ByRef value As Object) Implements IPersistableObject.setAttributeValue SetAttributeValue(m_object, name, value) End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Set the value of an attribute on an arbitrary object + ''' </summary> + ''' <param name="obj">The object to update</param> + ''' <param name="name">The attribute name (property name)</param> + ''' <param name="value">The value to set</param> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Shared Sub SetAttributeValue(ByVal obj As Object, ByVal name As String, ByRef value As Object) If TypeOf (value) Is System.DBNull Then Exit Sub @@ -501,6 +890,18 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <param name="obj"> </param> + ''' <returns> </returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Overloads Function Equals(ByVal obj As IPersistableObject) As Boolean Implements IPersistableObject.Equals Dim ck1, ck2 As CacheKey If Me Is Nothing And Not obj Is Nothing Then @@ -514,6 +915,17 @@ Return ck1.Equals(ck2) And Me.Persistent = obj.Persistent End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns> </returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function Copy() As IPersistableObject Implements IPersistableObject.Copy Dim injobj As InjectedObject injobj = Me.GetClassMap.CreateObjectInstance @@ -527,6 +939,18 @@ Return injobj End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <param name="classMap"> </param> + ''' <returns> </returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Function GetObjectByClassMap(ByVal classMap As ClassMap) As IPersistableObject Implements IPersistableObject.getObjectByClassMap Dim obj As IPersistableObject 'Dim col As IList @@ -596,6 +1020,17 @@ Return obj End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Produces a string representation of the ReferencedObject + ''' </summary> + ''' <returns>A string containing the object type and key values.</returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Overrides Function ToString() As String Dim s As String Dim i As Short @@ -647,10 +1082,32 @@ Return s End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns> </returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetSourceObject() As Object Implements IPersistableObject.GetSourceObject Return m_object End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns> </returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Overridable Function HasValidKey() As Boolean Implements IPersistableObject.HasValidKey 'Check for any non-null key attributes Dim am As AttributeMap @@ -664,6 +1121,16 @@ Return False End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Private Sub CopyOneToManyCollections() Implements IPersistableObject.CopyOneToManyCollections Dim cm As ClassMap Dim coll As Object @@ -682,6 +1149,18 @@ End While End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <param name="propertyName"> </param> + ''' <returns> </returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetRemovedCollectionItems(ByVal propertyName As String) As Collection Implements IPersistableObject.GetRemovedCollectionItems Dim iListType, iDicType As Type Dim origColl, collItem As Object @@ -762,6 +1241,17 @@ End Try End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' See IPersistableObject + ''' </summary> + ''' <returns>Always returns false for InjectedObjects</returns> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function IsIPersistentObject() As Boolean Implements IPersistableObject.IsIPersistentObject Return False End Function Index: modPersistenceBrokerSingleton.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/modPersistenceBrokerSingleton.vb,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- modPersistenceBrokerSingleton.vb 11 Apr 2005 00:31:44 -0000 1.11 +++ modPersistenceBrokerSingleton.vb 20 May 2005 06:03:42 -0000 1.12 @@ -3,7 +3,7 @@ Imports System.Reflection '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Module : modPersistenceBrokerSingleton ''' '''----------------------------------------------------------------------------- @@ -139,14 +139,14 @@ End Module '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Module : modOIDFactorySingleton ''' '''----------------------------------------------------------------------------- ''' <summary> ''' Module for managing the ObjectID Factory singleton object ''' </summary> -''' <remarks>Manages the references to the singleton <see cref="T:Atoms.Framework.OIDFactory"/> object.</remarks> +''' <remarks>Manages the references to the singleton <see cref="T:AtomsFramework.OIDFactory"/> object.</remarks> ''' <history> ''' [rbanks] 18/12/2003 Created ''' </history> @@ -157,7 +157,7 @@ ''' Gets a reference to the OIDFactory instance. ''' </summary> ''' <returns>A reference to the OIDFactory object.</returns> - ''' <remarks>If the <see cref="T:Atoms.Framework.OIDFactory"/> instance does not yet + ''' <remarks>If the <see cref="T:AtomsFramework.OIDFactory"/> instance does not yet ''' exist it is created.</remarks> ''' <history> ''' [rbanks] 18/12/2003 Created Index: IConfigLoader.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/IConfigLoader.vb,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- IConfigLoader.vb 11 Apr 2005 00:31:44 -0000 1.5 +++ IConfigLoader.vb 20 May 2005 06:03:42 -0000 1.6 @@ -5,16 +5,29 @@ '''----------------------------------------------------------------------------- ''' <summary> ''' Interface that must be implemented by various configuration loaders. -''' <para>Currently only the XmlConfigLoader implements this interface. There is a -''' IConfigLoader object but it is uncoded and a place holder for future expansion.</para> ''' </summary> +''' <remarks><para>Currently only the XmlConfigLoader implements this interface. There is a +''' ConfigLoader object but it is just a shell and is a place holder for future expansion.</para> +''' </remarks> '''----------------------------------------------------------------------------- Public Interface IConfigLoader + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Loads a O/R mapping conguration + ''' </summary> + ''' <param name="dbMap">A database map to populate</param> + ''' <param name="clMap">A classmap to populate</param> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Sub LoadConfig(ByRef dbMap As HybridDictionary, ByRef clMap As HybridDictionary) End Interface '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : IConfigLoader ''' '''----------------------------------------------------------------------------- @@ -37,6 +50,18 @@ 'This is the reason for the interface '************************************************** + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Empty declaration + ''' </summary> + ''' <param name="dbMap">Unused</param> + ''' <param name="clMap">Unused</param> + ''' <remarks>This is a placeholder declaration only and serves no purpose currently. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Sub LoadConfig(ByRef dbMap As HybridDictionary, ByRef clMap As HybridDictionary) Implements IConfigLoader.loadConfig End Sub Index: CBetweenCriteria.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CBetweenCriteria.vb,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CBetweenCriteria.vb 11 Apr 2005 00:31:42 -0000 1.4 +++ CBetweenCriteria.vb 20 May 2005 06:03:39 -0000 1.5 @@ -1,7 +1,7 @@ Option Strict Off Option Explicit On '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : CBetweenCriteria ''' '''----------------------------------------------------------------------------- Index: CMultiRetrieveCriteria.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CMultiRetrieveCriteria.vb,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- CMultiRetrieveCriteria.vb 11 Apr 2005 00:31:43 -0000 1.21 +++ CMultiRetrieveCriteria.vb 20 May 2005 06:03:40 -0000 1.22 @@ -4,7 +4,7 @@ Imports System.Collections.Specialized '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : MultiRetrieveCriteria ''' '''----------------------------------------------------------------------------- Index: COrderEntry.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/COrderEntry.vb,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- COrderEntry.vb 11 Apr 2005 00:31:43 -0000 1.6 +++ COrderEntry.vb 20 May 2005 06:03:40 -0000 1.7 @@ -2,7 +2,7 @@ Option Explicit On '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : OrderEntry ''' '''----------------------------------------------------------------------------- Index: CNotEqualToCriteria.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CNotEqualToCriteria.vb,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- CNotEqualToCriteria.vb 11 Apr 2005 00:31:43 -0000 1.8 +++ CNotEqualToCriteria.vb 20 May 2005 06:03:40 -0000 1.9 @@ -2,7 +2,7 @@ Option Explicit On '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : NotEqualToCriteria ''' '''----------------------------------------------------------------------------- Index: CEqualToCriteria.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CEqualToCriteria.vb,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- CEqualToCriteria.vb 11 Apr 2005 00:31:43 -0000 1.7 +++ CEqualToCriteria.vb 20 May 2005 06:03:40 -0000 1.8 @@ -2,7 +2,7 @@ Option Explicit On '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : EqualToCriteria ''' '''----------------------------------------------------------------------------- Index: AtomsFramework.ndoc =================================================================== RCS file: /cvsroot/jcframework/dotnet/AtomsFramework.ndoc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AtomsFramework.ndoc 11 Apr 2005 00:31:41 -0000 1.2 +++ AtomsFramework.ndoc 20 May 2005 06:03:36 -0000 1.3 @@ -1,6 +1,6 @@ <project SchemaVersion="1.3"> <assemblies> - <assembly location=".\bin\Atoms.Framework.dll" documentation=".\bin\Atoms.Framework.xml" /> + <assembly location=".\bin\AtomsFramework.dll" documentation=".\bin\AtomsFramework.xml" /> </assemblies> <documenters> <documenter name="JavaDoc"> @@ -22,8 +22,17 @@ <property name="HtmlHelpName" value="AtomsFramework" /> <property name="Title" value="AtomsFramework Persistence Layer Reference Guide" /> <property name="ShowVisualBasic" value="True" /> + <property name="SdkLinksOnWeb" value="True" /> + <property name="ShowMissingSummaries" value="True" /> + <property name="ShowMissingRemarks" value="True" /> + <property name="ShowMissingParams" value="True" /> + <property name="ShowMissingReturns" value="True" /> + <property name="ShowMissingValues" value="True" /> <property name="AssemblyVersionInfo" value="AssemblyVersion" /> + <property name="CopyrightText" value="(c) Copyright, Richard Banks, 2005. Licensed using the LGPL License" /> + <property name="FeedbackEmailAddress" value="rba...@ms..." /> <property name="UseNamespaceDocSummaries" value="True" /> + <property name="Preliminary" value="True" /> </documenter> <documenter name="MSDN 2003"> <property name="OutputDirectory" value=".\doc\" /> Index: COID.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/COID.vb,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- COID.vb 11 Apr 2005 00:31:43 -0000 1.6 +++ COID.vb 20 May 2005 06:03:40 -0000 1.7 @@ -1,7 +1,7 @@ Option Explicit On '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : OID ''' '''----------------------------------------------------------------------------- @@ -16,7 +16,7 @@ ''' <para>Each time a new object id is created the B-Value is generated by incrementing the previous ''' B-Value.</para> ''' </remarks> -''' <seealso cref="T:Atoms.Framework.OIDFactory"/> +''' <seealso cref="T:AtomsFramework.OIDFactory"/> ''' <history> ''' [rbanks] 12/12/2003 Created ''' </history> Index: CCacheEntry.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CCacheEntry.vb,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- CCacheEntry.vb 11 Apr 2005 00:31:42 -0000 1.33 +++ CCacheEntry.vb 20 May 2005 06:03:39 -0000 1.34 @@ -4,7 +4,7 @@ Imports System.Reflection '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : CacheEntry ''' '''----------------------------------------------------------------------------- @@ -80,10 +80,20 @@ End Get End Property - 'When loading objects, the cache contains a partially loaded object. - 'Instead of returning a copy of the object we need to return the object itself - 'Otherwise circular references during loading will refer to partial object copies instead of - 'the real object. + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' A copy of the object as it was when it was before any changes occurred. + ''' </summary> + ''' <value></value> + ''' <remarks>When starting a transaction the framework will make a copy of the current object as the original object so that any + ''' cache transaction rollbacks can restore the object back to it's original state. + ''' <para>During object retrieval the cache often contains partially loaded objects. Instead of returning a copy of the object we + ''' need to return the object itself to prevent infinited loops. This property contains the partially loaded object.</para> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property OriginalObject() As IPersistableObject Get Return m_originalObject @@ -124,6 +134,16 @@ End Set End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Makes a copy of the object referenced by the cache entry. + ''' </summary> + ''' <remarks>The copies are placed in internal properties for later use. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Sub CopyObject() 'Need two object copies 'One for the copy made at the very start of the transaction @@ -133,14 +153,45 @@ m_objectCopyAtTransactionStart = m_object.Copy End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Makes a copy of an object in it's current state and stores it in an internal property. + ''' </summary> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Sub UpdateObject() m_objectCopy = m_object.Copy End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Restores an object back to it's state at the start of a transaction. + ''' </summary> + ''' <remarks>This method is only used during the rollback of a cache transaction. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Sub RestoreObject() m_object = m_objectCopyAtTransactionStart End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Creates a new instance of the CacheEntry class with a specified lifetime. + ''' </summary> + ''' <param name="lifetime">The lifetime (in minutes) of the cache entry</param> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Sub New(ByVal lifetime As Double) m_expiryTime = DateAdd(DateInterval.Minute, lifetime, Now) End Sub @@ -149,6 +200,18 @@ m_expiryTime = DateAdd(DateInterval.Minute, lifetime, Now) End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Creates a string representation of the cache entry + ''' </summary> + ''' <returns></returns> + ''' <remarks>The string returned by this method shows the state of the cache entry, and provides + ''' and indication of the referenced object using the objects type name and the key properties of the object. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Overrides Function ToString() As String Dim s As String Dim i As Short @@ -194,8 +257,8 @@ s &= [String].Format(formatString, "---------", "-------------", "--------------") i = 0 cm = m_object.GetClassMap() - For i = 1 To cm.getKeySize - am = cm.getKeyAttributeMap(i) + For i = 1 To cm.GetKeySize + am = cm.GetKeyAttributeMap(i) x = m_object.GetValueByAttribute(am.Name) Try xstring = x.ToString @@ -227,7 +290,7 @@ End Class '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : CacheKey ''' '''----------------------------------------------------------------------------- @@ -253,26 +316,46 @@ Private m_hasLegitValues As Boolean Private m_hashCode As Integer + '''----------------------------------------------------------------------------- ''' <summary> ''' Creates a new instance of a CacheKey object ''' </summary> - ''' <param name="obj">The persistent object we are generating a cache key for.</param> - ''' <remarks>Creates a new cache key entry based on the key fields in the object. Works - ''' regardless of wether the object uses ObjectID's or has it's own key fields.</remarks> + ''' <remarks>Until an object is provided and key values populated the object may behave incorrectly.</remarks> ''' <history> ''' [rbanks] 27/11/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Sub New() m_keyvalues = New Collection End Sub + '''----------------------------------------------------------------------------- + ''' <summary> + ''' Creates a new instance of a CacheKey object + ''' </summary> + ''' <param name="obj">The persistent object we are generating a cache key for.</param> + ''' <remarks>Creates a new cache key entry based on the key fields in the object. Works + ''' regardless of wether the object uses ObjectID's or has it's own key fields.</remarks> + ''' <history> + ''' [rbanks] 27/11/2003 Created + ''' </history> + '''----------------------------------------------------------------------------- Public Sub New(ByVal obj As IPersistableObject) PopulateWith(obj) End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Populates the cache key with values from the referenced object + ''' </summary> + ''' <param name="obj">The object to use as a source of data</param> + ''' <remarks>The cache key values are generated by processing the key values of the referenced object. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Protected Sub PopulateWith(ByVal obj As IPersistableObject) Dim cm As ClassMap Dim i As Integer @@ -351,8 +434,8 @@ ''' <summary> ''' Gets a specific key value ''' </summary> - ''' <param name="i">The index of the key value to return</param> - ''' <value>The value of the key entry in position "i"</value> + ''' <param name="index">The index of the key value to return</param> + ''' <value>The value of the key entry in position "index"</value> ''' <remarks>Returns the value of the "i"th key entry used in the cache key.</remarks> ''' <history> ''' [rbanks] 27/11/2003 Created @@ -368,7 +451,7 @@ ''' <summary> ''' Determines if the key of an object is equivalent to the current cache key. ''' </summary> - ''' <param name="obj1">The object to be compared</param> + ''' <param name="obj">The object to be compared</param> ''' <returns>Boolean indicating equality</returns> ''' <remarks>A cache key is generated for the passed in object and this is compared ''' to the current cache key. The values of each of the individual key entries are @@ -466,7 +549,7 @@ ''' <summary> ''' Converts a cache key to a string. ''' </summary> - ''' <returns></returns> + ''' <returns>A string containing the cache key data.</returns> ''' <remarks>The string that is produced lists each of the key attributes and then ''' shows the values of each attribute. If the attribute cannot be diplayed then ''' an unprintable message is shown @@ -503,7 +586,7 @@ End Class '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : CacheEntryCollection ''' '''----------------------------------------------------------------------------- @@ -532,9 +615,49 @@ Private m_expiryInterval As Double Private m_objectsLoading As Boolean + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Status types for cache operations. + ''' </summary> + ''' <remarks>These status values are used to determine the result of the last retrieval operation on the cache. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Enum CacheStatus + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' The requested object was found. + ''' </summary> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Found + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' The requested object could not be found + ''' </summary> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- NotFound + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' The requested object was found but is marked for deletion. + ''' </summary> + ''' <remarks> + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Deleted End Enum Private m_status As CacheStatus @@ -686,7 +809,7 @@ ''' <summary> ''' Default Property. Returns the object from the cache with the specified ObjectID. ''' </summary> - ''' <param name="OIDValue">The ObjectID of the object to locate.</param> + ''' <param name="oidValue">The ObjectID of the object to locate.</param> ''' <value>Returns a copy of the matching cached object, or nothing if no match could be found.</value> ''' <remarks>Locates an entry in the cache based on the object ID. If an entry is found ''' a copy of the matching persistent object is returned, otherwise Nothing is returned. @@ -699,7 +822,7 @@ Default Public Overloads ReadOnly Property Item(ByVal oidValue As String) As IPersistableObject Get Dim ce As CacheEntry - ce = MyBase.Item(OidValue) + ce = MyBase.Item(oidValue) If ce Is Nothing Then m_status = CacheStatus.NotFound Return Nothing @@ -929,6 +1052,18 @@ End Try End Sub + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Indicates if the cache is currently loading new objects. + ''' </summary> + ''' <returns></returns> + ''' <remarks>This flag controls the behaviour of the cache when returning objects. If the flag is true then the cache will return object references to the cached object. + ''' When the flag is false, copies of the cached object are made and a reference to the copied object is returned. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Property ObjectsAreLoading() As Boolean Get Return m_objectsLoading @@ -972,6 +1107,17 @@ End If End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Produces a string that represents the current state of the cache. + ''' </summary> + ''' <returns></returns> + ''' <remarks>The method is useful for debugging purposes. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Overrides Function ToString() As String Dim x As DictionaryEntry Dim ce As CacheEntry @@ -996,12 +1142,36 @@ End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' The result status of the last cache operation + ''' </summary> + ''' <value></value> + ''' <remarks>The status can be useful to differentiate between a failure to retrieve an object because it isn't cached, or a failure to + ''' retrieve because the object has been marked as deleted. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public ReadOnly Property Status() As CacheStatus Get Return m_status End Get End Property + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Get an ArrayList containing the objects currently in the cache. + ''' </summary> + ''' <returns></returns> + ''' <remarks>This method is useful for debugging purposes if you wish to see what the current contents of the cache are. + ''' It is not recommended that this method be used for any other purpose. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetValueArray() As ArrayList Dim al As ArrayList If Me.Values.Count = 0 Then Return New ArrayList @@ -1011,6 +1181,17 @@ Return al End Function + ''' ----------------------------------------------------------------------------- + ''' <summary> + ''' Get an ArrayList containing the keys of the cache entries currently in the cache. + ''' </summary> + ''' <returns></returns> + ''' <remarks>This method is useful for debugging purposes but is not recommended for any other use. + ''' </remarks> + ''' <history> + ''' [rbanks] 20/05/2005 Created + ''' </history> + ''' ----------------------------------------------------------------------------- Public Function GetKeyArray() As ArrayList Dim al As ArrayList If Me.Keys.Count = 0 Then Return New ArrayList Index: CTableMap.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CTableMap.vb,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- CTableMap.vb 11 Apr 2005 00:31:44 -0000 1.7 +++ CTableMap.vb 20 May 2005 06:03:42 -0000 1.8 @@ -2,7 +2,7 @@ Option Explicit On '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : TableMap ''' '''----------------------------------------------------------------------------- Index: CPersistentCollection.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CPersistentCollection.vb,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- CPersistentCollection.vb 11 Apr 2005 00:31:44 -0000 1.20 +++ CPersistentCollection.vb 20 May 2005 06:03:41 -0000 1.21 @@ -3,7 +3,7 @@ Imports System.Reflection '''----------------------------------------------------------------------------- -''' Project : Atoms.Framework +''' Project : AtomsFramework ''' Class : PersistentObjectCollection ''' '''----------------------------------------------------------------------------- Index: CMultiSummaryCriteria.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CMultiSummaryCriteria.vb,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- CMultiSummaryCriteria.vb 11 Apr 2005 00:31:43 -0000 1.18 +++ CMultiSummaryCriteria.vb 20 May 2005 06:03:40 -0000 1.19 @@ -2,7 +2,7 @@ Option Explicit On '''-----------------... [truncated message content] |