25.01.2015 Views

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Packages<br />

Class Packages<br />

Any of these classes can be referred to using their full name (which consists of package and<br />

classname):<br />

Do ##class(Accounting.Invoice).Method()<br />

Do ##class(Inventory.Item).Method()<br />

If the package name can be determined from context (see below), then the package name can<br />

be omitted:<br />

Do ##class(Invoice).Method()<br />

A package is simply a naming convention: it does not provide any fundamental capabilities<br />

beyond how classes are named.<br />

As with classes, a package definition exists within a <strong>Caché</strong> namespace. A package cannot<br />

span namespaces. It will be possible, in a future version, to refer to packages in other<br />

namespaces using subscript-level mapping.<br />

5.2 Package Names<br />

A package name is simply a string. It may contain “.” (period) characters but no other<br />

punctuation. Although packages may contain “.” characters, there is no true hierarchy of<br />

packages (the various <strong>Caché</strong> development tools do display packages as a hierarchy for convenience).<br />

If you give a class the name “Test.Subtest.TestClass” , then this indicates that the<br />

name of the class is “TestClass” and the name of the package is “Test.Subtest” (which is<br />

mapped to the SQL schema “Test_TestClass” , as described below).<br />

There are several limitations on the length and usage of package names:<br />

• A package name (including “.” characters) is limited to 31 characters or less.<br />

32 <strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!