Craig's Utility Library  4.0 Beta
Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType > Class Template Referenceabstract

Property base class More...

Inheritance diagram for Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >:
Utilities.ORM.Manager.Mapper.Interfaces.IProperty< ClassType, DataType, ReturnType > Utilities.ORM.Manager.Mapper.Interfaces.IProperty< ClassType, DataType >

Public Member Functions

abstract IBatch CascadeDelete (ClassType Object, ISourceInfo Source, IList< object > ObjectsSeen)
 Does a cascade delete of an object for this property More...
 
abstract IBatch CascadeJoinsDelete (ClassType Object, ISourceInfo Source, IList< object > ObjectsSeen)
 Called to create a batch that deletes items from the joining tables More...
 
abstract IBatch CascadeJoinsSave (ClassType Object, ISourceInfo Source, IList< object > ObjectsSeen)
 Called to create a batch that saves items from the joining tables More...
 
abstract IBatch CascadeSave (ClassType Object, ISourceInfo Source, IList< object > ObjectsSeen)
 Does a cascade save of an object for this property More...
 
override bool Equals (object obj)
 Determines if the two objects are equal and returns true if they are, false otherwise More...
 
override int GetHashCode ()
 Returns the hash code for the property More...
 
abstract object GetParameter (object Object)
 Gets the property as a parameter (for classes, this will return the ID of the property) More...
 
abstract object GetParameter (Dynamo Object)
 Gets the property as a parameter (for classes, this will return the ID of the property) More...
 
object GetValue (ClassType Object)
 Gets the property's value from the object sent in More...
 
object GetValue (object Object)
 Gets the property's value from the object sent in More...
 
object GetValue (Dynamo Object)
 Gets the property's value from the object sent in More...
 
abstract IBatch JoinsDelete (ClassType Object, ISourceInfo Source, IList< object > ObjectsSeen)
 Called to create a batch that deletes items from the joining table More...
 
abstract IBatch JoinsSave (ClassType Object, ISourceInfo Source, IList< object > ObjectsSeen)
 Called to create a batch that saves items from the joining table More...
 
ReturnType SetAutoIncrement ()
 Turns on autoincrement for this property More...
 
ReturnType SetCascade ()
 Turns on cascade for saving/deleting More...
 
ReturnType SetDefaultValue (Func< DataType > Value)
 Sets the default value of the property More...
 
ReturnType SetFieldName (string FieldName)
 Sets the name of the field in the database More...
 
ReturnType SetIndex ()
 Turns on indexing for this property More...
 
ReturnType SetLoadUsingCommand (string Command, CommandType CommandType)
 Allows you to load a property based on a specified command More...
 
ReturnType SetMaxLength (int MaxLength)
 Sets the max length for the property (or precision for items like decimal values) More...
 
ReturnType SetNotNull ()
 Sets the field such that null values are not allowed More...
 
ReturnType SetTableName (string TableName)
 Set database table name More...
 
ReturnType SetUnique ()
 Ensures the field is unique More...
 
abstract void Setup (ISourceInfo Source, Manager MappingProvider, QueryProvider.Manager QueryProvider)
 Sets up the property, is used internally More...
 
override string ToString ()
 Gets the property as a string More...
 

Static Public Member Functions

static bool operator!= (PropertyBase< ClassType, DataType, ReturnType > first, PropertyBase< ClassType, DataType, ReturnType > second)
 != operator More...
 
static bool operator< (PropertyBase< ClassType, DataType, ReturnType > first, PropertyBase< ClassType, DataType, ReturnType > second)
 The < operator More...
 
static bool operator== (PropertyBase< ClassType, DataType, ReturnType > first, PropertyBase< ClassType, DataType, ReturnType > second)
 The == operator More...
 
static bool operator> (PropertyBase< ClassType, DataType, ReturnType > first, PropertyBase< ClassType, DataType, ReturnType > second)
 The > operator More...
 

Protected Member Functions

 PropertyBase (Expression< Func< ClassType, DataType >> Expression, IMapping Mapping)
 Constructor More...
 

Properties

bool AutoIncrement [get]
 Auto increment More...
 
bool Cascade [get]
 Cascade More...
 
Func< ClassType, DataType > CompiledExpression [get]
 Compiled expression More...
 
Func< DataType > DefaultValue [get]
 Default value More...
 
string DerivedFieldName [get]
 Derived field name More...
 
Expression< Func< ClassType, DataType > > Expression [get]
 Expression More...
 
string FieldName [get]
 Field name More...
 
IMapping ForeignMapping [get, set]
 Foreign mapping More...
 
bool Index [get]
 Index More...
 
string LoadCommand [get]
 Command used to load the property More...
 
CommandType LoadCommandType [get]
 Command type for the load command More...
 
IMapping Mapping [get]
 Mapping More...
 
int MaxLength [get]
 Max length More...
 
