Craig's Utility Library  4.0 Beta
Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType > Class Template Reference

Mapping base class More...

Inheritance diagram for Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >:
Utilities.ORM.Manager.Mapper.Interfaces.IMapping< ClassType > Utilities.ORM.Manager.Mapper.Interfaces.IMapping< ClassType >

Public Member Functions

override bool Equals (object obj)
 determines if the mappings are equal More...
 
override int GetHashCode ()
 Gets the mapping's hash code More...
 
ID< ClassType, DataType > ID< DataType > (System.Linq.Expressions.Expression< Func< ClassType, DataType >> Expression)
 Creates an ID object More...
 
ManyToMany< ClassType, DataType > ManyToMany< DataType > (System.Linq.Expressions.Expression< Func< ClassType, IEnumerable< DataType >>> Expression)
 Creates a many to many object More...
 
ListManyToMany< ClassType, DataType > ManyToMany< DataType > (System.Linq.Expressions.Expression< Func< ClassType, List< DataType >>> Expression)
 Creates a many to many object More...
 
IListManyToMany< ClassType, DataType > ManyToMany< DataType > (System.Linq.Expressions.Expression< Func< ClassType, IList< DataType >>> Expression)
 Creates a many to many object More...
 
ICollectionManyToMany< ClassType, DataType > ManyToMany< DataType > (System.Linq.Expressions.Expression< Func< ClassType, ICollection< DataType >>> Expression)
 Creates a many to many object More...
 
ManyToOne< ClassType, DataType > ManyToOne< DataType > (System.Linq.Expressions.Expression< Func< ClassType, DataType >> Expression)
 Creates a many to one More...
 
IEnumerableManyToOne< ClassType, DataType > ManyToOne< DataType > (System.Linq.Expressions.Expression< Func< ClassType, IEnumerable< DataType >>> Expression)
 Creates a many to one More...
 
IListManyToOne< ClassType, DataType > ManyToOne< DataType > (System.Linq.Expressions.Expression< Func< ClassType, IList< DataType >>> Expression)
 Creates a many to one More...
 
ICollectionManyToOne< ClassType, DataType > ManyToOne< DataType > (System.Linq.Expressions.Expression< Func< ClassType, ICollection< DataType >>> Expression)
 Creates a many to one More...
 
ListManyToOne< ClassType, DataType > ManyToOne< DataType > (System.Linq.Expressions.Expression< Func< ClassType, List< DataType >>> Expression)
 Creates a many to one More...
 
Map< ClassType, DataType > Map< DataType > (System.Linq.Expressions.Expression< Func< ClassType, DataType >> Expression)
 Creates a map object More...
 
Reference< ClassType, DataType > Reference< DataType > (System.Linq.Expressions.Expression< Func< ClassType, DataType >> Expression)
 Creates a reference object More...
 
IMapping SetDeleteCommand (string Command, System.Data.CommandType CommandType)
 Sets the default delete command More...
 
IMapping SetInsertCommand (string Command, System.Data.CommandType CommandType)
 Sets the default insert command More...
 
IMapping SetSelectAllCommand (string Command, System.Data.CommandType CommandType)
 Sets the default select all command More...
 
IMapping SetSelectAnyCommand (string Command, System.Data.CommandType CommandType)
 Sets the default select any command More...
 
void Setup (ISourceInfo Source, Utilities.ORM.Manager.Mapper.Manager MappingProvider, Utilities.ORM.Manager.QueryProvider.Manager QueryProvider)
 Sets up the mapping More...
 
IMapping SetUpdateCommand (string Command, System.Data.CommandType CommandType)
 Sets the default update command More...
 
override string ToString ()
 Converts the mapping to a string More...
 
- Public Member Functions inherited from Utilities.ORM.Manager.Mapper.Interfaces.IMapping< ClassType >
ID< ClassType, DataType > ID< DataType > (Expression< Func< ClassType, DataType >> Expression)
 Declares a property as an ID More...
 
ManyToMany< ClassType, DataType > ManyToMany< DataType > (Expression< Func< ClassType, IEnumerable< DataType >>> Expression)
 Many to many mapping More...
 
ListManyToMany< ClassType, DataType > ManyToMany< DataType > (Expression< Func< ClassType, List< DataType >>> Expression)
 Many to many mapping More...
 
