C# Класс Azavea.Open.DAO.ClassMapping

Represents a mapping of a class onto a database table.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
AllDataColsByObjAttrs string>.IDictionary
AllDataColsByObjMemberInfo string>.IDictionary
AllDataColsInOrder IList
AllObjAttrsByDataCol string>.IDictionary
AllObjMemberInfosByDataCol MemberInfo>.IDictionary
AllObjMemberInfosByObjAttr MemberInfo>.IDictionary
ClassType System.Type
Constructor System.Reflection.ConstructorInfo
DataColTypesByDataCol Type>.IDictionary
DataColTypesByObjAttr Type>.IDictionary
IdDataColsByObjAttrs string>.IDictionary
IdDataColsByObjMemberInfo string>.IDictionary
IdGeneratorsByDataCol GeneratorType>.IDictionary
IdSequencesByDataCol string>.IDictionary
NonIdDataColsByObjAttrs string>.IDictionary
NonIdDataColsByObjMemberInfo string>.IDictionary
Table string
TypeName string

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

Метод Описание
ClassMapping ( XmlNode hibConfNode ) : System

Construct it from an NHibernate config's "class" node. Will not include foreign keys by default.

ClassMapping ( XmlNode hibConfNode, bool reflect ) : System

Construct it from an NHibernate config's "class" node. This allows you to skip using reflection to populate the class info, if for example your Dao doesn't use it for some reason. Will not include foreign keys by default.

ClassMapping ( XmlNode hibConfNode, bool reflect, bool includeForeignKeys ) : System

Construct it from an NHibernate config's "class" node. This allows you to skip using reflection to populate the class info, if for example your Dao doesn't use it for some reason. This also allows you to specify whether to include many-to-one and one-to-one links as properties (may break FastDAO since the type of the attribute on the object will need to be the foreign key type (I.E. int) rather than the real object type of the relationship, which is what NHibernate expects).

ClassMapping ( string typeName, string tableName, IEnumerable colDefinitions ) : System

A constructor that allows you to explicitly declare the type, table name, and column mappings, without using an XML mapping string. (e.g. if you want to store mapping info in a database)

ClassMapping ( string typeName, string tableName, IEnumerable colDefinitions, bool reflect ) : System

A constructor that allows you to explicitly declare the type, table name, and column mappings, without using an XML mapping string. (e.g. if you want to store mapping info in a database)

ToString ( ) : string

Returns the class mapping type name and table name.

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

Метод Описание
ParseColumnType ( string input ) : Type
ParseNHibernateXML ( XmlNode hibConfNode, bool includeForeignKeys ) : void
ReflectOnTypeInfo ( ) : void

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

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

Construct it from an NHibernate config's "class" node. Will not include foreign keys by default.
public ClassMapping ( XmlNode hibConfNode ) : System
hibConfNode System.Xml.XmlNode The XML configuration.
Результат System

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

Construct it from an NHibernate config's "class" node. This allows you to skip using reflection to populate the class info, if for example your Dao doesn't use it for some reason. Will not include foreign keys by default.
public ClassMapping ( XmlNode hibConfNode, bool reflect ) : System
hibConfNode System.Xml.XmlNode The XML configuration.
reflect bool Whether or not to use reflection to populate all the class info.
Результат System

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

Construct it from an NHibernate config's "class" node. This allows you to skip using reflection to populate the class info, if for example your Dao doesn't use it for some reason. This also allows you to specify whether to include many-to-one and one-to-one links as properties (may break FastDAO since the type of the attribute on the object will need to be the foreign key type (I.E. int) rather than the real object type of the relationship, which is what NHibernate expects).
public ClassMapping ( XmlNode hibConfNode, bool reflect, bool includeForeignKeys ) : System
hibConfNode System.Xml.XmlNode The XML configuration.
reflect bool Whether or not to use reflection to populate all the class info.
includeForeignKeys bool If true, many-to-one and one-to-one /// links will be included as properties.
Результат System

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

A constructor that allows you to explicitly declare the type, table name, and column mappings, without using an XML mapping string. (e.g. if you want to store mapping info in a database)
public ClassMapping ( string typeName, string tableName, IEnumerable colDefinitions ) : System
typeName string The fully-qualified Class,Assembly type name for the object.
tableName string The data source table name.
colDefinitions IEnumerable List of column mappings.
Результат System

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

