This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > %SYS namespace > %Library.ClassDefinition

%Library.ClassDefinition

persistent class %Library.ClassDefinition extends %Library.AbstractDefinition

SQL Table Name: %Library.ClassDefinition

Note: The class definition classes in the %Library package have been superceded by those in the %Dictionary package.

This class represents a specific class description contained within the Caché Dictionary.

For more information on class definition classes, refer to About Class Definition Classes.

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property Abstract as %CacheString;
A flag indicating whether the class is abstract (1) or not (0).
Property methods: AbstractGet(), AbstractIsValid(), AbstractSet()
property ClassType as %CacheString [ InitialExpression = $char(0) ];
A string containing the class type.
Property methods: ClassTypeGet(), ClassTypeIsValid(), ClassTypeSet()
property ClassVersion as %Integer [ InitialExpression = 23 ];
The class dictionary version of this class, when we save we always upgrade to the latest version automatically. If you open an existing class we will use the version from this class
Property methods: ClassVersionDisplayToLogical(), ClassVersionGet(), ClassVersionIsValid(), ClassVersionLogicalToDisplay(), ClassVersionNormalize(), ClassVersionSet()
property ClientDatatype as %CacheString [ InitialExpression = "VARCHAR" ];
For a datatype class, a string containing the client datatype of the class.
Property methods: ClientDatatypeGet(), ClientDatatypeIsValid(), ClientDatatypeSet()
property CompileAfter as %CacheString;
A string containing the name of another class which should be compiled before this class.
Property methods: CompileAfterGet(), CompileAfterIsValid(), CompileAfterSet()
property DDLAllowed as %CacheString;
A flag indicating whether DDL operations are allowed on the class (1) or not (0).
Property methods: DDLAllowedGet(), DDLAllowedIsValid(), DDLAllowedSet()
property Datatype as %CacheString [ Calculated ];
A flag indicating whether the class is a datatype class (1) or not (0).
Property methods: DatatypeGet(), DatatypeSet()
property Description as %CacheString;
A string containing the description of the class.
Property methods: DescriptionGet(), DescriptionIsValid(), DescriptionSet()
property Dynamic as %CacheString;
A flag indicating whether the class is dynamically defined (1) or not (0).
Property methods: DynamicGet(), DynamicIsValid(), DynamicSet()
property Final as %CacheString;
A flag indicating whether the class is final (1) or not (0).
Property methods: FinalGet(), FinalIsValid(), FinalSet()
property ForeignKeys as %ListOfPersistentChildObjects (CLASSNAME = 1);
A collection of foreign keys belonging to the class. See %ForeignKeyDefinition for details.
Property methods: ForeignKeysGet(), ForeignKeysGetObject(), ForeignKeysGetObjectId(), ForeignKeysGetSwizzled(), ForeignKeysIsValid(), ForeignKeysNewObject(), ForeignKeysSet(), ForeignKeysSetObject(), ForeignKeysSetObjectId(), ForeignKeysUnSwizzle()
property Hidden as %CacheString;
A flag indicating whether the class is hidden (1) or not (0).
Property methods: HiddenGet(), HiddenIsValid(), HiddenSet()
property IncludeCode as %CacheString;
A string containing a comma-delimited list of names of include (.INC) files to be used when compiling the class.
Property methods: IncludeCodeGet(), IncludeCodeIsValid(), IncludeCodeSet()
property IncludeGenerator as %CacheString;
A string containing a comma-delimited list of names of include (.INC) files to be used when compiling any method generators for the class.
Property methods: IncludeGeneratorGet(), IncludeGeneratorIsValid(), IncludeGeneratorSet()
property Indices as %ListOfPersistentChildObjects (CLASSNAME = 1);
A collection of indices belonging to the class. See %IndexDefinition for details.
Property methods: IndicesGet(), IndicesGetObject(), IndicesGetObjectId(), IndicesGetSwizzled(), IndicesIsValid(), IndicesNewObject(), IndicesSet(), IndicesSetObject(), IndicesSetObjectId(), IndicesUnSwizzle()
property Language as %CacheString [ InitialExpression = "cache" ];
A string containing the default language for all the methods.
Property methods: LanguageGet(), LanguageIsValid(), LanguageSet()
property Methods as %ListOfPersistentChildObjects (CLASSNAME = 1);
A collection of methods belonging to the class. See %MethodDefinition for details.
Property methods: MethodsGet(), MethodsGetObject(), MethodsGetObjectId(), MethodsGetSwizzled(), MethodsIsValid(), MethodsNewObject(), MethodsSet(), MethodsSetObject(), MethodsSetObjectId(), MethodsUnSwizzle()
property Modified as %CacheString [ InitialExpression = 0 ];
A flag indicating how the class keeps track of modified attributes.
Property methods: ModifiedGet(), ModifiedIsValid(), ModifiedSet()
property Name as %CacheString;
A string containing the name of the class.
Property methods: NameGet(), NameIsValid(), NameSet()
property NoContext as %CacheString;
This is for internal use only.
Property methods: NoContextGet(), NoContextIsValid(), NoContextSet()
property OdbcType as %CacheString [ InitialExpression = "VARCHAR" ];
For a datatype class, a string indicating the ODBC type of the class.
Property methods: OdbcTypeGet(), OdbcTypeIsValid(), OdbcTypeSet()
property Owner as %CacheString;
A string containing the name of the owner of the class.
Property methods: OwnerGet(), OwnerIsValid(), OwnerSet()
property Parameters as %ListOfPersistentChildObjects (CLASSNAME = 1);
A collection of class parameters belonging to the class. See %ParameterDefinition for details.
Property methods: ParametersGet(), ParametersGetObject(), ParametersGetObjectId(), ParametersGetSwizzled(), ParametersIsValid(), ParametersNewObject(), ParametersSet(), ParametersSetObject(), ParametersSetObjectId(), ParametersUnSwizzle()
property Persistent as %CacheString [ Calculated ];
A flag indicating whether the class is persistent (1) or not (0).
Property methods: PersistentGet(), PersistentSet()
property Properties as %ListOfPersistentChildObjects (CLASSNAME = 1);
A collection of properties belonging to the class. See %PropertyDefinition for details.
Property methods: PropertiesGet(), PropertiesGetObject(), PropertiesGetObjectId(), PropertiesGetSwizzled(), PropertiesIsValid(), PropertiesNewObject(), PropertiesSet(), PropertiesSetObject(), PropertiesSetObjectId(), PropertiesUnSwizzle()
property PropertyClass as %CacheString;
This is for internal use only.
Property methods: PropertyClassGet(), PropertyClassIsValid(), PropertyClassSet()
property Queries as %ListOfPersistentChildObjects (CLASSNAME = 1);
A collection of class queries belonging to the class. See %QueryDefinition for details.
Property methods: QueriesGet(), QueriesGetObject(), QueriesGetObjectId(), QueriesGetSwizzled(), QueriesIsValid(), QueriesNewObject(), QueriesSet(), QueriesSetObject(), QueriesSetObjectId(), QueriesUnSwizzle()
property Querytype as %CacheString [ Calculated ];
Property methods: QuerytypeGet(), QuerytypeSet()
property Serial as %CacheString [ Calculated ];
A flag indicating whether the class is serial (embeddable) (1) or not (0).
Property methods: SerialGet(), SerialSet()
property SqlCategory as %CacheString [ InitialExpression = "STRING" ];
For datatype classes, a string containing the name of the SQL category associated with the data type.
Property methods: SqlCategoryGet(), SqlCategoryIsValid(), SqlCategorySet()
property SqlRoutinePrefix as %CacheString;
This is for internal use.
Property methods: SqlRoutinePrefixGet(), SqlRoutinePrefixIsValid(), SqlRoutinePrefixSet()
property SqlRowIdName as %CacheString;
A string containing a user-defined name of the ID field or null string "" if it has the default name.
Property methods: SqlRowIdNameGet(), SqlRowIdNameIsValid(), SqlRowIdNameSet()
property SqlRowIdPrivate as %CacheString;
A flag indicating whether the class hides its ID field to SQL (1) or not (0).
Property methods: SqlRowIdPrivateGet(), SqlRowIdPrivateIsValid(), SqlRowIdPrivateSet()
property SqlTableName as %CacheString;
A string containing an optional SQL table name. This is the name used the class is projected as an SQL table.
Property methods: SqlTableNameGet(), SqlTableNameIsValid(), SqlTableNameSet()
property StorageStrategy as %CacheString;
A string containing the name of the storage definition in use.
Property methods: StorageStrategyGet(), StorageStrategyIsValid(), StorageStrategySet()
property Storages as %ListOfPersistentChildObjects (CLASSNAME = 1);
A collection of storage definitions belonging to the class. See %StorageDefinition for details.
Property methods: StoragesGet(), StoragesGetObject(), StoragesGetObjectId(), StoragesGetSwizzled(), StoragesIsValid(), StoragesNewObject(), StoragesSet(), StoragesSetObject(), StoragesSetObjectId(), StoragesUnSwizzle()
property Super as %CacheString;
A string containing a comma-delimited list of super class names.
Property methods: SuperGet(), SuperIsValid(), SuperSet()
property System as %CacheString [ InitialExpression = 0 ];
A flag indicating whether the class is a system class (1) or not (0).
Property methods: SystemGet(), SystemIsValid(), SystemSet()
property TimeCreated as %CacheString;
Time this class is created.
Property methods: TimeCreatedGet(), TimeCreatedIsValid(), TimeCreatedSet()
property Triggers as %ListOfPersistentChildObjects (CLASSNAME = 1);
A collection of SQL triggers belonging to the class. See %TriggerDefinition for details.
Property methods: TriggersGet(), TriggersGetObject(), TriggersGetObjectId(), TriggersGetSwizzled(), TriggersIsValid(), TriggersNewObject(), TriggersSet(), TriggersSetObject(), TriggersSetObjectId(), TriggersUnSwizzle()
property View as %CacheString [ Calculated ];
A flag indicating whether the class is an SQL view (1) or not (0).
Property methods: ViewGet(), ViewQueryGet(), ViewQueryIsValid(), ViewQuerySet(), ViewSet()
property ViewQuery as %CacheString;
The SQL statement that defines a view.
Property methods: ViewQueryGet(), ViewQueryIsValid(), ViewQuerySet()
property list as %ListOfDataTypes [ Transient ];
Property methods: listGet(), listGetObject(), listGetObjectId(), listGetSwizzled(), listIsEmpty(), listIsValid(), listNewObject(), listSet(), listSetObject(), listSetObjectId(), listUnSwizzle()