ManyToOne< ClassType, DataType > ManyToOne< DataType > (Expression< Func< ClassType, DataType >> Expression)
 Many to one More...
 
IEnumerableManyToOne< ClassType, DataType > ManyToOne< DataType > (Expression< Func< ClassType, IEnumerable< DataType >>> Expression)
 IEnumerable many to one More...
 
ListManyToOne< ClassType, DataType > ManyToOne< DataType > (Expression< Func< ClassType, List< DataType >>> Expression)
 IEnumerable many to one More...
 
Map< ClassType, DataType > Map< DataType > (Expression< Func< ClassType, DataType >> Expression)
 Sets a property as a map type More...
 
Reference< ClassType, DataType > Reference< DataType > (Expression< Func< ClassType, DataType >> Expression)
 Sets a property as a reference type More...
 
IMapping SetDeleteCommand (string Command, CommandType CommandType)
 Sets the default delete command More...
 
IMapping SetInsertCommand (string Command, CommandType CommandType)
 Sets the default insert command More...
 
IMapping SetSelectAllCommand (string Command, CommandType CommandType)
 Sets the default select all command More...
 
IMapping SetSelectAnyCommand (string Command, CommandType CommandType)
 Sets the default select any command More...
 
void Setup (ISourceInfo Source, Utilities.ORM.Manager.Mapper.Manager MappingProvider, Utilities.ORM.Manager.QueryProvider.Manager QueryProvider)
 Sets up the mapping More...
 
IMapping SetUpdateCommand (string Command, CommandType CommandType)
 Sets the default update command More...
 

Static Public Member Functions

static bool operator!= (MappingBaseClass< ClassType, DatabaseType > Item1, MappingBaseClass< ClassType, DatabaseType > Item2)
 Determines if the two items are not equal More...
 
static bool operator== (MappingBaseClass< ClassType, DatabaseType > Item1, MappingBaseClass< ClassType, DatabaseType > Item2)
 Determines if the two items are equal More...
 

Protected Member Functions

 MappingBaseClass (string TableName="", string Suffix="_", string Prefix="", int Order=10)
 Constructor More...
 

Properties

Type DatabaseConfigType [get]
 Database config type More...
 
string DeleteCommand [get]
 Delete command More...
 
System.Data.CommandType DeleteCommandType [get]
 Delete command type More...
 
ICollection< IPropertyIDProperties [get]
 ID Properties More...
 
string InsertCommand [get]
 Insert command More...
 
System.Data.CommandType InsertCommandType [get]
 Insert command type More...
 
Type ObjectType [get]
 Object type More...
 
int Order [get, set]
 The order in which the mappings are initialized (lower items are initialized prior to higher number items) More...
 
string Prefix [get]
 Prefix used to define names of properties/table name More...
 
ICollection< IPropertyProperties [get]
 List of properties More...
 
string SelectAllCommand [get]
 Select all command More...
 
System.Data.CommandType SelectAllCommandType [get]
 Select all command type More...
 
string SelectAnyCommand [get]
 Select any command More...
 
System.Data.CommandType SelectAnyCommandType [get]
 Select any command type More...
 
string Suffix [get]
 Suffix used to define names of properties/table name More...
 
string TableName [get]
 Table name More...
 
string UpdateCommand [get]
 Update command More...
 
System.Data.CommandType UpdateCommandType [get]
 Update command type More...
 
- Properties inherited from Utilities.ORM.Manager.Mapper.Interfaces.IMapping< ClassType >
Type DatabaseConfigType [get]
 Database config type More...
 
string DeleteCommand [get]
 Delete command More...
 
CommandType DeleteCommandType [get]
 Delete command type More...
 
ICollection< IPropertyIDProperties [get]
 ID properties More...
 
string InsertCommand [get]
 Insert command More...
 
CommandType InsertCommandType [get]
 Insert command type More...
 
Type ObjectType [get]
 The object type associated with the mapping More...
 
int Order [get, set]
 Order that the mappings are initialized More...
 
string Prefix [get]
 Prefix used for defining properties/table name More...
 
ICollection< IPropertyProperties [get]
 Properties list More...
 
string SelectAllCommand [get]
 Select all command More...
 
CommandType SelectAllCommandType [get]
 Select all command type More...
 
string SelectAnyCommand [get]
 Select any command More...
 
