From: <na...@us...> - 2006-08-06 09:39:53
|
Revision: 698 Author: nandod Date: 2006-08-06 02:39:33 -0700 (Sun, 06 Aug 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=698&view=rev Log Message: ----------- - uses clause of two brokers and a catalog updated. - use of overload and reintroduce reduced. - removed some Code Site logging code left there by mistake. Modified Paths: -------------- branches/Refactor_InstantPersistenceUnit/Source/Brokers/ADO/InstantADO.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/DBX/InstantDBX.pas branches/Refactor_InstantPersistenceUnit/Source/Catalogs/MSSql/InstantMSSqlCatalog.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/ADO/InstantADO.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/ADO/InstantADO.pas 2006-08-06 04:35:11 UTC (rev 697) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/ADO/InstantADO.pas 2006-08-06 09:39:33 UTC (rev 698) @@ -40,7 +40,7 @@ uses Classes, Db, ADODB, SysUtils, InstantPersistence, InstantClasses, - InstantCommand; + InstantCommand, InstantBrokers, InstantMetadata, InstantTypes; type TInstantADOProviderType = (ptUnknown, ptMSJet, ptMSSQLServer, ptOracle, ptMySQL, ptIBMDB2); Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/DBX/InstantDBX.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/DBX/InstantDBX.pas 2006-08-06 04:35:11 UTC (rev 697) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/DBX/InstantDBX.pas 2006-08-06 09:39:33 UTC (rev 698) @@ -45,7 +45,8 @@ {$IFDEF LINUX} QControls, {$ENDIF} - Classes, DB, DBXpress, SqlExpr, InstantPersistence, InstantCommand; + Classes, DB, DBXpress, SqlExpr, InstantPersistence, InstantCommand, + InstantBrokers, InstantMetadata, InstantTypes; type TInstantDBXConnectionDef = class(TInstantConnectionBasedConnectionDef) Modified: branches/Refactor_InstantPersistenceUnit/Source/Catalogs/MSSql/InstantMSSqlCatalog.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Catalogs/MSSql/InstantMSSqlCatalog.pas 2006-08-06 04:35:11 UTC (rev 697) +++ branches/Refactor_InstantPersistenceUnit/Source/Catalogs/MSSql/InstantMSSqlCatalog.pas 2006-08-06 09:39:33 UTC (rev 698) @@ -38,7 +38,7 @@ interface uses - InstantPersistence; + InstantPersistence, InstantBrokers, InstantMetadata, InstantTypes; type // A TInstantCatalog that reads catalog information from an MS-SQL server database. Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas 2006-08-06 04:35:11 UTC (rev 697) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas 2006-08-06 09:39:33 UTC (rev 698) @@ -386,12 +386,11 @@ private FConnector: TComponent; protected - procedure SetConnector(AConnector: TComponent); overload; virtual; + function GetConnector: TComponent; + procedure SetConnector(AConnector: TComponent); public - constructor Create(AConnector: TComponent = nil); virtual; constructor Retrieve(const AObjectId: string; CreateIfMissing: Boolean = False; - Refresh: Boolean = False; AConnector: TComponent = nil); virtual; abstract; - property Connector: TComponent read FConnector; + Refresh: Boolean = False; AConnector: TComponent = nil); virtual; abstract; end; TInstantAbstractAttributeClass = class of TInstantAbstractAttribute; @@ -401,12 +400,13 @@ FMetadata: TInstantCollectionItem; FOwner: TInstantAbstractObject; protected - procedure SetOwner(AOwner: TInstantAbstractObject); overload; virtual; + function GetOwner: TInstantAbstractObject; + procedure SetOwner(AOwner: TInstantAbstractObject); + function GetMetadata: TInstantCollectionItem; + procedure SetMetadata(AMetadata: TInstantCollectionItem); public - constructor Create(AOwner: TInstantAbstractObject; AMetadata: - TInstantCollectionItem); virtual; - property Metadata: TInstantCollectionItem read FMetadata write FMetadata; - property Owner: TInstantAbstractObject read FOwner; + constructor Create(AOwner: TInstantAbstractObject; + AMetadata: TInstantCollectionItem); virtual; end; TInstantStreamFormat = (sfBinary, sfXML); @@ -1919,10 +1919,11 @@ DoConvertProperties(''); end; -constructor TInstantAbstractObject.Create(AConnector: TComponent = nil); +{ TInstantAbstractObject } + +function TInstantAbstractObject.GetConnector: TComponent; begin - inherited Create; - FConnector := AConnector; + Result := FConnector; end; procedure TInstantAbstractObject.SetConnector(AConnector: TComponent); @@ -1930,11 +1931,21 @@ FConnector := AConnector; end; -constructor TInstantAbstractAttribute.Create(AOwner: TInstantAbstractObject; - AMetadata: TInstantCollectionItem); +{ TInstantAbstractAttribute } + +function TInstantAbstractAttribute.GetMetadata: TInstantCollectionItem; begin - inherited Create; - FOwner := AOwner; + Result := FMetadata; +end; + +function TInstantAbstractAttribute.GetOwner: TInstantAbstractObject; +begin + Result := FOwner; +end; + +procedure TInstantAbstractAttribute.SetMetadata( + AMetadata: TInstantCollectionItem); +begin FMetadata := AMetadata; end; @@ -1943,5 +1954,13 @@ FOwner := AOwner; end; +constructor TInstantAbstractAttribute.Create(AOwner: TInstantAbstractObject; + AMetadata: TInstantCollectionItem); +begin + inherited Create; + FOwner := AOwner; + FMetadata := AMetadata; +end; + end. Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas 2006-08-06 04:35:11 UTC (rev 697) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas 2006-08-06 09:39:33 UTC (rev 698) @@ -40,9 +40,7 @@ interface -uses Classes, Contnrs, Db, InstantClasses, InstantTypes, InstantConsts -, CodeSiteLogging -; +uses Classes, Contnrs, Db, InstantClasses, InstantTypes, InstantConsts; type TInstantAttributeMap = class; @@ -65,7 +63,6 @@ private function GetCollection: TInstantMetadatas; procedure SetCollection(Value: TInstantMetadatas); - {$IFDEF D6+}reintroduce;{$ENDIF} protected function InternalEquals(const Other: TInstantMetadata): Boolean; virtual; public @@ -145,7 +142,7 @@ protected function InternalEquals(const Other: TInstantMetadata): Boolean; override; public - constructor Create(ACollection: TInstantFieldMetadatas); reintroduce; + constructor Create(ACollection: TInstantFieldMetadatas); procedure Assign(Source: TPersistent); override; // Returns True if one of the data types of Other (Other.DataType and // Other.AlternateDataTypes) equals one of the data types of Self. @@ -175,7 +172,7 @@ protected function InternalEquals(const Other: TInstantMetadata): Boolean; override; public - constructor Create(ACollection: TInstantMetadatas); reintroduce; + constructor Create(ACollection: TInstantMetadatas); procedure Assign(Source: TPersistent); override; property Collection: TInstantIndexMetadatas read GetCollection; // Returns True if the field identified by AFieldMetadata is part of this @@ -1694,13 +1691,10 @@ var AClass: TInstantAbstractAttributeClass; begin - CodeSite.EnterMethod(Self, 'TInstantAttributeMetadata.CreateAttribute'); AClass := AttributeClass; - CodeSite.Send('AClass', AClass.ClassName); if not Assigned(AClass) then raise EInstantError.CreateFmt(SUnsupportedType, [AttributeTypeName]); Result := AClass.Create(TInstantObject(AObject), Self); - CodeSite.ExitMethod(Self, 'TInstantAttributeMetadata.CreateAttribute'); end; function TInstantAttributeMetadata.GetAttributeClass: Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas 2006-08-06 04:35:11 UTC (rev 697) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas 2006-08-06 09:39:33 UTC (rev 698) @@ -178,7 +178,7 @@ function GetIsChanged: Boolean; virtual; function GetIsDefault: Boolean; virtual; function GetIsMandatory: Boolean; virtual; - function GetOwner: TInstantObject; reintroduce; overload; virtual; + function GetOwner: TInstantObject; virtual; procedure Initialize; virtual; procedure ReadName(Reader: TInstantReader); procedure SetAsBoolean(AValue: Boolean); virtual; @@ -190,12 +190,12 @@ procedure SetAsString(const AValue: string); virtual; procedure SetAsVariant(AValue: Variant); virtual; procedure SetIsChanged(Value: Boolean); - procedure SetOwner(AOwner: TInstantObject); reintroduce; overload; virtual; + procedure SetOwner(AOwner: TInstantObject); virtual; procedure StringValidationError(InvalidChar: Char); procedure WriteName(Writer: TInstantWriter); public constructor Create(AOwner: TInstantAbstractObject = nil; AMetadata: - TInstantCollectionItem = nil); override; + TInstantCollectionItem = nil); override; procedure Changed; procedure CheckHasMetadata; procedure Reset; virtual; @@ -452,7 +452,7 @@ TInstantComplex = class(TInstantAttribute) private - function GetRequiredClass: TInstantAbstractObjectClass; + function GetRequiredClass: TInstantObjectClass; function GetRequiredClassName: string; protected function GetAllowOwned: Boolean; virtual; @@ -464,7 +464,7 @@ property Connector: TInstantConnector read GetConnector; function DetachObject(AObject: TInstantObject): Boolean; virtual; property AllowOwned: Boolean read GetAllowOwned; - property RequiredClass: TInstantAbstractObjectClass read GetRequiredClass; + property RequiredClass: TInstantObjectClass read GetRequiredClass; property RequiredClassName: string read GetRequiredClassName; end; @@ -844,8 +844,7 @@ procedure ReadObject(Reader: TInstantReader); override; procedure RestoreState; virtual; procedure SaveState; virtual; - procedure SetConnector(AConnector: TInstantConnector); reintroduce; overload; - virtual; + procedure SetConnector(AConnector: TInstantConnector); virtual; procedure SetId(const Value: string); virtual; function VerifyOperation(OperationType: TInstantOperationType): TInstantVerificationResult; virtual; procedure WriteObject(Writer: TInstantWriter); override; @@ -856,7 +855,7 @@ public constructor Clone(Source: TInstantObject; AConnector: TInstantConnector = nil); overload; virtual; - constructor Create(AConnector: TComponent = nil); override; + constructor Create(AConnector: TInstantConnector = nil); virtual; constructor Retrieve(const AObjectId: string; CreateIfMissing: Boolean = False; Refresh: Boolean = False; AConnector: TComponent = nil); override; function AddObject(AObject: TInstantObject): Integer; overload; @@ -2267,10 +2266,11 @@ end; constructor TInstantAttribute.Create(AOwner: TInstantAbstractObject = nil; - AMetadata: TInstantCollectionItem = nil); + AMetadata: TInstantCollectionItem = nil); begin - inherited Create(AOwner, nil); - SetMetadata(TInstantAttributeMetadata(AMetadata)); + Assert((AOwner = nil) or (AOwner is TInstantObject)); + Assert((AMetadata = nil) or (AMetadata is TInstantAttributeMetadata)); + inherited Create(AOwner, AMetadata); end; function TInstantAttribute.GetAsBoolean: Boolean; @@ -2364,7 +2364,7 @@ function TInstantAttribute.GetMetadata: TInstantAttributeMetadata; begin - Result := inherited Metadata as TInstantAttributeMetadata; + Result := inherited GetMetadata as TInstantAttributeMetadata; end; function TInstantAttribute.GetName: string; @@ -2377,7 +2377,7 @@ function TInstantAttribute.GetOwner: TInstantObject; begin - Result := inherited Owner as TInstantObject; + Result := inherited GetOwner as TInstantObject; end; function TInstantAttribute.GetValue: Variant; @@ -2452,7 +2452,7 @@ begin if Assigned(Value) and (Value.AttributeType <> AttributeType) then raise EInstantError.CreateFmt(SMetadataMismatch, [ClassName, Name]); - inherited Metadata := Value; + inherited SetMetadata(Value); Initialize; end; @@ -3589,10 +3589,10 @@ InstantCheckConnector(Result); end; -function TInstantComplex.GetRequiredClass: TInstantAbstractObjectClass; +function TInstantComplex.GetRequiredClass: TInstantObjectClass; begin if Assigned(Metadata) then - Result := Metadata.ObjectClass + Result := TInstantObjectClass(Metadata.ObjectClass) else Result := TInstantObject; end; @@ -5571,10 +5571,10 @@ ConvertAttributes; end; -constructor TInstantObject.Create(AConnector: TComponent = nil); +constructor TInstantObject.Create(AConnector: TInstantConnector = nil); begin inherited Create; - InstantCheckConnector(TInstantConnector(AConnector)); + InstantCheckConnector(AConnector); SetConnector(AConnector); Init; DoAfterCreate; @@ -6515,7 +6515,7 @@ begin inherited Create; InstantCheckConnector(TInstantConnector(AConnector)); - SetConnector(AConnector); + SetConnector(TInstantConnector(AConnector)); Instance := ObjectStore.Find(AObjectId); if Assigned(Instance) then begin @@ -6557,7 +6557,7 @@ function TInstantObject.GetConnector: TInstantConnector; begin - Result := inherited Connector as TInstantConnector; + Result := inherited GetConnector as TInstantConnector; end; procedure TInstantObject.SaveState; |
From: <sr...@us...> - 2006-08-07 04:06:22
|
Revision: 699 Author: srmitch Date: 2006-08-06 21:06:11 -0700 (Sun, 06 Aug 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=699&view=rev Log Message: ----------- - Reverted some changes to use of Reintroduce to avoid compiler warnings. - Reverted some changes to TInstantAttribute.Create to ensure new attribute is initialized. Modified Paths: -------------- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas 2006-08-06 09:39:33 UTC (rev 698) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas 2006-08-07 04:06:11 UTC (rev 699) @@ -400,7 +400,7 @@ FMetadata: TInstantCollectionItem; FOwner: TInstantAbstractObject; protected - function GetOwner: TInstantAbstractObject; + function GetOwner: TInstantAbstractObject; reintroduce; virtual; procedure SetOwner(AOwner: TInstantAbstractObject); function GetMetadata: TInstantCollectionItem; procedure SetMetadata(AMetadata: TInstantCollectionItem); Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas 2006-08-06 09:39:33 UTC (rev 698) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas 2006-08-07 04:06:11 UTC (rev 699) @@ -63,6 +63,7 @@ private function GetCollection: TInstantMetadatas; procedure SetCollection(Value: TInstantMetadatas); + {$IFDEF D6+}reintroduce; {$ENDIF} protected function InternalEquals(const Other: TInstantMetadata): Boolean; virtual; public @@ -142,7 +143,7 @@ protected function InternalEquals(const Other: TInstantMetadata): Boolean; override; public - constructor Create(ACollection: TInstantFieldMetadatas); + constructor Create(ACollection: TInstantFieldMetadatas); reintroduce; procedure Assign(Source: TPersistent); override; // Returns True if one of the data types of Other (Other.DataType and // Other.AlternateDataTypes) equals one of the data types of Self. @@ -172,7 +173,7 @@ protected function InternalEquals(const Other: TInstantMetadata): Boolean; override; public - constructor Create(ACollection: TInstantMetadatas); + constructor Create(ACollection: TInstantMetadatas); reintroduce; procedure Assign(Source: TPersistent); override; property Collection: TInstantIndexMetadatas read GetCollection; // Returns True if the field identified by AFieldMetadata is part of this Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas 2006-08-06 09:39:33 UTC (rev 698) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas 2006-08-07 04:06:11 UTC (rev 699) @@ -178,7 +178,7 @@ function GetIsChanged: Boolean; virtual; function GetIsDefault: Boolean; virtual; function GetIsMandatory: Boolean; virtual; - function GetOwner: TInstantObject; virtual; + function GetOwner: TInstantObject; reintroduce; virtual; procedure Initialize; virtual; procedure ReadName(Reader: TInstantReader); procedure SetAsBoolean(AValue: Boolean); virtual; @@ -2270,7 +2270,8 @@ begin Assert((AOwner = nil) or (AOwner is TInstantObject)); Assert((AMetadata = nil) or (AMetadata is TInstantAttributeMetadata)); - inherited Create(AOwner, AMetadata); + inherited Create(AOwner, nil); + SetMetadata(TInstantAttributeMetadata(AMetadata)); end; function TInstantAttribute.GetAsBoolean: Boolean; |
From: <na...@us...> - 2006-08-07 11:30:44
|
Revision: 700 Author: nandod Date: 2006-08-07 04:30:35 -0700 (Mon, 07 Aug 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=700&view=rev Log Message: ----------- * pulled TInstantAttribute.Initialize up to keep TInstantAttribute.SetMetadata clean of unwanted side effects. Modified Paths: -------------- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas 2006-08-07 04:06:11 UTC (rev 699) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas 2006-08-07 11:30:35 UTC (rev 700) @@ -404,6 +404,7 @@ procedure SetOwner(AOwner: TInstantAbstractObject); function GetMetadata: TInstantCollectionItem; procedure SetMetadata(AMetadata: TInstantCollectionItem); + procedure Initialize; virtual; public constructor Create(AOwner: TInstantAbstractObject; AMetadata: TInstantCollectionItem); virtual; @@ -1943,10 +1944,15 @@ Result := FOwner; end; +procedure TInstantAbstractAttribute.Initialize; +begin +end; + procedure TInstantAbstractAttribute.SetMetadata( AMetadata: TInstantCollectionItem); begin FMetadata := AMetadata; + Initialize; end; procedure TInstantAbstractAttribute.SetOwner(AOwner: TInstantAbstractObject); @@ -1959,7 +1965,7 @@ begin inherited Create; FOwner := AOwner; - FMetadata := AMetadata; + SetMetadata(AMetadata); end; end. Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas 2006-08-07 04:06:11 UTC (rev 699) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas 2006-08-07 11:30:35 UTC (rev 700) @@ -179,7 +179,6 @@ function GetIsDefault: Boolean; virtual; function GetIsMandatory: Boolean; virtual; function GetOwner: TInstantObject; reintroduce; virtual; - procedure Initialize; virtual; procedure ReadName(Reader: TInstantReader); procedure SetAsBoolean(AValue: Boolean); virtual; procedure SetAsCurrency(AValue: Currency); virtual; @@ -2270,8 +2269,7 @@ begin Assert((AOwner = nil) or (AOwner is TInstantObject)); Assert((AMetadata = nil) or (AMetadata is TInstantAttributeMetadata)); - inherited Create(AOwner, nil); - SetMetadata(TInstantAttributeMetadata(AMetadata)); + inherited Create(AOwner, AMetadata); end; function TInstantAttribute.GetAsBoolean: Boolean; @@ -2386,10 +2384,6 @@ Result := AsVariant; end; -procedure TInstantAttribute.Initialize; -begin -end; - procedure TInstantAttribute.ReadName(Reader: TInstantReader); begin Reader.ReadStr; @@ -2454,7 +2448,6 @@ if Assigned(Value) and (Value.AttributeType <> AttributeType) then raise EInstantError.CreateFmt(SMetadataMismatch, [ClassName, Name]); inherited SetMetadata(Value); - Initialize; end; procedure TInstantAttribute.SetOwner(AOwner: TInstantObject); |
From: <sr...@us...> - 2006-08-06 04:39:18
|
Revision: 697 Author: srmitch Date: 2006-08-05 21:35:11 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=697&view=rev Log Message: ----------- - Refactored InstantPersistence.pas into the following: InstantPersistence.pas - Remains the main 'IO interface' unit. InstantBrokers.pas - Contains the descendant brokers, connectors classes. InstantMetadata.pas - Contains the metadata, scheme, etc. classes. InstantTypes - Contains some type declarations. The TInstantQueryCommand class was moved into InstantCommand.pas. To enable the decoupling two basic 'abstract' classes, TInstantAbstractObject and TInstantAbstractAttribute, were introduced both of which were put in the InstantClasses unit. - Updated the BDE, IBX, NexusDB and XML brokers for the above changes. - Updated PrimerCross demo for the above changes. No changes required for Intro demo. Modified Paths: -------------- branches/Refactor_InstantPersistenceUnit/Demos/Intro/Intro.dpr branches/Refactor_InstantPersistenceUnit/Demos/Intro/Intro.mdr branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicBrowse.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicEdit.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicView.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CategoryBrowse.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CompanyBrowse.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CompanyEdit.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactBrowse.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactEdit.dfm branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactEdit.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactFilterEdit.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactSort.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactView.dfm branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactView.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CountryBrowse.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/DemoData.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/DemoDataRequest.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/HelpView.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Main.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/MainData.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PerformanceView.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PersonBrowse.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PersonEdit.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Primer.dpr branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PrimerExternal.dpr branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/QueryView.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/RandomData.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Stopwatch.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Utility.pas branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Welcome.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDE.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDECatalog.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDEConnectionDefEdit.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/IBX/InstantIBX.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/IBX/InstantIBXConnectionDefEdit.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDB.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDBCatalog.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDBConnectionDefEdit.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/XML/InstantXML.pas branches/Refactor_InstantPersistenceUnit/Source/Brokers/XML/InstantXMLCatalog.pas branches/Refactor_InstantPersistenceUnit/Source/Catalogs/IBFb/InstantIBFbCatalog.pas branches/Refactor_InstantPersistenceUnit/Source/Core/D2006/IOCore.dpk branches/Refactor_InstantPersistenceUnit/Source/Core/D5/IOCore_D5.dpk branches/Refactor_InstantPersistenceUnit/Source/Core/D6/IOCore.dpk branches/Refactor_InstantPersistenceUnit/Source/Core/D7/IOCore.dpk branches/Refactor_InstantPersistenceUnit/Source/Core/InstantAccessors.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantCode.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantCommand.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantConnectionManager.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantConnectionManagerFormUnit.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantCustomDBEvolverFormUnit.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantDBBuild.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantDBEvolution.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantExplorer.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPresentation.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPump.pas branches/Refactor_InstantPersistenceUnit/Source/Core/K3/IOCore.dpk branches/Refactor_InstantPersistenceUnit/Source/Design/InstantAttributeEditor.pas branches/Refactor_InstantPersistenceUnit/Source/Design/InstantClassEditor.pas branches/Refactor_InstantPersistenceUnit/Source/Design/InstantCommandEditor.pas branches/Refactor_InstantPersistenceUnit/Source/ObjectFoundry/OFClasses.pas branches/Refactor_InstantPersistenceUnit/Source/ObjectFoundry/OFExpert.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/InstantMock.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/MinimalModel.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestIO.mdr branches/Refactor_InstantPersistenceUnit/Source/Tests/TestIO.mdx branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantAttribute.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantAttributeMap.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantAttributeMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantClassMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantFieldMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantIndexMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantObject.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantObjectStore.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantPart.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantParts.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantReference.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantReferences.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantScheme.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestInstantTableMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestMinimalModel.pas branches/Refactor_InstantPersistenceUnit/Source/Tests/TestMockBroker.pas Added Paths: ----------- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantBrokers.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantMetadata.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantTypes.pas Modified: branches/Refactor_InstantPersistenceUnit/Demos/Intro/Intro.dpr =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/Intro/Intro.dpr 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/Intro/Intro.dpr 2006-08-06 04:35:11 UTC (rev 697) @@ -2,8 +2,8 @@ uses Forms, + Model in 'Model.pas', Main in 'Main.pas' {MainForm}, - Model in 'Model.pas', ContactEdit in 'ContactEdit.pas' {ContactEditForm}, PersonEdit in 'PersonEdit.pas' {PersonEditForm}, CompanyEdit in 'CompanyEdit.pas' {CompanyEditForm}; Modified: branches/Refactor_InstantPersistenceUnit/Demos/Intro/Intro.mdr =================================================================== (Binary files differ) Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicBrowse.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicBrowse.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicBrowse.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit BasicBrowse; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, DB, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicEdit.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicEdit.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicEdit.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit BasicEdit; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, DB, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicView.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicView.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/BasicView.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,7 +2,11 @@ interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} uses SysUtils, Classes, Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CategoryBrowse.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CategoryBrowse.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CategoryBrowse.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,6 +2,12 @@ interface +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CompanyBrowse.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CompanyBrowse.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CompanyBrowse.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,6 +2,12 @@ interface +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CompanyEdit.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CompanyEdit.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CompanyEdit.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit CompanyEdit; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactBrowse.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactBrowse.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactBrowse.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,6 +2,12 @@ interface +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactEdit.dfm =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactEdit.dfm 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactEdit.dfm 2006-08-06 04:35:11 UTC (rev 697) @@ -197,7 +197,6 @@ end end object PhonesExposer: TInstantExposer [2] - Options = [] ContainerName = 'Phones' MasterSource = SubjectSource Mode = amContent Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactEdit.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactEdit.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactEdit.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit ContactEdit; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactFilterEdit.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactFilterEdit.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactFilterEdit.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit ContactFilterEdit; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactSort.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactSort.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactSort.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit ContactSort; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} @@ -40,7 +46,8 @@ implementation uses - Model, TypInfo, InstantRtti, InstantPresentation; + Model, TypInfo, InstantRtti, InstantPresentation, InstantMetadata, + InstantTypes; {$R *.dfm} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactView.dfm =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactView.dfm 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactView.dfm 2006-08-06 04:35:11 UTC (rev 697) @@ -70,8 +70,6 @@ Height = 28 Align = alLeft BorderWidth = 1 - EdgeBorders = [] - Flat = True Images = ActionImages ParentShowHint = False ShowHint = True Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactView.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactView.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/ContactView.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,11 +1,11 @@ unit ContactView; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} -{$IFDEF VER150} -{$WARN UNSAFE_TYPE OFF} -{$WARN UNSAFE_CAST OFF} -{$WARN UNSAFE_CODE OFF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} {$ENDIF} uses Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CountryBrowse.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CountryBrowse.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/CountryBrowse.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,6 +2,12 @@ interface +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, BasicBrowse, DB, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/DemoData.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/DemoData.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/DemoData.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,6 +2,12 @@ interface +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses Classes, Model, InstantPersistence, RandomData; Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/DemoDataRequest.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/DemoDataRequest.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/DemoDataRequest.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit DemoDataRequest; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/HelpView.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/HelpView.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/HelpView.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,6 +2,12 @@ interface +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, BasicView, OleCtrls, SHDocVw, StdCtrls, ExtCtrls, ComCtrls; Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Main.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Main.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Main.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,11 +1,11 @@ unit Main; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} -{$IFDEF VER150} -{$WARN UNSAFE_TYPE OFF} -{$WARN UNSAFE_CAST OFF} -{$WARN UNSAFE_CODE OFF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} {$ENDIF} uses @@ -108,7 +108,8 @@ procedure Connect; procedure Disconnect; procedure Reset; - property ActiveSubView: TBasicViewForm read FActiveSubView write SetActiveSubView; + property ActiveSubView: TBasicViewForm read FActiveSubView + write SetActiveSubView; property Connector: TInstantConnector read FConnector; property ConnectionName: string read GetConnectionName; property IsConnected: Boolean read GetIsConnected; @@ -124,7 +125,8 @@ implementation uses - Contnrs, Model, Welcome, MainData, RandomData, DemoData, Utility, ContactView, PerformanceView, + Contnrs, Model, Welcome, MainData, RandomData, DemoData, Utility, ContactView, + PerformanceView, {$IFDEF MSWINDOWS} HelpView, JPeg, {$ENDIF} @@ -132,7 +134,7 @@ HelpViewK3, {$ENDIF} DemoDataRequest, InstantPresentation, InstantClasses, - QueryView, InstantImageUtils, + QueryView, InstantImageUtils, InstantTypes, { Note: This demo attempts to include brokers for the data access layers supported natively by Delphi. To include additional brokers, Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/MainData.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/MainData.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/MainData.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit MainData; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PerformanceView.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PerformanceView.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PerformanceView.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,11 +1,11 @@ unit PerformanceView; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} -{$IFDEF VER150} -{$WARN UNSAFE_TYPE OFF} -{$WARN UNSAFE_CAST OFF} -{$WARN UNSAFE_CODE OFF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} {$ENDIF} uses @@ -173,7 +173,7 @@ {$R *.dfm} uses - Model, DemoData, IniFiles, Utility; + InstantBrokers, Model, DemoData, IniFiles, Utility; { TTestResult } Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PersonBrowse.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PersonBrowse.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PersonBrowse.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,6 +2,12 @@ interface +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PersonEdit.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PersonEdit.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PersonEdit.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit PersonEdit; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Primer.dpr =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Primer.dpr 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Primer.dpr 2006-08-06 04:35:11 UTC (rev 697) @@ -32,8 +32,13 @@ program Primer; +{$IFDEF LINUX} {$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses Forms, Main in 'Main.pas' {MainForm}, Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PrimerExternal.dpr =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PrimerExternal.dpr 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/PrimerExternal.dpr 2006-08-06 04:35:11 UTC (rev 697) @@ -31,8 +31,13 @@ program PrimerExternal; -{$I '../../InstantDefines.inc'} +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses Forms, Main in 'Main.pas' {MainForm}, Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/QueryView.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/QueryView.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/QueryView.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit QueryView; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + uses SysUtils, Classes, {$IFDEF MSWINDOWS} Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/RandomData.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/RandomData.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/RandomData.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,10 +2,10 @@ interface -{$IFDEF VER150} -{$WARN UNSAFE_TYPE OFF} -{$WARN UNSAFE_CAST OFF} -{$WARN UNSAFE_CODE OFF} +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} {$ENDIF} type Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Stopwatch.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Stopwatch.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Stopwatch.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -2,7 +2,11 @@ interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} uses SysUtils, Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Utility.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Utility.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Utility.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,7 +1,13 @@ unit Utility; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} +{$ENDIF} + procedure BeginBusy; procedure EndBusy; function Confirm(const Text: string): Boolean; Modified: branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Welcome.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Welcome.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Demos/PrimerCross/Welcome.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -1,9 +1,11 @@ unit Welcome; interface -{$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF} -{$IFDEF VER150} -{$WARN UNSAFE_TYPE OFF} + +{$IFDEF LINUX} +{$I '../../Source/InstantDefines.inc'} +{$ELSE} +{$I '..\..\Source\InstantDefines.inc'} {$ENDIF} uses Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDE.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDE.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDE.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -44,7 +44,7 @@ uses Classes, Db, DBTables, SysUtils, InstantPersistence, InstantCommand, - InstantConsts; + InstantBrokers, InstantMetadata, InstantTypes, InstantConsts; type TInstantBDEDriverType = (dtUnknown, dtStandard, dtInterBase, dtMSAccess, Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDECatalog.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDECatalog.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDECatalog.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -38,7 +38,8 @@ interface uses - InstantPersistence, DB, DBTables; + InstantPersistence, DB, DBTables, InstantMetadata, InstantBrokers, + InstantTypes; type // A TInstantCatalog that reads catalog information from a BDE Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDEConnectionDefEdit.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDEConnectionDefEdit.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/BDE/InstantBDEConnectionDefEdit.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -40,7 +40,7 @@ uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - InstantBDE, StdCtrls, ExtCtrls; + InstantBDE, StdCtrls, ExtCtrls, InstantMetadata; type TInstantBDEConnectionDefEditForm = class(TForm) @@ -84,7 +84,7 @@ {$R *.DFM} uses - DbTables, InstantPersistence, InstantClasses, InstantConsts; + DbTables, InstantPersistence, InstantClasses, InstantTypes, InstantConsts; const NoAlias = '(None)'; Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/IBX/InstantIBX.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/IBX/InstantIBX.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/IBX/InstantIBX.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -40,7 +40,7 @@ uses Classes, Db, IBDatabase, IBTable, IBQuery, SysUtils, InstantPersistence, - InstantClasses, InstantCommand; + InstantBrokers, InstantClasses, InstantCommand, InstantMetadata, InstantTypes; type TInstantIBXOption = (ibxUseDelimitedIdents); Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/IBX/InstantIBXConnectionDefEdit.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/IBX/InstantIBXConnectionDefEdit.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/IBX/InstantIBXConnectionDefEdit.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -89,7 +89,7 @@ {$R *.DFM} uses - IB, InstantPersistence, InstantClasses, InstantConsts; + IB, InstantPersistence, InstantClasses, InstantTypes, InstantConsts; { TInstantIBXConnectionDefEditForm } Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDB.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDB.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDB.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -43,7 +43,8 @@ {$IFDEF MSWINDOWS} Windows, {$ENDIF} - Classes, DB, InstantPersistence, InstantCommand, + Classes, DB, InstantPersistence, InstantBrokers, InstantCommand, + InstantMetadata, InstantTypes, nxptBasePooledTransport, nxsdServerEngine, nxdb, nxsdDataDictionary; type @@ -842,7 +843,7 @@ end; {$ENDIF} -{ TInstantNexusDBSQLQuery } +{ TInstantNexusDBQuery } class function TInstantNexusDBQuery.TranslatorClass: TInstantRelationalTranslatorClass; Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDBCatalog.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDBCatalog.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDBCatalog.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -39,7 +39,7 @@ interface uses - InstantPersistence; + InstantPersistence, InstantBrokers, InstantMetadata, InstantTypes; type // A TInstantCatalog that reads catalog information from a NexusDb Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDBConnectionDefEdit.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDBConnectionDefEdit.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/NexusDb/InstantNexusDBConnectionDefEdit.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -124,9 +124,7 @@ {$WARN UNIT_PLATFORM ON} {$ENDIF} {$ENDIF} - InstantClasses, - InstantPersistence, - InstantConsts, + InstantClasses, InstantPersistence, InstantTypes, InstantConsts, InstantNexusDBConsts; { TInstantNexusDBConnectionDefEditForm } Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/XML/InstantXML.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/XML/InstantXML.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/XML/InstantXML.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -42,7 +42,8 @@ interface uses - Classes, DB, InstantPersistence, InstantCommand, Contnrs; + Classes, DB, Contnrs, InstantPersistence, InstantBrokers, InstantCommand, + InstantMetadata, InstantTypes; const XML_UTF8_HEADER = '<?xml version="1.0" encoding="UTF-8"?>'; Modified: branches/Refactor_InstantPersistenceUnit/Source/Brokers/XML/InstantXMLCatalog.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Brokers/XML/InstantXMLCatalog.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Brokers/XML/InstantXMLCatalog.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -45,7 +45,7 @@ {$IFDEF MSWINDOWS} FileCtrl, {$ENDIF} - InstantPersistence; + InstantPersistence, InstantBrokers, InstantMetadata, InstantTypes; type // A TInstantCatalog that reads catalog information from a XML Modified: branches/Refactor_InstantPersistenceUnit/Source/Catalogs/IBFb/InstantIBFbCatalog.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Catalogs/IBFb/InstantIBFbCatalog.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Catalogs/IBFb/InstantIBFbCatalog.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -39,7 +39,7 @@ interface uses - InstantPersistence; + InstantPersistence, InstantBrokers, InstantMetadata, InstantTypes; type // A TInstantCatalog that reads catalog information from an InterBase Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/D2006/IOCore.dpk =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/D2006/IOCore.dpk 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/D2006/IOCore.dpk 2006-08-06 04:35:11 UTC (rev 697) @@ -54,6 +54,9 @@ InstantDBEvolution in '..\InstantDBEvolution.pas', InstantCustomDBEvolverFormUnit in '..\InstantCustomDBEvolverFormUnit.pas' {InstantCustomDBEvolverForm}, InstantDBEvolverFormUnit in '..\InstantDBEvolverFormUnit.pas' {InstantDBEvolverForm}, - InstantDBBuilderFormUnit in '..\InstantDBBuilderFormUnit.pas' {InstantDBBuilderForm}; + InstantDBBuilderFormUnit in '..\InstantDBBuilderFormUnit.pas' {InstantDBBuilderForm}, + InstantTypes in '..\InstantTypes.pas', + InstantBrokers in '..\InstantBrokers.pas', + InstantMetadata in '..\InstantMetadata.pas'; end. Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/D5/IOCore_D5.dpk =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/D5/IOCore_D5.dpk 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/D5/IOCore_D5.dpk 2006-08-06 04:35:11 UTC (rev 697) @@ -52,6 +52,9 @@ InstantCustomDBEvolverFormUnit in '..\InstantCustomDBEvolverFormUnit.pas' {InstantCustomDBEvolverForm}, InstantDBEvolverFormUnit in '..\InstantDBEvolverFormUnit.pas' {InstantDBEvolverForm}, InstantDBEvolution in '..\InstantDBEvolution.pas', - InstantDBBuild in '..\InstantDBBuild.pas'; + InstantDBBuild in '..\InstantDBBuild.pas', + InstantTypes in '..\InstantTypes.pas', + InstantBrokers in '..\InstantBrokers.pas', + InstantMetadata in '..\InstantMetadata.pas'; end. Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/D6/IOCore.dpk =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/D6/IOCore.dpk 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/D6/IOCore.dpk 2006-08-06 04:35:11 UTC (rev 697) @@ -54,6 +54,9 @@ InstantConnectionManagerFormUnit in '..\InstantConnectionManagerFormUnit.pas' {InstantConnectionManagerForm}, InstantCustomDBEvolverFormUnit in '..\InstantCustomDBEvolverFormUnit.pas' {InstantCustomDBEvolverForm}, InstantDBBuilderFormUnit in '..\InstantDBBuilderFormUnit.pas' {InstantDBBuilderForm}, - InstantDBEvolverFormUnit in '..\InstantDBEvolverFormUnit.pas' {InstantDBEvolverForm}; + InstantDBEvolverFormUnit in '..\InstantDBEvolverFormUnit.pas' {InstantDBEvolverForm}, + InstantTypes in '..\InstantTypes.pas', + InstantBrokers in '..\InstantBrokers.pas', + InstantMetadata in '..\InstantMetadata.pas'; end. Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/D7/IOCore.dpk =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/D7/IOCore.dpk 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/D7/IOCore.dpk 2006-08-06 04:35:11 UTC (rev 697) @@ -55,6 +55,9 @@ InstantDBEvolution in '..\InstantDBEvolution.pas', InstantCustomDBEvolverFormUnit in '..\InstantCustomDBEvolverFormUnit.pas' {InstantCustomDBEvolverForm}, InstantDBEvolverFormUnit in '..\InstantDBEvolverFormUnit.pas' {InstantDBEvolverForm}, - InstantDBBuilderFormUnit in '..\InstantDBBuilderFormUnit.pas' {InstantDBBuilderForm}; + InstantDBBuilderFormUnit in '..\InstantDBBuilderFormUnit.pas' {InstantDBBuilderForm}, + InstantTypes in '..\InstantTypes.pas', + InstantBrokers in '..\InstantBrokers.pas', + InstantMetadata in '..\InstantMetadata.pas'; end. Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantAccessors.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantAccessors.pas 2006-08-06 03:40:47 UTC (rev 696) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantAccessors.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -158,6 +158,7 @@ else Result := InternalObjectCount; end; + function TInstantObjectAccessor.GetSubject: TInstantObject; begin Result := inherited Subject as TInstantObject; Added: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantBrokers.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantBrokers.pas (rev 0) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantBrokers.pas 2006-08-06 04:35:11 UTC (rev 697) @@ -0,0 +1,5954 @@ +(* + * InstantObjects + * Broker and Connector Classes + *) + +(* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is: Seleqt InstantObjects + * + * The Initial Developer of the Original Code is: Seleqt + * + * Portions created by the Initial Developer are Copyright (C) 2001-2003 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Carlo Barazzetta, Andrea Petrelli, Nando Dessena, Steven Mitchell, + * Joao Morais, Cesar Coll, Uberto Barbini, David Taylor, Hanedi Salas, + * Riceball Lee, David Moorhouse + * + * ***** END LICENSE BLOCK ***** *) + +unit InstantBrokers; + +{$IFDEF LINUX} +{$I '../InstantDefines.inc'} +{$ELSE} +{$I '..\InstantDefines.inc'} +{$ENDIF} + +interface + +uses SysUtils, Classes, Db, InstantPersistence, InstantTypes, InstantMetadata, + InstantConsts, InstantClasses, Contnrs, InstantCommand; + +type + TInstantBrokerCatalog = class; + TInstantConnectionBasedConnector = class; + TInstantCustomRelationalBroker = class; + TInstantCustomRelationalQuery = class; + TInstantCustomRelationalQueryClass = class of TInstantCustomRelationalQuery; + TInstantCustomResolver = class; + TInstantLinkResolver = class; + TInstantNavigationalBroker = class; + TInstantNavigationalLinkResolver = class; + TInstantNavigationalResolver = class; + TInstantNavigationalResolverClass = class of TInstantNavigationalResolver; + TInstantRelationalConnector = class; + TInstantRelationalTranslator = class; + TInstantRelationalTranslatorClass = class of TInstantRelationalTranslator; + TInstantSQLBroker = class; + TInstantSQLBrokerCatalog = class; + TInstantSQLGenerator = class; + TInstantSQLGeneratorClass = class of TInstantSQLGenerator; + TInstantSQLLinkResolver = class; + TInstantSQLResolver = class; + TInstantStatementCache = class; + + PObjectRow = ^TObjectRow; + TObjectRow = record + Row: Integer; + Instance: TObject; + end; + + PInstantOperationInfo = ^TInstantOperationInfo; + TInstantOperationInfo = record + Success: Boolean; + Conflict: Boolean; + end; + + TInstantBrokerOperation = procedure(AObject: TInstantObject; + const AObjectId: string; Map: TInstantAttributeMap; + ConflictAction: TInstantConflictAction = caFail; + Info: PInstantOperationInfo = nil) of object; + TInstantGetDataSetEvent = procedure(Sender: TObject; + const CommandText: string; var DataSet: TDataset) of object; + TInstantInitDataSetEvent = procedure(Sender: TObject; + const CommandText: string; DataSet: TDataSet) of object; + TInstantNavigationalResolverOperation = procedure(AObject: TInstantObject; + AttributeMetadata: TInstantAttributeMetadata) of object; + + + TInstantCustomRelationalBroker = class(TInstantBroker) + private + FStatementCache: TInstantStatementCache; + FStatementCacheCapacity: Integer; + procedure DisposeMap(AObject: TInstantObject; const AObjectId: string; + Map: TInstantAttributeMap; ConflictAction: TInstantConflictAction; + Info: PInstantOperationInfo); + function GetConnector: TInstantRelationalConnector; + function PerformOperation(AObject: TInstantObject; const AObjectId: string; + OperationType: TInstantOperationType; Operation: TInstantBrokerOperation; + ConflictAction: TInstantConflictAction): Boolean; + procedure RetrieveMap(AObject: TInstantObject; const AObjectId: string; + Map: TInstantAttributeMap; ConflictAction: TInstantConflictAction; + Info: PInstantOperationInfo); + procedure StoreMap(AObject: TInstantObject; const AObjectId: string; + Map: TInstantAttributeMap; ConflictAction: TInstantConflictAction; + Info: PInstantOperationInfo); + function GetStatementCache: TInstantStatementCache; + procedure SetStatementCacheCapacity(const Value: Integer); + protected + property StatementCache: TInstantStatementCache read GetStatementCache; + function EnsureResolver(Map: TInstantAttributeMap): TInstantCustomResolver; + virtual; abstract; + function GetDBMSName: string; virtual; + function GetSQLDelimiters: string; virtual; + function GetSQLQuote: Char; virtual; + function GetSQLWildcard: string; virtual; + function InternalDisposeObject(AObject: TInstantObject; + ConflictAction: TInstantConflictAction): Boolean; override; + function InternalRetrieveObject(AObject: TInstantObject; + const AObjectId: string; ConflictAction: TInstantConflictAction): Boolean; + override; + function InternalStoreObject(AObject: TInstantObject; + ConflictAction: TInstantConflictAction): Boolean; override; + public + constructor Create(AConnector: TInstantConnector); override; + destructor Destroy; override; + function Execute(const AStatement: string; AParams: TParams = nil): Integer; + virtual; + property Connector: TInstantRelationalConnector read GetConnector; + property DBMSName: string read GetDBMSName; + property SQLDelimiters: string read GetSQLDelimiters; + property SQLQuote: Char read GetSQLQuote; + property SQLWildcard: string read GetSQLWildCard; + property StatementCacheCapacity: Integer read FStatementCacheCapacity + write SetStatementCacheCapacity; + end; + + TInstantNavigationalBroker = class(TInstantCustomRelationalBroker) + private + FResolverList: TObjectList; + function GetResolverCount: Integer; + function GetResolverList: TObjectList; + function GetResolvers(Index: Integer): TInstantnavigationalResolver; + property ResolverList: TObjectList read GetResolverList; + protected + function CreateResolver(const TableName: string): + TInstantNavigationalResolver; virtual; abstract; + function EnsureResolver(Map: TInstantAttributeMap): TInstantCustomResolver; + override; + function FindResolver(const TableName: string): + TInstantNavigationalResolver; + property ResolverCount: Integer read GetResolverCount; + property Resolvers[Index: Integer]: TInstantNavigationalResolver + read GetResolvers; + public + destructor Destroy; override; + end; + + //Backwards compatibility + TInstantRelationalBroker = TInstantNavigationalBroker; + + TInstantSQLBroker = class(TInstantCustomRelationalBroker) + private + FGenerator: TInstantSQLGenerator; + FResolverList: TObjectList; + function GetResolverList: TObjectList; + function GetResolverCount: Integer; + function GetResolvers(Index: Integer): TInstantSQLResolver; + function GetGenerator: TInstantSQLGenerator; + protected + function CreateResolver(Map: TInstantAttributeMap): TInstantSQLResolver; + virtual; abstract; + function EnsureResolver(AMap: TInstantAttributeMap): TInstantCustomResolver; + override; + procedure InternalBuildDatabase(Scheme: TInstantScheme); override; + property ResolverList: TObjectList read GetResolverList; + procedure AssignDataSetParams(DataSet : TDataSet; AParams: TParams); + virtual; + function CreateDataSet(const AStatement: string; AParams: TParams = nil): + TDataSet; virtual; abstract; + public + destructor Destroy; override; + function AcquireDataSet(const AStatement: string; AParams: TParams = nil): + TDataSet; virtual; + procedure ReleaseDataSet(const ADataSet: TDataSet); virtual; + function DataTypeToColumnType(DataType: TInstantDataType; + Size: Integer): string; virtual; abstract; + function FindResolver(AMap: TInstantAttributeMap): TInstantSQLResolver; + class function GeneratorClass: TInstantSQLGeneratorClass; virtual; + property Generator: TInstantSQLGenerator read GetGenerator; + property ResolverCount: Integer read GetResolverCount; + property Resolvers[Index: Integer]: TInstantSQLResolver read GetResolvers; + end; + + TInstantRelationalConnector = class(TInstantConnector) + private + FOnGetDataSet: TInstantGetDataSetEvent; + FOnInitDataSet: TInstantInitDataSetEvent; + protected + procedure DoGetDataSet(const CommandText: string; var DataSet: TDataSet); + procedure DoInitDataSet(const CommandText: string; DataSet: TDataSet); + function GetBroker: TInstantCustomRelationalBroker; + procedure GetDataSet(const CommandText: string; var DataSet: TDataSet); + virtual; + function GetDBMSName: string; virtual; + procedure InitDataSet(const CommandText: string; DataSet: TDataSet); + virtual; + function InternalCreateScheme(Model: TInstantModel): TInstantScheme; + override; + public + property Broker: TInstantCustomRelationalBroker read GetBroker; + property DBMSName: string read GetDBMSName; + published + property OnGetDataSet: TInstantGetDataSetEvent read FOnGetDataSet + write FOnGetDataSet; + property OnInitDataSet: TInstantInitDataSetEvent read FOnInitDataSet + write FOnInitDataSet; + end; + + TInstantConnectionBasedConnector = class(TInstantRelationalConnector) + private + FConnection: TCustomConnection; + FLoginPrompt: Boolean; + procedure DoAfterConnectionChange; + procedure DoBeforeConnectionChange; + function GetConnection: TCustomConnection; + function GetLoginPrompt: Boolean; + procedure SetConnection(Value: TCustomConnection); + procedure SetLoginPrompt(const Value: Boolean); + protected + procedure AssignLoginOptions; virtual; + procedure AfterConnectionChange; virtual; + procedure BeforeConnectionChange; virtual; + procedure CheckConnection; + function GetConnected: Boolean; override; + procedure InternalConnect; override; + procedure InternalDisconnect; override; + procedure Notification(AComponent: TComponent; Operation: TOperation); + override; + public + property Connection: TCustomConnection read GetConnection + write SetConnection; + function HasConnection: Boolean; + constructor Create(AOwner: TComponent); override; + published + property LoginPrompt: Boolean read GetLoginPrompt write SetLoginPrompt + default True; + end; + + TInstantCustomResolver = class(TInstantStreamable) + private + FBroker: TInstantCustomRelationalBroker; + protected + function KeyViolation(AObject: TInstantObject; const AObjectId: string; + E: Exception): EInstantKeyViolation; + procedure InternalDisposeMap(AObject: TInstantObject; + Map: TInstantAttributeMap; ConflictAction: TInstantConflictAction; + Info: PInstantOperationInfo); virtual; + procedure InternalRetrieveMap(AObject: TInstantObject; + const AObjectId: string; Map: TInstantAttributeMap; + ConflictAction: TInstantConflictAction; Info: PInstantOperationInfo); + virtual; + procedure InternalStoreMap(AObject: TInstantObject; + Map: TInstantAttributeMap; ConflictAction: TInstantConflictAction; + Info: PInstantOperationInfo); virtual; + public + constructor Create(ABroker: TInstantCustomRelationalBroker); + procedure DisposeMap(AObject: TInstantObject; Map: TInstantAttributeMap; + ConflictAction: TInstantConflictAction; Info: PInstantOperationInfo); + procedure DisposeObject(AObject: TInstantObject; Conflict: + TInstantConflictAction); + procedure RetrieveMap(AObject: TInstantObject; const AObjectId: string; + Map: TInstantAttributeMap; ConflictAction: TInstantConflictAction; + Info: PInstantOperationInfo); + procedure StoreMap(AObject: TInstantObject; Map: TInstantAttributeMap; + ConflictAction: TInstantConflictAction; Info: PInstantOperationInfo); + procedure StoreObject(AObject: TInstantObject; Conflict: + TInstantConflictAction); + property Broker: TInstantCustomRelationalBroker read FBroker; + end; + + TInstantNavigationalResolver = class(TInstantCustomResolver) + private + FDataSet: TDataSet; + FFreeDataSet: Boolean; + FNavigationalLinkResolvers: TObjectList; + FTableName: string; + function CheckConflict(AObject: TInstantObject; const AObjectId: string; + ConflictAction: TInstantConflictAction): Boolean; + procedure ClearAttribute(AObject: TInstantObject; + AttributeMetadata: TInstantAttributeMetadata); + function FieldByName(const FieldName: string): TField; + procedure FreeDataSet; + function GetBroker: TInstantNavigationalBroker; + function GetDataSet: TDataSet; + function GetNavigationalLinkResolvers: TObjectList; + function GetObjectClassName: string; + function GetObjectId: string; + procedure PerformOperation(AObject: TInstantObject; + Map: TInstantAttributeMap; Operation: + TInstantNavigationalResolverOperation); + procedure ReadAttribute(AObject: TInstantObject; + AttributeMetadata: TInstantAttributeMetadata); + procedure ResetAttribute(AObject: TInstantObject; + AttributeMetadata: TInstantAttributeMetadata); + procedure SetDataSet(Value: TDataset); + procedure WriteAttribute(AObject: TInstantObject; + AttributeMetadata: TInstantAttributeMetadata); + protected + procedure Append; virtual; + procedure Cancel; virtual; + procedure ClearBlob(Attribute: TInstantBlob); virtual; + procedure ClearBoolean(Attribute: TInstantBoolean); virtual; + procedure ClearDateTime(Attribute: TInstantDateTime); virtual; + procedure ClearInteger(Attribute: TInstantInteger); virtual; + procedure ClearFloat(Attribute: TInstantFloat); virtual; + procedure ClearCurrency(Attribute: TInstantCurrency); virtual; + procedure ClearMemo(Attribute: TInstantMemo); virtual; + procedure ClearPart(Attribute: TInstantPart); virtual; + procedure ClearParts(Attribute: TInstantParts); virtual; + procedure ClearReference(Attribute: TInstantReference); virtual; + procedure ClearReferences(Attribute: TInstantReferences); virtual; + procedure ClearString(Attribute: TInstantString); virtual; + procedure Close; virtual; + function CreateDataSet: TDataSet; virtual; abstract; + function CreateNavigationalLinkResolver(const ATableName: string): + TInstantNavigationalLinkResolver; virtual; abstract; + function CreateLocateVarArray(const AObjectClassName, AObjectId: string): + Variant; + procedure Delete; virtual; + procedure Edit; virtual; + function GetLinkDatasetResolver(const ATableName: string): + TInstantNavigationalLinkResolver; + function FieldHasObjects(Field: TField): Boolean; virtual; + function FindLinkDatasetResolver(const ATableName: string): + TInstantNavigationalLinkResolver; + procedure InternalDisposeMap(AObject: TInstantObject; + Map: TInstantAttributeMap; ConflictAction: TInstantConflictAction; + Info: PInstantOperationInfo); override; + procedure InternalRetrieveMap(AObject: TInstantObject; + const AObjectId: string; Map: TInstantAttributeMap; + ConflictAction: TInstantConflictAction; + Info: PInstantOperationInfo); override; + procedure InternalStoreMap(AObject: TInstantObject; + Map: TInstantAttributeMap; + ConflictAction: TInstantConflictAction; Info: PInstantOperationInfo); + override; + function Locate(const AObjectClassName, AObjectId: string): Boolean; + virtual; abstract; + procedure Open; virtual; + procedure Post; virtual; + procedure ReadBlob(Attribute: TInstantBlob); virtual; + procedure ReadBoolean(Attribute: TInstantBoolean); virtual; + procedure ReadDateTime(Attribute: TInstantDateTime); virtual; + procedure ReadInteger(Attribute: TInstantInteger); virtual; + procedure ReadFloat(Attribute: TInstantFloat); virtual; + procedure ReadCurrency(Attribute: TInstantCurrency); virtual; + procedure ReadMemo(Attribute: TInstantMemo); virtual; + procedure ReadPart(Attribute: TInstantPart); virtual; + procedure ReadParts(Attribute: TInstantParts); virtual; + procedure ReadReference(Attribute: TInstantReference); virtual; + procedure ReadReferences(Attribute: TInstantReferences); virtual; + procedure ReadString(Attribute: TInstantString); virtual; + procedure ResetAttributes(AObject: TInstantObject; + Map: TInstantAttributeMap); + procedure SetObjectUpdateCount(AObject: TInstantObject; Value: Integer); + function TranslateError(AObject: TInstantObject; E: Exception): Exception; + virtual; + procedure WriteBlob(Attribute: TInstantBlob); virtual; + procedure WriteBoolean(Attribute: TInstantBoolean); virtual; + procedure WriteDateTime(Attribute: TInstantDateTime); virtual; + procedure WriteFloat(Attribute: TInstantFloat); virtual; + procedure WriteCurrency(Attribute: TInstantCurrency); virtual; + procedure WriteInteger(Attribute: TInstantInteger); virtual; + procedure WriteMemo(Attribute: TInstantMemo); virtual; + procedure WritePart(Attribute: TInstantPart); virtual; + procedure WriteParts(Attribute: TInstantParts); virtual; + procedure WriteReference(Attribute: TInstantReference); virtual; + procedure WriteReferences(Attribute: TInstantReferences); virtual; + procedure WriteString(Attribute: TInstantString); virtual; + property DataSet: TDataset read GetDataSet write SetDataSet; + property NavigationalLinkResolvers: TObjectList read + GetNavigationalLinkResolvers; + public + constructor Create(ABroker: TInstantNavigationalBroker; + const ATableName: string); + destructor Destroy; override; + property Broker: TInstantNavigationalBroker read GetBroker; + property ObjectClassName: string read GetObjectClassName; + property ObjectId: string read GetObjectId; + property TableName: string read FTableName; + end; + + //Backwards compatibility + TInstantResolver = TInstantNavigationalResolver; + + TInstantSQLResolver = class(TInstantCustomResolver) + private + FMap: TInstantAttributeMap; + FDeleteSQL: string; + FDeleteConcurrentSQL: string; + FInsertSQL: string; + FSelectSQL: string; + FUpdateSQL: string; + FUpdateConcurrentSQL: string; + FSelectExternalSQL: string; + FSelectExternalPartSQL: string; + FDeleteExternalSQL: string; + FInsertExternalSQL: string; + procedure AddIntegerParam(Params: TParams; const ParamName: string; + Value: Integer); + procedure AddStringParam(Params: TParams; const ParamName, Value: string); + // Adds an "Id" param, whose data type and size depends on connector + // settings. + procedure AddIdParam(Params: TParams; const ParamName, Value: string); + procedure CheckConflict(Info: PInstantOperationInfo; + AObject: TInstantObject); + function ExecuteStatement(const AStatement: string; AParams: TParams; + Info: PInstantOperationInfo; ConflictAction: TInstantConflictAction; + AObject: TInstantObject): Integer; + function GetDeleteConcurrentSQL: string; + function GetDeleteSQL: string; + function GetInsertSQL: string; + function GetSelectSQL: string; + function GetUpdateConcurrentSQL: string; + function GetUpdateSQL: string; + function GetBroker: TInstantSQLBroker; + function GetSelectExternalSQL: string; + function GetSelectExternalPartSQL: string; + function GetDeleteExternalSQL: string; + function GetInsertExternalSQL: string; + protected + procedure AddAttributeParam(Attribute: TInstantAttribute; + Params: TParams); virtual; + procedure AddAttributeParams(Params: TParams; AObject: TInstantObject; + Map: TInstantAttributeMap); + procedure AddBaseParams(Params: TParams; AClassName, AObjectId: string; + AUpdateCount: Integer = -1); + procedure AddConcurrencyParam(Params: TParams; AUpdateCoun... [truncated message content] |
From: <sr...@us...> - 2006-08-09 00:04:22
|
Revision: 701 Author: srmitch Date: 2006-08-08 17:04:12 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=701&view=rev Log Message: ----------- - Changed TInstantAbstractAttribute.Initialize to abstract. - Added empty TInstantAttribute.Initialize method. Modified Paths: -------------- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas 2006-08-07 11:30:35 UTC (rev 700) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantClasses.pas 2006-08-09 00:04:12 UTC (rev 701) @@ -404,7 +404,7 @@ procedure SetOwner(AOwner: TInstantAbstractObject); function GetMetadata: TInstantCollectionItem; procedure SetMetadata(AMetadata: TInstantCollectionItem); - procedure Initialize; virtual; + procedure Initialize; virtual; abstract; public constructor Create(AOwner: TInstantAbstractObject; AMetadata: TInstantCollectionItem); virtual; @@ -1944,10 +1944,6 @@ Result := FOwner; end; -procedure TInstantAbstractAttribute.Initialize; -begin -end; - procedure TInstantAbstractAttribute.SetMetadata( AMetadata: TInstantCollectionItem); begin Modified: branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas =================================================================== --- branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas 2006-08-07 11:30:35 UTC (rev 700) +++ branches/Refactor_InstantPersistenceUnit/Source/Core/InstantPersistence.pas 2006-08-09 00:04:12 UTC (rev 701) @@ -179,6 +179,7 @@ function GetIsDefault: Boolean; virtual; function GetIsMandatory: Boolean; virtual; function GetOwner: TInstantObject; reintroduce; virtual; + procedure Initialize; override; procedure ReadName(Reader: TInstantReader); procedure SetAsBoolean(AValue: Boolean); virtual; procedure SetAsCurrency(AValue: Currency); virtual; @@ -2384,6 +2385,10 @@ Result := AsVariant; end; +procedure TInstantAttribute.Initialize; +begin +end; + procedure TInstantAttribute.ReadName(Reader: TInstantReader); begin Reader.ReadStr; |