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

This class contains the definition of a Foreign Key that defines the properties RelPropDef that that forms a relationship between two Classes. This class collaborates with the RelPropDef, the ClassDef to provide a definition of the properties involved in the RelationshipDef between two IBusinessObject. This provides an implementation of the Foreign Key Mapping pattern (Fowler (236) - 'Patterns of Enterprise Application Architecture' - 'Maps an association between objects to a foreign Key Reference between tables.') the RelKeyDef should not be used by the Application developer since it is usually constructed based on the mapping in the ClassDef.xml file. The RelKeyDef (Relationship Key Definition) is a list of relationship Property Defs RelPropDef that define the properties that form the persistant relationship definition (RelationshipDef between two Business object defitions (ClassDef. IBusinessObject.
Наследование: IRelKeyDef
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Add ( IRelPropDef relPropDef ) : void

Adds the related property definition to this key, as long as a property by that name has not already been added.

Contains ( string propName ) : bool

Returns true if a property with this name is part of this key.

CreateRelKey ( IBOPropCol lBoPropCol ) : IRelKey

Create a relationship key based on this key definition and its associated property definitions

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates through the collection. The enumerator iterates through the values of a Dictionary of IRelPropDef

RelKeyDef ( ) : System

Constructor to create a new RelKeyDef object

this ( string propName ) : IRelPropDef

Provides an indexing facility for the property definitions in this key definition so that they can be accessed like an array (e.g. collection["surname"])

Защищенные методы

Метод Описание
Contains ( IRelPropDef relPropDef ) : bool

Returns true if the specified property is found.

Remove ( IRelPropDef relPropDef ) : void

Removes a Related Property definition from the key

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

Метод Описание
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

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

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

Adds the related property definition to this key, as long as a property by that name has not already been added.
Thrown if the /// argument passed is null
public Add ( IRelPropDef relPropDef ) : void
relPropDef IRelPropDef The RelPropDef object to be added.
Результат void

Contains() защищенный Метод

Returns true if the specified property is found.
protected Contains ( IRelPropDef relPropDef ) : bool
relPropDef IRelPropDef The Related Property Definition to search for
Результат bool

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

Returns true if a property with this name is part of this key.
public Contains ( string propName ) : bool
propName string The property name to search by
Результат bool

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

Create a relationship key based on this key definition and its associated property definitions
public CreateRelKey ( IBOPropCol lBoPropCol ) : IRelKey
lBoPropCol IBOPropCol The collection of properties
Результат IRelKey

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

Returns an enumerator that iterates through the collection. The enumerator iterates through the values of a Dictionary of IRelPropDef
public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

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

Constructor to create a new RelKeyDef object
public RelKeyDef ( ) : System
Результат System

Remove() защищенный Метод

Removes a Related Property definition from the key
protected Remove ( IRelPropDef relPropDef ) : void
relPropDef IRelPropDef The Related Property Definition to remove
Результат void

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

Provides an indexing facility for the property definitions in this key definition so that they can be accessed like an array (e.g. collection["surname"])
public this ( string propName ) : IRelPropDef
propName string The name of the property
Результат IRelPropDef