CommandType SelectAnyCommandType [get]
 Select any command type More...
 
string Suffix [get]
 Suffix used for defining properties/table name More...
 
string TableName [get]
 Table name More...
 
string UpdateCommand [get]
 Update command More...
 
CommandType UpdateCommandType [get]
 Update command type More...
 

Detailed Description

Mapping base class

Template Parameters
ClassTypeClass type
DatabaseTypeDatabase type
Type Constraints
DatabaseType :IDatabase 
ClassType :class 

Definition at line 37 of file MappingBaseClass.cs.

Constructor & Destructor Documentation

Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.MappingBaseClass ( string  TableName = "",
string  Suffix = "_",
string  Prefix = "",
int  Order = 10 
)
protected

Constructor

Parameters
TableNameTable name
SuffixSuffix used to define names of properties/table name
PrefixPrefix used to define names of properties/table name
OrderThe order in which the mappings are initialized (lower items are initialized prior to higher number items)

Definition at line 51 of file MappingBaseClass.cs.

Member Function Documentation

override bool Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.Equals ( object  obj)

determines if the mappings are equal

Parameters
obj
Returns

Definition at line 181 of file MappingBaseClass.cs.

override int Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.GetHashCode ( )

Gets the mapping's hash code

Returns
Hash code for the mapping

Definition at line 194 of file MappingBaseClass.cs.

ID<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ID< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, DataType >>  Expression)

Creates an ID object

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
ID object

Definition at line 205 of file MappingBaseClass.cs.

ManyToMany<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToMany< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, IEnumerable< DataType >>>  Expression)

Creates a many to many object

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to many object
Type Constraints
DataType :class 

Definition at line 220 of file MappingBaseClass.cs.

ListManyToMany<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToMany< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, List< DataType >>>  Expression)

Creates a many to many object

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to many object
Type Constraints
DataType :class 

Definition at line 236 of file MappingBaseClass.cs.

IListManyToMany<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToMany< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, IList< DataType >>>  Expression)

Creates a many to many object

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to many object
Type Constraints
DataType :class 

Definition at line 252 of file MappingBaseClass.cs.

ICollectionManyToMany<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToMany< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, ICollection< DataType >>>  Expression)

Creates a many to many object

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to many object
Type Constraints
DataType :class 

Definition at line 268 of file MappingBaseClass.cs.

ManyToOne<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToOne< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, DataType >>  Expression)

Creates a many to one

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to one object
Type Constraints
DataType :class 

Definition at line 284 of file MappingBaseClass.cs.

IEnumerableManyToOne<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToOne< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, IEnumerable< DataType >>>  Expression)

Creates a many to one

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to one object
Type Constraints
DataType :class 

Definition at line 300 of file MappingBaseClass.cs.

IListManyToOne<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToOne< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, IList< DataType >>>  Expression)

Creates a many to one

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to one object
Type Constraints
DataType :class 

Definition at line 316 of file MappingBaseClass.cs.

ICollectionManyToOne<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToOne< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, ICollection< DataType >>>  Expression)

Creates a many to one

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to one object
Type Constraints
DataType :class 

Definition at line 332 of file MappingBaseClass.cs.

ListManyToOne<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ManyToOne< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, List< DataType >>>  Expression)

Creates a many to one

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The many to one object
Type Constraints
DataType :class 

Definition at line 348 of file MappingBaseClass.cs.

Map<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.Map< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, DataType >>  Expression)

Creates a map object

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
The map object
Type Constraints
DataType :class 

Definition at line 364 of file MappingBaseClass.cs.

static bool Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.operator!= ( MappingBaseClass< ClassType, DatabaseType >  Item1,
MappingBaseClass< ClassType, DatabaseType >  Item2 
)
static

Determines if the two items are not equal

Parameters
Item1Item 1
Item2Item 2
Returns
True if they are not equal, false otherwise

Definition at line 160 of file MappingBaseClass.cs.

static bool Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.operator== ( MappingBaseClass< ClassType, DatabaseType >  Item1,
MappingBaseClass< ClassType, DatabaseType >  Item2 
)
static

Determines if the two items are equal

Parameters
Item1Item 1
Item2Item 2
Returns
True if they are equal, false otherwise

Definition at line 171 of file MappingBaseClass.cs.

