C# Class 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.
Inheritance: IRelKeyDef
Afficher le fichier Open project: Chillisoft/habanero Class Usage Examples

Méthodes publiques

Méthode Description
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"])

Méthodes protégées

Méthode Description
Contains ( IRelPropDef relPropDef ) : bool

Returns true if the specified property is found.

Remove ( IRelPropDef relPropDef ) : void

Removes a Related Property definition from the key

Private Methods

Méthode Description
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

Method Details

Add() public méthode

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.
Résultat void

Contains() protected méthode

Returns true if the specified property is found.
protected Contains ( IRelPropDef relPropDef ) : bool
relPropDef IRelPropDef The Related Property Definition to search for
Résultat bool

Contains() public méthode

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
Résultat bool

CreateRelKey() public méthode

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
Résultat IRelKey

GetEnumerator() public méthode

Returns an enumerator that iterates through the collection. The enumerator iterates through the values of a Dictionary of IRelPropDef
public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

RelKeyDef() public méthode

Constructor to create a new RelKeyDef object
public RelKeyDef ( ) : System
Résultat System

Remove() protected méthode

Removes a Related Property definition from the key
protected Remove ( IRelPropDef relPropDef ) : void
relPropDef IRelPropDef The Related Property Definition to remove
Résultat void

this() public méthode

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
Résultat IRelPropDef