Click or drag to resize
RelationCollection Class
Class which is used to stack relation objects between several entities to build a complete join path
Inheritance Hierarchy
SystemObject
  System.CollectionsCollectionBase
    SD.LLBLGen.Pro.ORMSupportClassesRelationCollection

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.1.0.0 (5.1.0)
Syntax
[SerializableAttribute]
public class RelationCollection : CollectionBase, 
	IRelationCollection, IEnumerable, IXmlSerializable

The RelationCollection type exposes the following members.

Constructors
  NameDescription
Public methodRelationCollection
CTor
Public methodRelationCollection(IDynamicRelation)
Initializes a new instance of the RelationCollection class.
Public methodRelationCollection(IEntityRelation)
Initializes a new instance of the RelationCollection class.
Public methodRelationCollection(IEntityRelation, JoinHint)
Initializes a new instance of the RelationCollection class.
Public methodRelationCollection(IEntityRelation, String, JoinHint)
Initializes a new instance of the RelationCollection class.
Top
Properties
  NameDescription
Public propertyCapacity
Gets or sets the number of elements that the CollectionBase can contain.
(Inherited from CollectionBase.)
Public propertyCount
Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
(Inherited from CollectionBase.)
Public propertyCustomFilterParameters
Gets Custom Filter Parameters, created in ToQueryText and which are used in custom filters.
Public propertyDatabaseSpecificCreator
Object which will be used to create valid parameter objects, field names, including prefix/postfix characters, and conversion routines, and field names, including prefix/postfix characters. Uses the strategy pattern so the generic code can work with more than one target database.
Public propertyFromClauseDirectives
Gets from clause directives which are to be set on FROM clause elements in the resulting SQL query.
Protected propertyInnerList
Gets an ArrayList containing the list of elements in the CollectionBase instance.
(Inherited from CollectionBase.)
Public propertyItem
Indexer in the collection.
Protected propertyList
Gets an IList containing the list of elements in the CollectionBase instance.
(Inherited from CollectionBase.)
Public propertyObeyWeakRelations
Gets / sets ObeyWeakRelations, which is the flag to signal the collection what kind of join statements to generate in the ToQueryText statement, which is called by the DQE. Weak relationships are relationships which are optional, for example a customer with no orders is possible, because the relationship between customer and order is based on a field in order. When this property is set to true (default: false), weak relationships will result in LEFT JOIN statements. When set to false (which is the default), INNER JOIN statements are used.
Public propertySelectListAlias
Optional alias for select list fields. Used in entity fetches where the entity type to fetch has to be aliased because the source of the data is a derived table or requires aliasing because the relations used require that. If specified, all predicates referring to the entity type to fetch have to use the same alias.
Public propertyWillPotentiallyCauseDuplicateRows
Gets a value indicating whether the contents of this relation collection will result in joins which result in duplicate data. This is the case if there's at least one 1:n or m:n relation.
Top
Methods
  NameDescription