Reference<ClassType, DataType> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.Reference< DataType > ( System.Linq.Expressions.Expression< Func< ClassType, DataType >>  Expression)

Creates a reference object

Template Parameters
DataTypeData type
Parameters
ExpressionExpression
Returns
A reference object

Definition at line 380 of file MappingBaseClass.cs.

IMapping Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SetDeleteCommand ( string  Command,
System.Data.CommandType  CommandType 
)

Sets the default delete command

Parameters
CommandCommand
CommandTypeCommand type
Returns
This

Definition at line 395 of file MappingBaseClass.cs.

IMapping Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SetInsertCommand ( string  Command,
System.Data.CommandType  CommandType 
)

Sets the default insert command

Parameters
CommandCommand
CommandTypeCommand type
Returns
This

Definition at line 408 of file MappingBaseClass.cs.

IMapping Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SetSelectAllCommand ( string  Command,
System.Data.CommandType  CommandType 
)

Sets the default select all command

Parameters
CommandCommand
CommandTypeCommand type
Returns
This

Definition at line 421 of file MappingBaseClass.cs.

IMapping Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SetSelectAnyCommand ( string  Command,
System.Data.CommandType  CommandType 
)

Sets the default select any command

Parameters
CommandCommand
CommandTypeCommand type
Returns
This

Definition at line 434 of file MappingBaseClass.cs.

void Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.Setup ( ISourceInfo  Source,
Utilities.ORM.Manager.Mapper.Manager  MappingProvider,
Utilities.ORM.Manager.QueryProvider.Manager  QueryProvider 
)

Sets up the mapping

Parameters
SourceSource info
QueryProviderQuery provider
MappingProviderMapping provider

Definition at line 448 of file MappingBaseClass.cs.

IMapping Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SetUpdateCommand ( string  Command,
System.Data.CommandType  CommandType 
)

Sets the default update command

Parameters
CommandCommand
CommandTypeCommand type
Returns
This

Definition at line 470 of file MappingBaseClass.cs.

override string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ToString ( )

Converts the mapping to a string

Returns
The table name

Definition at line 481 of file MappingBaseClass.cs.

Property Documentation

Type Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.DatabaseConfigType
get

Database config type

Definition at line 66 of file MappingBaseClass.cs.

string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.DeleteCommand
get

Delete command

Definition at line 71 of file MappingBaseClass.cs.

System.Data.CommandType Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.DeleteCommandType
get

Delete command type

Definition at line 76 of file MappingBaseClass.cs.

ICollection<IProperty> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.IDProperties
get

ID Properties

Definition at line 81 of file MappingBaseClass.cs.

string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.InsertCommand
get

Insert command

Definition at line 86 of file MappingBaseClass.cs.

System.Data.CommandType Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.InsertCommandType
get

Insert command type

Definition at line 91 of file MappingBaseClass.cs.

Type Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.ObjectType
get

Object type

Definition at line 96 of file MappingBaseClass.cs.

int Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.Order
getset

The order in which the mappings are initialized (lower items are initialized prior to higher number items)

Definition at line 102 of file MappingBaseClass.cs.

string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.Prefix
get

Prefix used to define names of properties/table name

Definition at line 107 of file MappingBaseClass.cs.

ICollection<IProperty> Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.Properties
get

List of properties

Definition at line 112 of file MappingBaseClass.cs.

string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SelectAllCommand
get

Select all command

Definition at line 117 of file MappingBaseClass.cs.

System.Data.CommandType Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SelectAllCommandType
get

Select all command type

Definition at line 122 of file MappingBaseClass.cs.

string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SelectAnyCommand
get

Select any command

Definition at line 127 of file MappingBaseClass.cs.

System.Data.CommandType Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.SelectAnyCommandType
get

Select any command type

Definition at line 132 of file MappingBaseClass.cs.

string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.Suffix
get

Suffix used to define names of properties/table name

Definition at line 137 of file MappingBaseClass.cs.

string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.TableName
get

Table name

Definition at line 142 of file MappingBaseClass.cs.

string Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.UpdateCommand
get

Update command

Definition at line 147 of file MappingBaseClass.cs.

System.Data.CommandType Utilities.ORM.BaseClasses.MappingBaseClass< ClassType, DatabaseType >.UpdateCommandType
get

Update command type

Definition at line 152 of file MappingBaseClass.cs.


The documentation for this class was generated from the following file: