Using Caché Objects
Contents
[Home]  [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Preface : 
 
 
Chapter 1: 
  1.1 Caché Objects Architecture
1.2 Class Definitions and the Class Dictionary
1.2.1 Creating Class Definitions
1.2.2 The Class Dictionary
1.3 The Caché Class Library
1.4 Development Tools
1.4.1 Studio
1.4.2 SQL-Based Development
1.4.3 XML-Based Development
1.5 User Interface Development and Client Connectivity
Chapter 2: 
  2.1 Introduction to Terminology
2.2 Kinds of Classes
2.2.1 Object Classes
2.2.2 Data Type Classes
2.3 Kinds of Class Members
2.3.1 Kinds of Properties
2.4 Defining a Class: The Basics
2.4.1 Choosing a Superclass
2.4.2 Include Files
2.4.3 Specifying Class Keywords
2.4.4 Introduction to Defining Class Parameters
2.4.5 Introduction to Defining Properties
2.4.6 Introduction to Defining Methods
2.5 Naming Conventions
2.5.1 Rules for Class and Class Member Names
2.5.2 Class Names
2.5.3 Class Member Names
2.6 Inheritance
2.6.1 Use of Subclasses
2.6.2 Primary Superclass
2.6.3 Multiple Inheritance
2.6.4 Additional Topics
2.7 Introduction to Compiler Keywords
2.7.1 Example
2.7.2 Presentation of Keywords and Their Values
2.8 Creating Class Documentation
2.8.1 Introduction to the Class Reference
2.8.2 Creating Documentation to Include in the Class Reference
2.8.3 Using HTML Markup in Class Documentation
2.9 Compiling Classes
2.9.1 Invoking the Class Compiler
2.9.2 Class Compiler Notes
2.10 Making Classes Deployed
2.10.1 About Deployed Mode
Chapter 3: 
  3.1 Overview of Packages
3.2 Package Names
3.3 Defining Packages
3.4 Package Mapping
3.4.1 Mapping a Package Across Multiple Namespaces
3.5 Package Use When Referring to Classes
3.6 Importing Packages
3.6.1 Class Import Directive
3.6.2 ObjectScript #IMPORT Directive
3.6.3 Explicit Package Import Affects Access to User Package
3.6.4 Package Import and Inheritance
3.6.5 Tips for Importing Packages
Chapter 4: 
  4.1 Introduction to Class Parameters
4.2 Defining Class Parameters
4.3 Parameter Types and Values
4.3.1 Class Parameter to Be Evaluated at Runtime (COSEXPRESSION)
4.3.2 Class Parameter to Be Evaluated at Compile Time (Curly Braces)
4.3.3 Class Parameter to Be Updated at Runtime (CONFIGVALUE)
4.4 Referring to Parameters of a Class
Chapter 5: 
  5.1 Introduction to Methods
5.2 Defining Methods
5.3 Specifying Method Arguments: Basics
5.4 Indicating How Arguments Are to Be Passed
5.5 Specifying a Variable Number of Arguments
5.6 Returning a Value
5.7 Specifying the Implementation Language
5.8 Types of Methods (CodeMode Options)
5.8.1 Code Methods
5.8.2 Expression Methods
5.8.3 Call Methods
5.8.4 Method Generators
5.9 Projecting a Method As an SQL Stored Procedure
5.10 Calling Class Methods
5.10.1 Passing Arguments to a Method
5.11 Casting a Method
5.12 Overriding an Inherited Method
5.12.1 ##super()
5.12.2 ##super and Method Arguments
5.12.3 Calls That ##super Affects
5.12.4 Number of Arguments
Chapter 6: 
  6.1 Introduction to Object Classes
6.2 OREF Basics
6.2.1 INVALID OREF Error
6.2.2 Testing an OREF
6.2.3 OREFs, Scope, and Memory
6.2.4 Removing an OREF
6.2.5 OREFs, the SET Command, and System Functions
6.3 Creating New Objects
6.4 Viewing Object Contents
6.5 Introduction to Dot Syntax
6.5.1 Cascading Dot Syntax
6.5.2 Cascading Dot Syntax with a Null OREF
6.6 Validating Objects
6.7 Determining an Object Type
6.7.1 %Extends()
6.7.2 %IsA()
6.7.3 %ClassName() and the Most Specific Type Class (MSTC)
6.8 Cloning Objects
6.9 Referring to Properties of an Instance
6.10 Calling Methods of an Instance
6.11 Obtaining the Class Name from an Instance
6.12 $this Variable (Current Instance)
6.13 i%PropertyName (Instance Variables)
Chapter 7: 
  7.1 Persistent Classes
7.2 Introduction to the Default SQL Projection
7.3 Identifiers for Saved Objects: ID and OID
7.3.1 Projection of Object IDs to SQL
7.3.2 Object IDs in SQL
7.4 Class Members Specific to Persistent Classes
7.4.1 Storage Definitions
7.4.2 Indices
7.4.3 Foreign Keys
7.4.4 Triggers
7.5 Other Class Members
7.6 Extents
7.7 Extent Management
7.8 Extent Queries
Chapter 8: 
  8.1 Saving Objects
8.1.1 Rollback
8.1.2 Saving Objects and Transactions
8.2 Testing the Existence of Saved Objects
8.2.1 Testing for Object Existence with ObjectScript
8.2.2 Testing for Object Existence with SQL
8.3 Opening Saved Objects
8.3.1 Multiple Calls to %OpenId()
8.3.2 Concurrency
8.4 Swizzling
8.5 Reloading an Object from Disk
8.6 Reading Stored Values
8.7 Deleting Saved Objects
8.7.1 The %DeleteId() Method
8.7.2 The %DeleteExtent() Method
8.7.3 The %KillExtent() Method
8.8 Accessing Object Identifiers
8.9 Object Concurrency Options
8.9.1 Why Specify Concurrency?
8.9.2 Concurrency Values
8.9.3 Concurrency and Swizzled Objects
8.10 Version Checking (Alternative to Concurrency Argument)
Chapter 9: 
  9.1 Defining a Persistent Class
9.2 Projection of Packages to Schemas
9.3 Specifying the Table Name for a Persistent Class
9.4 Storage Definitions and Storage Classes
9.4.1 Updates to a Storage Definition
9.4.2 The %CacheStorage Storage Class
9.4.3 The %CacheSQLStorage Storage Class
9.5 Schema Evolution
9.6 Resetting the Storage Definition
9.7 Controlling How IDs Are Generated
9.8 Controlling the SQL Projection of Subclasses
9.8.1 Default SQL Projection of Subclasses
9.8.2 Alternative SQL Projection of Subclasses
9.9 Redefining a Persistent Class That Has Stored Data
Chapter 10: 
  10.1 Defining Literal Properties
10.1.1 Examples
10.2 Defining an Initial Expression for a Property
10.3 Defining a Property As Required
10.4 Defining a Computed Property
10.5 Defining a Multidimensional Property
10.6 Common Data Type Classes
10.6.1 Data Type Classes Grouped by SqlCategory
10.6.2 Data Type Classes Grouped by OdbcType
10.6.3 Data Type Classes Grouped by ClientDataType
10.7 Core Property Parameters
10.8 Class-Specific Property Parameters
10.8.1 Common Parameters
10.8.2 Parameters for XML and SOAP
10.8.3 Less Common Parameters
10.9 Defining Enumerated Properties
10.10 Specifying Values for Literal Properties
10.10.1 Specifying Values for a Multidimensional Property
10.11 Using Property Methods
10.12 Controlling the SQL Projection of Literal Properties
10.12.1 Specifying the Field Names
10.12.2 Specifying the Column Numbers
10.12.3 Effect of the Data Type Class and Property Parameters
10.12.4 Controlling the SQL Projection of Computed Properties
Chapter 11: 
  11.1 Introduction to Collections
11.2 Defining Collection Properties
11.3 Adding Items to a List Property
11.4 Adding Items to an Array Property
11.5 Working with List Properties
11.6 Working with Array Properties
11.7 Copying Collection Data
11.8 Controlling the SQL Projection of Collection Properties
11.8.1 Default Projection of List Properties
11.8.2 Default Projection of Array Properties
11.8.3 Alternative Projections of Collections
11.9 Creating and Using Stand-Alone Collections
Chapter 12: 
  12.1 Introduction to Stream Classes
12.2 Declaring Stream Properties
12.3 Using the Stream Interface
12.3.1 Commonly Used Stream Methods and Properties
12.3.2 Reading and Writing Stream Data
12.3.3 Copying Data between Streams
12.3.4 Inserting Stream Data
12.3.5 Finding Literal Values in a Stream
12.3.6 Using Streams in Object Applications
12.4 Stream Classes for Use with gzip Files
12.5 Projection of Stream Properties to SQL and ODBC
12.5.1 Reading a Stream via Embedded SQL
12.5.2 Writing a Stream via Embedded SQL
Chapter 13: 
  13.1 Defining Object-Valued Properties
13.1.1 Variation: CLASSNAME Parameter
13.2 Introduction to Serial Objects
13.3 Possible Combinations of Objects
13.3.1 Terms for Object-Valued Properties
13.4 Specifying the Value of an Object Property
13.5 Saving Changes
13.6 SQL Projection of Object-Valued Properties
13.6.1 Reference Properties
13.6.2 Embedded Object Properties
Chapter 14: 
  14.1 Overview of Relationships
14.1.1 One-to-Many Relationships
14.1.2 Parent-Child Relationships
14.1.3 Common Relationship Terminology
14.2 Defining a Relationship
14.2.1 General Syntax
14.2.2 Defining a One-to-Many Relationship
14.2.3 Defining a Parent-Child Relationship
14.3 Examples
14.3.1 Example One-to-Many Relationship
14.3.2 Example Parent-Child Relationship
14.4 Connecting Objects
14.4.1 Scenario 1: Updating the Many or Child Side
14.4.2 Scenario 2: Updating the One or Parent Side
14.4.3 Fastest Way to Connect Objects
14.5 Removing a Relationship
14.6 Deleting Objects in Relationships
14.7 Working with Relationships
14.8 SQL Projection of Relationships
14.8.1 SQL Projection of One-to-Many Relationships
14.8.2 SQL Projection of Parent-Child Relationships
14.9 Creating Many-to-Many Relationships
14.9.1 Variation with Foreign Keys
Chapter 15: 
  15.1 Defining a Read-Only Class
15.2 Adding Indices
15.3 Adding Foreign Keys
15.4 Adding Triggers
15.5 Referring to Fields from ObjectScript
15.6 Adding Row-Level Security
15.6.1 Setting Up Row-Level Security
15.6.2 Adding Row-Level Security to a Table with Existing Data
15.6.3 Performance Tips and Information
15.6.4 Security Tips and Information
Chapter 16: 
  16.1 Introduction
16.2 Basics
16.3 How Generators Work
16.4 Values Available to Method Generators
16.5 Values Available to Trigger Generators
16.6 Defining Method Generators
16.6.1 Method Generators for Other Languages
16.6.2 Specifying CodeMode within a Method Generator
16.7 Generators and INT Code
16.8 Generator Methods and Subclasses
16.8.1 Method Regeneration in Subclasses
16.8.2 Invoking the Method in the Superclass
16.8.3 Removing a Generated Method
Chapter 17: 
  17.1 Introduction to Class Queries
17.2 Using Class Queries
17.3 Defining Basic Class Queries
17.3.1 Example
17.3.2 About ROWSPEC
17.3.3 About CONTAINID
17.3.4 Other Parameters of the Query Class
17.4 Defining Custom Class Queries
17.4.1 Defining the querynameExecute() Method
17.4.2 Defining the querynameFetch() Method
17.4.3 The querynameClose() Method
17.4.4 Generated Methods for Custom Queries
17.5 Defining Parameters for Custom Queries
17.6 Additional Custom Query Example
17.7 When to Use Custom Queries
17.8 SQL Cursors and Class Queries
Chapter 18: 
  18.1 Basics
18.2 Example XData Blocks
18.3 Using XData (Example)
Chapter 19: 
  19.1 Introduction
19.2 Adding a Projection to a Class
19.3 Creating a New Projection Class
19.3.1 The Projection Interface
Chapter 20: 
  20.1 Callbacks and Triggers
20.2 %OnAddToSaveSet()
20.3 %OnAfterBuildIndices()
20.4 %OnAfterDelete()
20.5 %OnAfterPurgeIndices()
20.6 %OnAfterSave()
20.7 %OnBeforeBuildIndices()
20.8 %OnBeforePurgeIndices()
20.9 %OnBeforeSave()
20.10 %OnClose()
20.11 %OnConstructClone()
20.12 %OnDelete()
20.13 %OnNew()
20.14 %OnOpen()
20.15 %OnReload
20.16 %OnRollBack()
20.17 %OnValidateObject()
20.18 %OnDetermineClass()
20.18.1 Invoking %OnDetermineClass()
20.18.2 An Example of Results of Calls to %OnDetermineClass()
Chapter 21: 
  21.1 Introduction to Property Methods
21.2 Property Accessors for Literal Properties
21.3 Property Accessors for Object-Valued Properties
21.4 Overriding a Property Getter Method
21.5 Overriding a Property Setter Method
21.6 Defining an Object-Valued Property with a Custom Accessor Method
Chapter 22: 
  22.1 Overview of Data Type Classes
22.1.1 Property Methods
22.1.2 Data Formats
22.1.3 Parameters in Data Type Classes
22.2 Defining a Data Type Class
22.3 Defining Class Methods in Data Type Classes
22.4 Defining Instance Methods in Data Type Classes
Chapter 23: 
  23.1 Introduction to Dynamic Dispatch
23.2 Content of Methods Implementing Dynamic Dispatch
23.2.1 Return Values
23.3 The Dynamic Dispatch Methods
23.3.1 %DispatchMethod()
23.3.2 %DispatchClassMethod()
23.3.3 %DispatchGetProperty()
23.3.4 %DispatchSetProperty()
23.3.5 %DispatchSetMultidimProperty()
 
Appendix A: 
  A.1 Relative Dot Syntax (..)
A.2 ##Class Syntax
A.2.1 Invoking a Class Method
A.2.2 Casting a Method
A.2.3 Accessing a Class Parameter
A.3 $this Syntax
A.4 ##super Syntax
A.4.1 Calls That ##super Affects
A.4.2 ##super and Method Arguments
A.5 Dynamically Accessing Objects
A.5.1 $CLASSNAME
A.5.2 $CLASSMETHOD
A.5.3 $METHOD
A.5.4 $PARAMETER
A.5.5 $PROPERTY
A.6 i%<PropertyName> Syntax
A.7 ..#<Parameter> Syntax
Appendix B: 
  B.1 Data Population Basics
B.1.1 Populate() Details
B.2 Default Behavior
B.2.1 Literal Properties
B.2.2 Collection Properties
B.2.3 Properties That Refer to Serial Objects
B.2.4 Properties That Refer to Persistent Objects
B.2.5 Relationship Properties
B.3 Specifying the POPSPEC Parameter
B.3.1 Specifying the POPSPEC Parameter for Non-Collection Properties
B.3.2 Specifying the POPSPEC Parameter for List Properties
B.3.3 Specifying the POPSPEC Parameter for Array Properties
B.3.4 Specifying the POPSPEC Parameter via an SQL Table
B.4 Basing One Generated Property on Another
B.5 How %Populate Works
B.6 Custom Populate Actions and the OnPopulate() Method
B.7 Alternative Approach: Creating a Utility Method
B.7.1 Tips for Building Structure into the Data
Appendix C: 
  C.1 Introduction to Class Definition Classes
C.2 Browsing Class Definitions
C.3 Altering Class Definitions
Appendix D: 
  D.1 Introduction to Object Synchronization
D.1.1 The GUID
D.1.2 How Updates Work
D.1.3 The SyncSet and SyncTime Objects
D.2 Modifying the Classes to Support Synchronization
D.3 Performing the Synchronization
D.4 Translating Between GUIDs and OIDs
D.5 Manually Updating a SyncTime Table