Home > Class Reference > ENSLIB namespace > %Dictionary.ForeignKeyDefinition
Private  Storage   

%Dictionary.ForeignKeyDefinition


persistent class %Dictionary.ForeignKeyDefinition extends
%Persistent, %Dictionary.ForeignKeyDefinitionQuery

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 13 10 1 2


Summary


Properties
Deprecated Description Internal Name
NoCheck OnDelete OnUpdate Properties
ReferencedClass ReferencedKey SequenceNumber SqlName
parent

Methods
%AddToSaveSet %AddToSyncSet %BuildIndices %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%IsA %IsModified %IsNull %KillExtent
%LockExtent %LockId %New %NormalizeObject
%ObjectIsNull %ObjectModified %Oid %OnBeforeAddToSync
%OnDetermineClass %Open %OpenId %OriginalNamespace
%PackageName %PurgeIndices %Reload %RemoveFromSaveSet
%ResolveConcurrencyConflict %RollBack %Save %SaveDirect
%SerializeObject %SetModified %SortBegin %SortEnd
%SyncObjectIn %SyncTransport %UnlockExtent %UnlockId
%ValidateIndices %ValidateObject OnDeleteIsValid OnUpdateIsValid
SummaryClose SummaryExecute SummaryFetch parentOnDelete


Parameters


• parameter SQLENABLED = 1;

Properties


• property Deprecated as %Boolean [ InitialExpression = 0 ];
True if this foreign key is deprecated.
• property Description as %CacheString;
Supplies a description of the foreign key.
• property Internal as %Boolean [ InitialExpression = 0 ];
If true then do not display this item in automatic documentation.
• property Name as %Dictionary.CacheIdentifier [ Required ];
Defines a name for the key. It must be a valid class member name and must not conflict with any existing member name.
• property NoCheck as %Boolean [ InitialExpression = 0 ];
NoCheck
• property OnDelete as %CacheString [ InitialExpression = "noaction" ];
Specifies what referential action to take when the key value is deleted from the foreign table.
• property OnUpdate as %CacheString [ InitialExpression = "noaction" ];
Specifies what referential action to take when the key value is updated in the foreign table.
• property Properties as %CacheString;
Specifies one or more properties whose values are used to constrain the value of the foreign key.
• property ReferencedClass as %Dictionary.CacheClassname;
Specifies the name of the class containing the key referred to by this foreign key definition.
• property ReferencedKey as %CacheString;
Specifies the key name of a unique index within a class that provides the set of allowed values for this foreign key.
• property SequenceNumber as %Integer [ InitialExpression = 0 ];
SequenceNumber
• property SqlName as %CacheString;
Specifies an alternate name for this foreign key when referred to via SQL.
• relationship parent as %Dictionary.ClassDefinition [ Inverse = ForeignKeys,Cardinality = parent ];
Pointer to the containing parent object

Methods


• classmethod %Exists(oid As %ObjectIdentity) as %Boolean
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.

• classmethod %LockId(id As %String, shared As %Boolean = 0, timeout As %Integer) as %Status
Obtain an exclusive or shared lock on the object identified by id. The type of lock obtained is determined by shared. This method is normally generated by the storage class for persistent classes using %Library.CacheStorage or %Library.CacheSQLStorage.
• classmethod %UnlockId(id As %String, shared As %Boolean = 0, immediate As %Boolean = 0) as %Status
Release an exclusive or shared lock on the object identified by id. The type of lock released is determined by shared. If this method is not overridden then the default implementation returns an error. This method is normally generated by the storage class for persistent classes using %Library.CacheStorage or %Library.CacheSQLStorage.
• classmethod OnDeleteIsValid(val As %String) as %Status
• classmethod OnUpdateIsValid(val As %String) as %Status
• classmethod parentOnDelete(id As %String, concurrency As %Integer) as %Status

Indices


•index (IDKEY on Name) [IdKey];

Triggers


•trigger OnDelete (AFTER event DELETE)
•trigger OnInsertUpdate (BEFORE event INSERT/UPDATE)