C# Класс Habanero.BO.ClassDefinition.SingleRelationshipDef

Defines a relationship where the owner relates to only one other object.
Наследование: RelationshipDef, ISingleRelationshipDef
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateRelationship ( IBusinessObject owningBo, IBOPropCol lBOPropCol ) : IRelationship

Overrides abstract method of RelationshipDef to create a new relationship

SetAsCompulsory ( ) : void

Sets the single relationship as compulsory. If this is set to true then the relationship is treated as compulsory else it uses the algorithm of Checking that all the ForeignKey Props are compulsory. This is primarily used by the Reflective ClassDefLoaders in Habanero.Smooth to load ClassDefinitions based on the BusinessObject.

SetAsOneToOne ( ) : void

Sets this SingleRelationshipDef as a One To One. This overrides the default of it being set to ManyToOne. This is used by the Reflective ClassDefLoaders in Habanero.Smooth to load ClassDefinitions based on the BusinessObject.

SingleRelationshipDef ( string relationshipName, Type relatedObjectClassType, RelKeyDef relKeyDef, bool keepReferenceToRelatedObject, DeleteParentAction deleteParentAction ) : System

Constructor to create a new single relationship definition

SingleRelationshipDef ( string relationshipName, string relatedObjectAssemblyName, string relatedObjectClassName, IRelKeyDef relKeyDef, bool keepReferenceToRelatedObject, DeleteParentAction deleteParentAction ) : System

Constructor to create a new single relationship definition

SingleRelationshipDef ( string relationshipName, string relatedObjectAssemblyName, string relatedObjectClassName, IRelKeyDef relKeyDef, bool keepReferenceToRelatedObject, DeleteParentAction deleteParentAction, InsertParentAction insertParentAction, RelationshipType relationshipType ) : System

Constructs a single Relationship

Приватные методы

Метод Описание
AreAllPropsCompulsory ( ) : bool

Returns true if this RelationshipDef is compulsory. This relationship def will be considered to be compulsory if this OwningBOHasForeignKey and all the IPropDef's that make up the IRelKeyDef are compulsory

GetReverseRelationshipDef ( ) : IRelationshipDef
HasReverseRelationshipDefined ( ) : bool
PropDefIsCompulsory ( IRelPropDef def ) : bool
ReverseRelationshipIsSingle ( ) : bool

Описание методов

CreateRelationship() публичный Метод

Overrides abstract method of RelationshipDef to create a new relationship
public CreateRelationship ( IBusinessObject owningBo, IBOPropCol lBOPropCol ) : IRelationship
owningBo IBusinessObject The business object that will manage /// this relationship
lBOPropCol IBOPropCol The collection of properties
Результат IRelationship

SetAsCompulsory() публичный Метод

Sets the single relationship as compulsory. If this is set to true then the relationship is treated as compulsory else it uses the algorithm of Checking that all the ForeignKey Props are compulsory. This is primarily used by the Reflective ClassDefLoaders in Habanero.Smooth to load ClassDefinitions based on the BusinessObject.
public SetAsCompulsory ( ) : void
Результат void

SetAsOneToOne() публичный Метод

Sets this SingleRelationshipDef as a One To One. This overrides the default of it being set to ManyToOne. This is used by the Reflective ClassDefLoaders in Habanero.Smooth to load ClassDefinitions based on the BusinessObject.
public SetAsOneToOne ( ) : void
Результат void

SingleRelationshipDef() публичный Метод

Constructor to create a new single relationship definition
public SingleRelationshipDef ( string relationshipName, Type relatedObjectClassType, RelKeyDef relKeyDef, bool keepReferenceToRelatedObject, DeleteParentAction deleteParentAction ) : System
relationshipName string A name for the relationship
relatedObjectClassType System.Type The class type of the related object
relKeyDef RelKeyDef The related key definition
keepReferenceToRelatedObject bool Whether to keep a /// reference to the related object. Could be false for memory- /// intensive applications.
deleteParentAction DeleteParentAction
Результат System

SingleRelationshipDef() публичный Метод

Constructor to create a new single relationship definition
public SingleRelationshipDef ( string relationshipName, string relatedObjectAssemblyName, string relatedObjectClassName, IRelKeyDef relKeyDef, bool keepReferenceToRelatedObject, DeleteParentAction deleteParentAction ) : System
relationshipName string A name for the relationship
relatedObjectAssemblyName string The assembly name of the related object
relatedObjectClassName string The class name of the related object
relKeyDef IRelKeyDef The related key definition
keepReferenceToRelatedObject bool Whether to keep a /// reference to the related object. Could be false for memory- /// intensive applications.
deleteParentAction DeleteParentAction
Результат System

SingleRelationshipDef() публичный Метод

Constructs a single Relationship
public SingleRelationshipDef ( string relationshipName, string relatedObjectAssemblyName, string relatedObjectClassName, IRelKeyDef relKeyDef, bool keepReferenceToRelatedObject, DeleteParentAction deleteParentAction, InsertParentAction insertParentAction, RelationshipType relationshipType ) : System
relationshipName string
relatedObjectAssemblyName string
relatedObjectClassName string
relKeyDef IRelKeyDef
keepReferenceToRelatedObject bool
deleteParentAction DeleteParentAction
insertParentAction InsertParentAction
relationshipType RelationshipType
Результат System