A constructor that allows you to explicitly declare the type, table name, and column mappings, without using an XML mapping string. (e.g. if you want to store mapping info in a database)
public ClassMapping ( string typeName, string tableName, IEnumerable colDefinitions, bool reflect ) : System
typeName string The fully-qualified Class,Assembly type name for the object.
tableName string The data source table name.
colDefinitions IEnumerable List of column mappings.
reflect bool Whether or not to use reflection to populate all the class info.
Результат System

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

Returns the class mapping type name and table name.
public ToString ( ) : string
Результат string

Описание свойств

AllDataColsByObjAttrs публичное свойство

IDCols + PropertyCols together. Key: Class Property/Attribute Name Value: DB Column name
public IDictionary AllDataColsByObjAttrs
Результат string>.IDictionary

AllDataColsByObjMemberInfo публичное свойство

IDCols + PropertyCols together. Key: Class Property/Attribute MemberInfo Value: DB Column name
public IDictionary AllDataColsByObjMemberInfo
Результат string>.IDictionary

AllDataColsInOrder публичное свойство

The DB column names in the order they appeared in the mapping file.
public IList AllDataColsInOrder
Результат IList

AllObjAttrsByDataCol публичное свойство

The class attribute names keyed by the column name (case insensitive since column names read from the data source may or may not be in the expected case). Key: DB Column name Value: Class Property/Attribute Name
public IDictionary AllObjAttrsByDataCol
Результат string>.IDictionary

AllObjMemberInfosByDataCol публичное свойство

The MemberInfos keyed by the column name (case insensitive since column names read from the data source may or may not be in the expected case). Key: DB Column name Value: Class Property/Attribute MemberInfo
public IDictionary AllObjMemberInfosByDataCol
Результат MemberInfo>.IDictionary

AllObjMemberInfosByObjAttr публичное свойство

The MemberInfos keyed by the column name. Key: Class Property/Attribute Name Value: Class Property/Attribute MemberInfo
public IDictionary AllObjMemberInfosByObjAttr
Результат MemberInfo>.IDictionary

ClassType публичное свойство

The class that is being mapped.
public Type,System ClassType
Результат System.Type

Constructor публичное свойство

The constructor that takes no parameters.
public ConstructorInfo,System.Reflection Constructor
Результат System.Reflection.ConstructorInfo

DataColTypesByDataCol публичное свойство

Column types, if specified in the mapping file. Key: Column name (case insensitive since column names read from the data source may or may not be in the expected case) Value: Type string from the mapping file, or null if none was specified.
public IDictionary DataColTypesByDataCol
Результат Type>.IDictionary

DataColTypesByObjAttr публичное свойство

Column types, if specified in the mapping file. Key: Class Property/Attribute Name Value: Type string from the mapping file, or null if none was specified.
public IDictionary DataColTypesByObjAttr
Результат Type>.IDictionary

IdDataColsByObjAttrs публичное свойство

The columns that comprise the ID. Key: Class Property/Attribute Value: DB Column
public IDictionary IdDataColsByObjAttrs
Результат string>.IDictionary

IdDataColsByObjMemberInfo публичное свойство

The columns that comprise the ID. Key: Class Property/Attribute MemberInfo Value: DB Column name
public IDictionary IdDataColsByObjMemberInfo
Результат string>.IDictionary

IdGeneratorsByDataCol публичное свойство

For each ID column, what type of generator do we use (case insensitive since column names read from the data source may or may not be in the expected case). Key: Column name Value: Generator type.
public IDictionary IdGeneratorsByDataCol
Результат GeneratorType>.IDictionary

IdSequencesByDataCol публичное свойство

For each ID column, what sequence (if any) do we use. Only populated for IDs with GeneratorType SEQUENCE. Key: Column name (case insensitive since column names read from the data source may or may not be in the expected case) Value: Sequence name.
public IDictionary IdSequencesByDataCol
Результат string>.IDictionary

NonIdDataColsByObjAttrs публичное свойство

All the columns that aren't part of the ID. Key: Class Property/Attribute Value: DB Column name
public IDictionary NonIdDataColsByObjAttrs
Результат string>.IDictionary

NonIdDataColsByObjMemberInfo публичное свойство

All the columns that aren't part of the ID. Key: Class Property/Attribute MemberInfo Value: DB Column name
public IDictionary NonIdDataColsByObjMemberInfo
Результат string>.IDictionary

Table публичное свойство

The table it is being mapped to.
public string Table
Результат string

TypeName публичное свойство

The class name that is being mapped.
public string TypeName
Результат string