Using Caché Objects - InterSystems Documentation
Using Caché Objects - InterSystems Documentation
Using Caché Objects - InterSystems Documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
1.2 Class Definitions and the Class Dictionary<br />
Every class has a definition that specifies what members (properties, methods, etc.) it contains<br />
as well as class-wide characteristics (such as superclasses). These definitions are contained<br />
within the <strong>Caché</strong> Dictionary, which is itself stored within the <strong>Caché</strong> database.<br />
1.2.1 Creating Class Definitions<br />
You can create class definitions in many ways:<br />
• <strong>Using</strong> <strong>Caché</strong> Studio. The primary means of working with <strong>Caché</strong> class definitions is with<br />
the <strong>Caché</strong> Studio Development Environment.<br />
• <strong>Using</strong> XML. Class definitions have an external, XML-based representation. Typically<br />
this format is used for storing class definitions externally (such as in source control systems),<br />
deploying applications, or simply for sharing code. You can also create new class<br />
definitions programatically by simply generating the appropriate XML class definition<br />
file and loading it into a <strong>Caché</strong> system.<br />
• <strong>Using</strong> an API. <strong>Caché</strong> includes a set of class definition classes that provide object access<br />
to the Class Dictionary. You can use these to observe, modify, and create class definitions.<br />
• <strong>Using</strong> SQL DDL. Any relational tables defined by DDL statements are automatically<br />
converted to equivalent class definitions and placed within the Class Dictionary.<br />
In addition, <strong>Caché</strong> includes a set of tools (such as the <strong>Caché</strong> RoseLink connection to the<br />
Rational Rose modeling tool) as well as Wizards (such as the <strong>Caché</strong> Activate Wizard) that<br />
automatically create class definitions.<br />
1.2.2 The Class Dictionary<br />
Class Definitions and the Class Dictionary<br />
Every <strong>Caché</strong> namespace contains its own Class Dictionary which defines the available classes<br />
for that namespace. There is a special “CACHELIB” namespace, installed as part of <strong>Caché</strong>,<br />
that contains the definitions and executable code for the classes of the <strong>Caché</strong> Class Library.<br />
These classes are referred to as system classes and all have names that start with a “%”<br />
character. (Strictly speaking, they have package names that start with “%” ).<br />
Every <strong>Caché</strong> namespace is automatically configured so that its Class Dictionary, in addition<br />
to containing its own classes, has access to the system class definitions and code within the<br />
CACHELIB namespace. By this mechanism, all namespaces can make direct use of the<br />
classes in the <strong>Caché</strong> Class Library.<br />
<strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong> 3