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.
• ODBC — The format in which data can be presented via ODBC or JDBC. This format<br />
is used when data is exposed to ODBC/SQL. The available formats correspond to those<br />
defined by ODBC.<br />
If a property uses a system data type (or a data type derived from a system data type), the<br />
property automatically includes methods for translation among the various data formats.<br />
Though you do not use these methods directly, they serve as the basis for a data type's propertyspecific<br />
methods (called property methods). They include:<br />
• DisplayToLogical — converts a variety of display values into appropriate logical values.<br />
• IsValidDT — performs data validation for the value associated with a property. The<br />
method returns 1 as the first character if the value is valid and 0 as the first character if<br />
it is not valid. When validation is enabled, the IsValidDT method is invoked automatically.<br />
• LogicalToDisplay — converts a logical value to a display value.<br />
• LogicalToOdbc — converts a logical value into an ODBC value (optional).<br />
• LogicalToStorage — converts a logical value into a storage value (optional).<br />
• OdbcToLogical — converts a logical value into a storage value (optional).<br />
Enumerated Properties<br />
• StorageToLogical — converts a database storage value into a logical value (optional).<br />
11.3 Enumerated Properties<br />
Properties can support multiple choice values, also known as enumerated values. To create<br />
such a properties, there are two data type class parameters: VALUELIST and DISPLAYLIST.<br />
To specify a list of valid values for a property, use its VALUELIST parameter. The form of<br />
VALUELIST is a delimiter-separated list of logical values, where the delimiter is the first<br />
character. For instance:<br />
Property Color As %String(VALUELIST = ",red,green,blue");<br />
In this example, VALUELIST specifies that valid possible values are “red” , “green” , and<br />
“blue” , with a comma as its delimiter. Similarly,<br />
Property Color As %String(VALUELIST = " red green blue");<br />
specifies the same list, but with a space as its delimiter.<br />
<strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong> 97