C# Class Azavea.Open.DAO.ClassMapping

Represents a mapping of a class onto a database table.
Afficher le fichier Open project: azavea/net-dao Class Usage Examples

Méthodes publiques

Свойство Type Description
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

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
ParseColumnType ( string input ) : Type
ParseNHibernateXML ( XmlNode hibConfNode, bool includeForeignKeys ) : void
ReflectOnTypeInfo ( ) : void

Method Details

ClassMapping() public méthode

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

ClassMapping() public méthode

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

ClassMapping() public méthode

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

ClassMapping() public méthode

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

ClassMapping() public méthode

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

ToString() public méthode

Returns the class mapping type name and table name.
public ToString ( ) : string
Résultat string

Property Details

AllDataColsByObjAttrs public_oe property

IDCols + PropertyCols together. Key: Class Property/Attribute Name Value: DB Column name
public IDictionary AllDataColsByObjAttrs
Résultat string>.IDictionary

AllDataColsByObjMemberInfo public_oe property

IDCols + PropertyCols together. Key: Class Property/Attribute MemberInfo Value: DB Column name
public IDictionary AllDataColsByObjMemberInfo
Résultat string>.IDictionary

AllDataColsInOrder public_oe property

The DB column names in the order they appeared in the mapping file.
public IList AllDataColsInOrder
Résultat IList

AllObjAttrsByDataCol public_oe property

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

AllObjMemberInfosByDataCol public_oe property

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

AllObjMemberInfosByObjAttr public_oe property

The MemberInfos keyed by the column name. Key: Class Property/Attribute Name Value: Class Property/Attribute MemberInfo
public IDictionary AllObjMemberInfosByObjAttr
Résultat MemberInfo>.IDictionary

ClassType public_oe property

The class that is being mapped.
public Type,System ClassType
Résultat System.Type

Constructor public_oe property

The constructor that takes no parameters.
public ConstructorInfo,System.Reflection Constructor
Résultat System.Reflection.ConstructorInfo

DataColTypesByDataCol public_oe property

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

DataColTypesByObjAttr public_oe property

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

IdDataColsByObjAttrs public_oe property

The columns that comprise the ID. Key: Class Property/Attribute Value: DB Column
public IDictionary IdDataColsByObjAttrs
Résultat string>.IDictionary

IdDataColsByObjMemberInfo public_oe property

The columns that comprise the ID. Key: Class Property/Attribute MemberInfo Value: DB Column name
public IDictionary IdDataColsByObjMemberInfo
Résultat string>.IDictionary

IdGeneratorsByDataCol public_oe property

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

IdSequencesByDataCol public_oe property

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

NonIdDataColsByObjAttrs public_oe property

All the columns that aren't part of the ID. Key: Class Property/Attribute Value: DB Column name
public IDictionary NonIdDataColsByObjAttrs
Résultat string>.IDictionary

NonIdDataColsByObjMemberInfo public_oe property

All the columns that aren't part of the ID. Key: Class Property/Attribute MemberInfo Value: DB Column name
public IDictionary NonIdDataColsByObjMemberInfo
Résultat string>.IDictionary

Table public_oe property

The table it is being mapped to.
public string Table
Résultat string

TypeName public_oe property

The class name that is being mapped.
public string TypeName
Résultat string