Click or drag to resize

DBForeignKeyConstraint Class

Class which represents a foreign key constraint
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.DBDriverCoreDBElementBase
    SD.LLBLGen.Pro.DBDriverCoreDBForeignKeyConstraint

Namespace:  SD.LLBLGen.Pro.DBDriverCore
Assembly:  SD.LLBLGen.Pro.DBDriverCore (in SD.LLBLGen.Pro.DBDriverCore.dll) Version: 5.4.0.0 (5.4.0)
Syntax
public class DBForeignKeyConstraint : DBElementBase, 
	ISerializableToXml, IDBRenameableElement

The DBForeignKeyConstraint type exposes the following members.

Constructors
  NameDescription
Public methodDBForeignKeyConstraint
Initializes a new instance of the DBForeignKeyConstraint class.
Public methodDBForeignKeyConstraint(String)
Initializes a new instance of the DBForeignKeyConstraint class.
Top
Properties
  NameDescription
Public propertyAppliesToTable
The DBTable instance this constraint applies to, which is the 'FK side'
Public propertyConstraintName
The literal name for the constraint.
Public propertyCreatedByDesigner
Gets or sets a value indicating whether this element is created by the designer from mappings (true) or that it was created from meta-data retrieved from the database (false, default).
(Inherited from DBElementBase.)
Public propertyCustomProperties
Gets the Custom properties (name - value pairs) read from the schema.
(Inherited from DBElementBase.)
Public propertyDeleteRuleAction
Gets or sets the update rule action.
Protected propertyDeserializing
Gets or sets a value indicating whether this instance is deserializing.
(Inherited from DBElementBase.)
Public propertyErrorLog
Gets the complete ErrorLog for this object.
(Inherited from DBElementBase.)
Public propertyFkFieldsFormFullPk
Gets a value indicating whether the fk fields together form the PK of the table this FK constraint applies to.
Public propertyForeignKeyFields
List of DBTableField instances of the foreign key in this relation. DBTableField instances have an DBTable reference for upward navigation. FK constraints which span multiple catalogs are not supported. The fields in the foreign key correspond with the fields in the primary key based on the index, thus the field on position 0 in the ForeignKeyFields array, corresponds with the field on position 0 in the PrimaryKeyFields array.
Public propertyFullName
Gets the full name.
(Inherited from DBElementBase.)
Public propertyFullNameForXml
Gets the full name for XML. This is a name which has the format schemaname:elementname or schemaname:elementname:fieldname. Used for references.
(Overrides DBElementBaseFullNameForXml.)
Public propertyFullNameForXmlWithCatalog
Gets the full name for XML. This is a name which has the format catalogname:schemaname:elementname or catalogname:schemaname:elementname:fieldname. Used for references.
(Inherited from DBElementBase.)
Public propertyMarkedForDeletion
Gets or sets a value indicating whether this element is marked for deletion.
(Inherited from DBElementBase.)
Public propertyPKSide
Gets the PK side of this FK. FK side is 'AppliesToTable'
Public propertyPrimaryKeyFields
List of DBTableField instances of the primary key in this relation. DBTableField instances have an DBTable reference for upward navigation. FK constraints which span multiple catalogs are not supported. Single column primary keys will have just 1 entry in this array, multi-column primary keys will have per column one entry.
Protected propertyTypeOfDBElement
Gets the type of DB element in the form of a ContainedElementType value.
(Overrides DBElementBaseTypeOfDBElement.)
Public propertyUpdateRuleAction
Gets or sets the update rule action.
Top
Methods
  NameDescription
Public methodCheckIfIsValid
Determines whether this instance is valid. Valid means that the constraint isn't marked for deletion and also none of the fields in the Fk constraint is marked for deletion. Will return false if IsCorrect returns false
Protected methodDeserializeAdditionalAttributes
Deserializes attributes of this element's base class from the reader.
(Inherited from DBElementBase.)
Public methodDeserializeFromReader
Deserializes the data of this instance from reader.
Public methodDetermineRelationshipType
Determines the relationship type formed by this foreign key constraint.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Overrides DBElementBaseDispose.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetFkFieldRelatedToPkField
Gets the fk field related to the pk field specified
Public methodGetFkPkFieldPairs
Gets the fkfield - pkfield pairs. Each pair has for Value1 the fk field and for Value2 the pk field.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUniqueConstraintUsedByFk
Gets the unique constraint used by fk. If this FK constraint is a 1:1 fk constraint, and the Fk side is not a PK, it has to be that the FK constraint uses a unique constraint in the FK table which is equal to the set of FK fields. If that's the case, this method returns that unique constraint, otherwise null.
Protected methodHandleContainedListChangedTChangeType
Handles the contained list changed.
(Inherited from DBElementBase.)
Public methodLogError
Logs an error in the ErrorLog structure of this object.
(Inherited from DBElementBase.)
Public methodLogWarning
Logs the description as a warning.
(Inherited from DBElementBase.)
Protected methodMarkElementAsChangedTChangeType
Marks the element as changed.
(Inherited from DBElementBase.)
Public methodMarkElementAsRemoved
Marks the element as removed, which raises the ElementRemoved event.
(Inherited from DBElementBase.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnContainedElementAdded
Called when this object received an event of type ContainedElementAdded
(Inherited from DBElementBase.)
Protected methodOnContainedElementChanged
Called when this object received an event of type ContainedElementChanged
(Inherited from DBElementBase.)
Protected methodOnContainedElementRemoved
Called when this object received an event of type ContainedElementRemoved
(Inherited from DBElementBase.)
Protected methodOnPropertyChanged
Raises the PropertyChanged event.
(Inherited from DBElementBase.)
Protected methodPerformAdditionalContainedElementChangedWork
Performs the additional contained element changed work. Override if additional work has to be done after the OnContainedElementChanged method has run.
(Inherited from DBElementBase.)
Public methodResetErrorLog
Resets the Error Log for this object to an empty list.
(Inherited from DBElementBase.)
Protected methodSerializeAdditionalAttributes
Serializes the additional attributes.
(Inherited from DBElementBase.)
Public methodSerializeToWriter
Serializes the data in this class to the serializer passed in
Public methodSetNewPkSide
Sets the new pk side. If there's no way the specified pk side can be made the pk side of this FK, the PK side will be empty (null). Calling this method always resets the current PK side of this FK.
Public methodToString
Returns a String that represents the current Object.
(Overrides ObjectToString.)
Top
Events
  NameDescription
Public eventContainedElementAdded
Raised when an element was added to a collection (indirectly) contained in this element
(Inherited from DBElementBase.)
Public eventContainedElementChanged
Raised when an element contained in this element was changed.
(Inherited from DBElementBase.)
Public eventContainedElementRemoved
Raised when an element was removed from a collection (indirectly) contained in this element
(Inherited from DBElementBase.)
Public eventHasBeenChanged
Raised when the implementing element has been changed
(Inherited from DBElementBase.)
Public eventHasBeenRemoved
Raised when the implementing element has been removed from its container
(Inherited from DBElementBase.)
Public eventPropertyChanged
Occurs when a property value changes. (INotifyPropertyChanged)
(Inherited from DBElementBase.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate propertyIDBRenameableElementIsRenamed
Gets a value indicating whether this instance is renamed to a new value.
Explicit interface implementationPrivate propertyIDBRenameableElementNewName
Gets the new name, if the element was renamed, otherwise the original name
Explicit interface implementationPrivate propertyIDBRenameableElementOriginalName
Gets the original name of the element.
Top
See Also