Methods (Including Private)

private classmethod %DeleteData(id As %String, concurrency As %Integer) as %Status
Inherited description: This method is normally generated by the storage class for persistent classes using %Library.CacheStorage or %Library.CacheSQLStorage. Persistent classes using some other storage class, such as %Library.CustomStorage must override this method.
classmethod %Exists(oid As %ObjectIdentity) as %Boolean
Inherited description: Checks to see if the object identified by the OID oid exists in the extent.

Returns %Boolean TRUE if it exists, FALSE if it does not.

private method %LoadData(classname As %String) as %Status
Inherited description: %LoadData() - loads an object from storage. This method is implemented by the storage class.
private method %OnNew(classname As %String) as %Status
Inherited description: This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

private method %SaveData(id As %String) as %Status
Inherited description: %SaveData() - saves an object to disk, checks uniqueness and referential integrity constraints, and maintains index structures. This method is implemented by the storage class.
classmethod CacheSQLInstalled() as %Integer
classmethod ClassInfoClose(QHandle As %Binary) as %Status
classmethod ClassInfoExecute(ByRef QHandle As %Binary, initvalue As %String, mapped As %Boolean = 1) as %Status
classmethod ClassInfoFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
Fetch returns the next row in the query.
classmethod ClassInfoFetchRows(ByRef QHandle As %Binary, FetchCount As %Integer = 0, ByRef RowSet As %List, ByRef ReturnCount As %Integer, ByRef AtEnd As %Integer) as %Status
RoutineListFetchRows returns the next FetchCount rows in the query.
method ClassTypeGet() as %CacheString
method CompileAllClasses(flag As %String) as %ListOfDataTypes
method CompileClasses(classlist As %String, flag As %String) as %ListOfDataTypes
classmethod CurrentNameSpace() as %String
method DatatypeGet() as %CacheString
method DatatypeSet(value As %CacheString) as %Status
classmethod Export(classes As %String, type As %String, ByRef objs As %ArrayOfObjects) as %Status
classmethod ExportCPP(classname As %String, dir As %String) as %Status
classmethod ExportJava(classes As %String, dir As %String) as %Status
classmethod ExportODL(classname As %String, file As %String) as %Status
method GetClassFullList(flag As %String = "") as %ListOfDataTypes
method GetClassLocalList() as %ListOfDataTypes
method GetTransientState() as %String
method PersistentGet() as %CacheString
method PersistentSet(value As %CacheString) as %Status
classmethod PublishUserClass(classname As %String) as %Status
classmethod PublishUserClasses() as %Status
method QuerytypeGet() as %CacheString
method QuerytypeSet(value As %CacheString) as %Status
method SerialGet() as %CacheString
method SerialSet(value As %CacheString) as %Status
method SetTransientState(state)
classmethod SubclassOfClose(QHandle As %Binary) as %Status
classmethod SubclassOfExecute(ByRef QHandle As %Binary, super As %String, initval As %String = "") as %Status
classmethod SubclassOfFetch(ByRef QHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
Fetch returns the next row in the query.
classmethod SubclassOfFetchRows(ByRef QHandle As %Binary, FetchCount As %Integer = 0, ByRef RowSet As %List, ByRef ReturnCount As %Integer, ByRef AtEnd As %Integer) as %Status
SubclassOfFetchRows returns the next FetchCount rows in the query.
classmethod UpdateUserIndex() as %Status
method ViewGet() as %CacheString
method ViewSet(value As %CacheString) as %Status

Queries

query ClassInfo(initvalue As %String, mapped As %Boolean = 1)
Selects Name As %String, Super As %String, Hidden As %Boolean, Datatype As %Boolean, System As %Integer, Final As %Boolean, Persistent As %Boolean, Serial As %Boolean, TimeChanged, SqlTableName, Abstract As %Boolean
The ClassInfo query provides a summary of information about classes contained in the Caché Dictionary.
query SubclassOf(super As %String, initval As %String = "")
Selects Name As %String
The SubclassOf query produces a list of classes that are subclasses of the super class starting the search at initval. For example this allows you to find all the subclasses of %CSP.Page very easily.

Inherited Members

Inherited Methods (Including Private)

Storage

Gray indicates storage defined by superclasses.

Storage Model: CacheStorage (%Library.AbstractDefinition)

^%Library.AbstractDefinitionD(ID)
=
%%CLASSNAME
Feedback