string Name [get]
 Property name More...
 
bool NotNull [get]
 Not null More...
 
Graph< IMappingStructure [get, protected set]
 Gets the structure. More...
 
string TableName [get]
 Table name More...
 
Type Type [get, protected set]
 Property type More...
 
abstract string TypeName [get]
 Gets the name of the type. More...
 
bool Unique [get]
 Unique More...
 

Detailed Description

Property base class

Type Constraints
ClassType :class 
ReturnType :IProperty 
ReturnType :ClassType 
ReturnType :DataType 
ReturnType :ReturnType 

Definition at line 37 of file PropertyBase.cs.

Constructor & Destructor Documentation

Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.PropertyBase ( Expression< Func< ClassType, DataType >>  Expression,
IMapping  Mapping 
)
protected

Constructor

Parameters
ExpressionExpression used to point to the property
MappingMapping the StringID is added to

Definition at line 46 of file PropertyBase.cs.

Member Function Documentation

abstract IBatch Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.CascadeDelete ( ClassType  Object,
ISourceInfo  Source,
IList< object >  ObjectsSeen 
)
pure virtual

Does a cascade delete of an object for this property

Parameters
ObjectObject
SourceSource info
ObjectsSeenObjects that have been seen thus far
Returns
Batch object with the appropriate commands
abstract IBatch Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.CascadeJoinsDelete ( ClassType  Object,
ISourceInfo  Source,
IList< object >  ObjectsSeen 
)
pure virtual

Called to create a batch that deletes items from the joining tables

Parameters
ObjectObject
SourceSource info
ObjectsSeenObjects that have been seen thus far
Returns
Batch object with the appropriate commands
abstract IBatch Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.CascadeJoinsSave ( ClassType  Object,
ISourceInfo  Source,
IList< object >  ObjectsSeen 
)
pure virtual

Called to create a batch that saves items from the joining tables

Parameters
ObjectObject
SourceSource info
ObjectsSeenObjects that have been seen thus far
Returns
Batch object with the appropriate commands
abstract IBatch Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.CascadeSave ( ClassType  Object,
ISourceInfo  Source,
IList< object >  ObjectsSeen 
)
pure virtual

Does a cascade save of an object for this property

Parameters
ObjectObject
SourceSource info
ObjectsSeenObjects that have been seen thus far
Returns
Batch object with the appropriate commands
override bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Equals ( object  obj)

Determines if the two objects are equal and returns true if they are, false otherwise

Parameters
objObject to compare to
Returns
True if they are equal, false otherwise

Definition at line 260 of file PropertyBase.cs.

override int Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.GetHashCode ( )

Returns the hash code for the property

Returns
The hash code for the property

Definition at line 272 of file PropertyBase.cs.

abstract object Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.GetParameter ( object  Object)
pure virtual

Gets the property as a parameter (for classes, this will return the ID of the property)

Parameters
ObjectObject to get the parameter from
Returns
The parameter version of the property
abstract object Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.GetParameter ( Dynamo  Object)
pure virtual

Gets the property as a parameter (for classes, this will return the ID of the property)

Parameters
ObjectObject to get the parameter from
Returns
The parameter version of the property
object Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.GetValue ( ClassType  Object)

Gets the property's value from the object sent in

Parameters
ObjectObject to get the value from
Returns
The value of the property

Definition at line 296 of file PropertyBase.cs.

object Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.GetValue ( object  Object)

Gets the property's value from the object sent in

Parameters
ObjectObject to get the value from
Returns
The value of the property

Definition at line 308 of file PropertyBase.cs.

object Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.GetValue ( Dynamo  Object)

Gets the property's value from the object sent in

Parameters
ObjectObject to get the value from
Returns
The value of the property

Definition at line 318 of file PropertyBase.cs.

abstract IBatch Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.JoinsDelete ( ClassType  Object,
ISourceInfo  Source,
IList< object >  ObjectsSeen 
)
pure virtual

Called to create a batch that deletes items from the joining table

Parameters
ObjectObject
SourceSource info
ObjectsSeenObjects that have been visited thus far
Returns
Batch object with the appropriate commands
abstract IBatch Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.JoinsSave ( ClassType  Object,
ISourceInfo  Source,
IList< object >  ObjectsSeen 
)
pure virtual

Called to create a batch that saves items from the joining table

Parameters
ObjectObject
SourceSource info
ObjectsSeenObjects that have been visited thus far
Returns
Batch object with the appropriate commands
static bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.operator!= ( PropertyBase< ClassType, DataType, ReturnType >  first,
PropertyBase< ClassType, DataType, ReturnType >  second 
)
static

!= operator

Parameters
firstFirst item
secondSecond item
Returns
returns true if they are not equal, false otherwise

Definition at line 167 of file PropertyBase.cs.

static bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.operator< ( PropertyBase< ClassType, DataType, ReturnType >  first,
PropertyBase< ClassType, DataType, ReturnType >  second 
)
static

The < operator

Parameters
firstFirst item
secondSecond item
Returns
True if the first item is less than the second, false otherwise

Definition at line 178 of file PropertyBase.cs.

static bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.operator== ( PropertyBase< ClassType, DataType, ReturnType >  first,
PropertyBase< ClassType, DataType, ReturnType >  second 
)
static

The == operator

Parameters
firstFirst item
secondSecond item
Returns
true if the first and second item are the same, false otherwise

Definition at line 193 of file PropertyBase.cs.

static bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.operator> ( PropertyBase< ClassType, DataType, ReturnType >  first,
PropertyBase< ClassType, DataType, ReturnType >  second 
)
static

The > operator

Parameters
firstFirst item
secondSecond item
Returns
True if the first item is greater than the second, false otherwise

Definition at line 210 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetAutoIncrement ( )

Turns on autoincrement for this property

Returns
This

Definition at line 345 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetCascade ( )

Turns on cascade for saving/deleting

Returns
this

Definition at line 355 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetDefaultValue ( Func< DataType >  Value)

Sets the default value of the property

Parameters
ValueDefault value
Returns
This IProperty object

Definition at line 366 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetFieldName ( string  FieldName)

Sets the name of the field in the database

Parameters
FieldNameField name
Returns
this

Definition at line 377 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetIndex ( )

Turns on indexing for this property

Returns
This

Definition at line 387 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetLoadUsingCommand ( string  Command,
CommandType  CommandType 
)

Allows you to load a property based on a specified command

Parameters
CommandCommand used to load the property
CommandTypeCommand type
Returns
this

Definition at line 399 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetMaxLength ( int  MaxLength)

Sets the max length for the property (or precision for items like decimal values)

Parameters
MaxLengthMax length
Returns
this

Definition at line 411 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetNotNull ( )

Sets the field such that null values are not allowed

Returns
this

Definition at line 421 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetTableName ( string  TableName)

Set database table name

Parameters
TableNameTable name
Returns
this

Definition at line 432 of file PropertyBase.cs.

ReturnType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.SetUnique ( )

Ensures the field is unique

Returns
this

Definition at line 442 of file PropertyBase.cs.

abstract void Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Setup ( ISourceInfo  Source,
Manager  MappingProvider,
QueryProvider.Manager  QueryProvider 
)
pure virtual

Sets up the property, is used internally

Parameters
MappingProviderMapping provider
QueryProviderQuery provider
SourceSource info
override string Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.ToString ( )

Gets the property as a string

Returns
The string representation of the property

Definition at line 460 of file PropertyBase.cs.

Property Documentation

bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.AutoIncrement
get

Auto increment

Definition at line 62 of file PropertyBase.cs.

bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Cascade
get

Cascade

Definition at line 67 of file PropertyBase.cs.

Func<ClassType, DataType> Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.CompiledExpression
get

Compiled expression

Definition at line 72 of file PropertyBase.cs.

Func<DataType> Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.DefaultValue
get

Default value

Definition at line 77 of file PropertyBase.cs.

string Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.DerivedFieldName
get

Derived field name

Definition at line 82 of file PropertyBase.cs.

Expression<Func<ClassType, DataType> > Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Expression
get

Expression

Definition at line 87 of file PropertyBase.cs.

string Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.FieldName
get

Field name

Definition at line 92 of file PropertyBase.cs.

IMapping Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.ForeignMapping
getset

Foreign mapping

Definition at line 97 of file PropertyBase.cs.

bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Index
get

Index

Definition at line 102 of file PropertyBase.cs.

string Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.LoadCommand
get

Command used to load the property

Definition at line 107 of file PropertyBase.cs.

CommandType Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.LoadCommandType
get

Command type for the load command

Definition at line 112 of file PropertyBase.cs.

IMapping Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Mapping
get

Mapping

Definition at line 117 of file PropertyBase.cs.

int Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.MaxLength
get

Max length

Definition at line 122 of file PropertyBase.cs.

string Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Name
get

Property name

Definition at line 127 of file PropertyBase.cs.

bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.NotNull
get

Not null

Definition at line 132 of file PropertyBase.cs.

Graph<IMapping> Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Structure
getprotected set

Gets the structure.

The structure.

Definition at line 138 of file PropertyBase.cs.

string Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.TableName
get

Table name

Definition at line 143 of file PropertyBase.cs.

Type Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Type
getprotected set

Property type

Definition at line 148 of file PropertyBase.cs.

abstract string Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.TypeName
get

Gets the name of the type.

The name of the type.

Definition at line 154 of file PropertyBase.cs.

bool Utilities.ORM.Manager.Mapper.BaseClasses.PropertyBase< ClassType, DataType, ReturnType >.Unique
get

Unique

Definition at line 159 of file PropertyBase.cs.


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