Public methodAdd(IDynamicRelation)
Adds the passed in IDynamicRelation instance to the list
Public methodAdd(IEntityRelation)
Adds the passed in IEntityRelation instance to the list.
Public methodAdd(IRelation)
Adds the passed in relation to this collection
Public methodAdd(IEntityRelation, JoinHint)
Adds the passed in IEntityRelation instance to the list.
Public methodAdd(IEntityRelation, String)
Adds the passed in IEntityRelation instance to the list, under the alias specified for the end entity. The start entity gets no alias. The weakness of the relation is considered based on the ObeyWeakRelations setting.
Public methodAdd(IEntityRelation, String, JoinHint)
Adds the passed in IEntityRelation instance to the list, under the alias specified for the end entity and will consider the relation's weakness based on the hint value. The start entity gets no alias.
Public methodAdd(IEntityRelation, String, String, JoinHint)
Adds the passed in IEntityRelation instance to the list, under the aliases specified and will consider the relation's weakness based on the hint value. The start entity gets no alias.
Public methodAddRange
Adds the range of IRelation objects stored in c to this collection.
Public methodClear
Removes all objects from the CollectionBase instance. This method cannot be overridden.
(Inherited from CollectionBase.)
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 methodGetAllDerivedTables
Gets all derived tables in the relations inside this relation collection.
Public methodGetEnumerator
Returns an enumerator that iterates through the CollectionBase instance.
(Inherited from CollectionBase.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUsedEntityTypeNamesAndAliases
Gets per alias specified in a relation all entity names covered by that alias. This means that if an entity in a relation is based on multiple entities (through inheritance) it will return all entity names the entity is based on, from the actual entity to the root of the hierarchy path and every entity name in between.
Public methodInsert
Adds the passed in IRelation instance to the list at position index.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnClear
Performs additional custom processes when clearing the contents of the CollectionBase instance.
(Inherited from CollectionBase.)
Protected methodOnClearComplete
Performs additional custom processes after clearing the contents of the CollectionBase instance.
(Inherited from CollectionBase.)
Protected methodOnInsert
Performs additional custom processes before inserting a new element into the CollectionBase instance.
(Inherited from CollectionBase.)
Protected methodOnInsertComplete
Performs additional custom processes after inserting a new element into the CollectionBase instance.
(Inherited from CollectionBase.)
Protected methodOnRemove
Performs additional custom processes when removing an element from the CollectionBase instance.
(Inherited from CollectionBase.)
Protected methodOnRemoveComplete
Performs additional custom processes after removing an element from the CollectionBase instance.
(Inherited from CollectionBase.)
Protected methodOnSet
Performs additional custom processes before setting a value in the CollectionBase instance.
(Inherited from CollectionBase.)
Protected methodOnSetComplete
Performs additional custom processes after setting a value in the CollectionBase instance.
(Inherited from CollectionBase.)
Protected methodOnValidate
Performs additional custom processes when validating a value.
(Inherited from CollectionBase.)
Public methodPreprocessRelations
Preprocesses the relations in this relationcollection The start/end entity can have an inheritance info object with them, causing these relations to be inserted at that spot, where the additional relations for the start entity are added BEFORE the actual relation and the relations for the end entity AFTER the actual relation.
Public methodRemove
Removes the passed in IRelation instance. Only the first instance will be removed.
Public methodRemoveAt
Removes the element at the specified index of the CollectionBase instance. This method is not overridable.
(Inherited from CollectionBase.)
Public methodToQueryText
Converts the set of relations to a set of nested JOIN query elements using ANSI join syntaxis. Oracle 8i doesn't support ANSI join syntaxis and therefore the OracleDQE has its own join code. It uses a database specific creator object for database specific syntaxis, like the format of the tables / views and fields.
Public methodToQueryTextNonAnsi
Converts the set of relations to a set of nested JOIN query elements using ANSI join syntaxis. Oracle 8i doesn't support ANSI join syntaxis and therefore the OracleDQE has its own join code. It uses a database specific creator object for database specific syntaxis, like the format of the tables / views and fields.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodCloneWithoutFirst
Clones the relationcollection without the first relation.
(Defined by ORMClassExtensions.)
Public Extension MethodIsEmpty
Determines whether the specified relation collection is empty. A null passed in is also considered empty.
(Defined by ORMClassExtensions.)
Public Extension MethodLast
Gets the last relation in the passed in relations collection or null if it's empty
(Defined by ORMClassExtensions.)
Public Extension MethodRemoveLast
Removes the last relation from the passed in relationcollection. Assumes last entry is an entity relation
(Defined by ORMClassExtensions.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIXmlSerializableGetSchema
This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class.
Explicit interface implementationPrivate methodIXmlSerializableReadXml
Generates an object from its XML representation.
Explicit interface implementationPrivate methodIXmlSerializableWriteXml
Converts an object into its XML representation.
Explicit interface implementationPrivate methodIListAdd
Adds an object to the end of the CollectionBase.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate methodIListContains
Determines whether the CollectionBase contains a specific element.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate methodICollectionCopyTo
Copies the entire CollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate methodIListIndexOf
Searches for the specified Object and returns the zero-based index of the first occurrence within the entire CollectionBase.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate methodIListInsert
Inserts an element into the CollectionBase at the specified index.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate methodIRelationCollectionAddFromClauseDirectives
Adds the from clause directives specified to this collection
Explicit interface implementationPrivate methodIRelationCollectionReadXml
Deserializes the object data on the xml reader into this instance
Explicit interface implementationPrivate methodIRelationCollectionToggleArtificialAliasingForTargetPerEntityRelations
Enables / disables the artificial aliasing for target per entity relations. This method is used to enable the artificial aliasing of entities which are in a hierarchy of TargetPerEntity and which are in the relations of this collection. This is switched on for dyn/typedlist fetches to be sure dyn/typedlists with fields from multiple entities in the same inheritance hierarchy will be retrievable properly, as they need aliasing under the hood but if the developer didn't alias the entities, the query will fail because the supertype(s) aren't joined multiple types.
Explicit interface implementationPrivate methodIRelationCollectionWriteXml
Serializes the object as xml to the writer specified.
Explicit interface implementationPrivate propertyIListIsFixedSize
Gets a value indicating whether the CollectionBase has a fixed size.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate propertyIListIsReadOnly
Gets a value indicating whether the CollectionBase is read-only.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate propertyICollectionIsSynchronized
Gets a value indicating whether access to the CollectionBase is synchronized (thread safe).
(Inherited from CollectionBase.)
Explicit interface implementationPrivate propertyIListItem
Gets or sets the element at the specified index.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate methodIListRemove
Removes the first occurrence of a specific object from the CollectionBase.
(Inherited from CollectionBase.)
Explicit interface implementationPrivate propertyICollectionSyncRoot
Gets an object that can be used to synchronize access to the CollectionBase.
(Inherited from CollectionBase.)
Top
See Also