Craig's Utility Library  4.0 Beta
Utilities.ORM.Manager.Schema.BaseClasses.TableBase Class Referenceabstract

Table base class More...

Inheritance diagram for Utilities.ORM.Manager.Schema.BaseClasses.TableBase:
Utilities.ORM.Manager.Schema.Interfaces.ITable Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure Utilities.ORM.Manager.Schema.Default.Database.Table Utilities.ORM.Manager.Schema.Default.Database.View

Public Member Functions

abstract IColumn AddColumn< T > (string ColumnName, DbType ColumnType, int Length=0, bool Nullable=true, bool Identity=false, bool Index=false, bool PrimaryKey=false, bool Unique=false, string ForeignKeyTable="", string ForeignKeyColumn="", T DefaultValue=default(T), bool OnDeleteCascade=false, bool OnUpdateCascade=false, bool OnDeleteSetNull=false)
 Adds a column More...
 
abstract void AddForeignKey (string ColumnName, string ForeignKeyTable, string ForeignKeyColumn)
 Adds a foreign key More...
 
abstract ITrigger AddTrigger (string Name, string Definition, Enums.TriggerType Type)
 Adds a trigger to the table More...
 
bool ContainsColumn (string ColumnName)
 Determines if a column exists in the table More...
 
void SetupForeignKeys ()
 Sets up foreign keys More...
 
- Public Member Functions inherited from Utilities.ORM.Manager.Schema.Interfaces.ITable
ITrigger AddTrigger (string Name, string Definition, TriggerType Type)
 Adds a trigger to the table More...
 

Protected Member Functions

 TableBase (string Name, ISource Source)
 Constructor More...
 

Properties

ICollection< IColumnColumns [get]
 Columns More...
 
string Name [get, set]
 Name of the table More...
 
ISource Source [get]
 Source/Parent More...
 
ICollection< ITriggerTriggers [get]
 List of triggers associated with the table More...
 
IColumn this[string Name] [get]
 The column specified More...
 
- Properties inherited from Utilities.ORM.Manager.Schema.Interfaces.ITable
ICollection< IColumnColumns [get]
 Columns More...
 
string Name [get, set]
 Name More...
 
ISource Source [get]
 Parent of the table structure More...
 
ICollection< ITriggerTriggers [get]
 Triggers associated with the table (if source supports them) More...
 
IColumn this[string Name] [get]
 Returns the specified column More...
 

Detailed Description

Table base class

Definition at line 33 of file TableBase.cs.

Constructor & Destructor Documentation

Utilities.ORM.Manager.Schema.BaseClasses.TableBase.TableBase ( string  Name,
ISource  Source 
)
protected

Constructor

Parameters
NameName of the table
SourceSource that the table is from

Definition at line 40 of file TableBase.cs.

Member Function Documentation

abstract IColumn Utilities.ORM.Manager.Schema.BaseClasses.TableBase.AddColumn< T > ( string  ColumnName,
DbType  ColumnType,
int  Length = 0,
bool  Nullable = true,
bool  Identity = false,
bool  Index = false,
bool  PrimaryKey = false,
bool  Unique = false,
string  ForeignKeyTable = "",
string  ForeignKeyColumn = "",
DefaultValue = default(T),
bool  OnDeleteCascade = false,
bool  OnUpdateCascade = false,
bool  OnDeleteSetNull = false 
)
pure virtual

Adds a column

Parameters
ColumnNameColumn Name
ColumnTypeData type
LengthData length
NullableNullable?
IdentityIdentity?
IndexIndex?
PrimaryKeyPrimary key?
UniqueUnique?
ForeignKeyTableForeign key table
ForeignKeyColumnForeign key column
DefaultValueDefault value
OnDeleteCascadeOn Delete Cascade
OnUpdateCascadeOn Update Cascade
OnDeleteSetNullOn Delete Set Null
Template Parameters
TColumn type

Implements Utilities.ORM.Manager.Schema.Interfaces.ITable.

Implemented in Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure, Utilities.ORM.Manager.Schema.Default.Database.View, and Utilities.ORM.Manager.Schema.Default.Database.Table.

abstract void Utilities.ORM.Manager.Schema.BaseClasses.TableBase.AddForeignKey ( string  ColumnName,
string  ForeignKeyTable,
string  ForeignKeyColumn 
)
pure virtual

Adds a foreign key

Parameters
ColumnNameColumn name
ForeignKeyTableForeign key table
ForeignKeyColumnForeign key column

Implements Utilities.ORM.Manager.Schema.Interfaces.ITable.

Implemented in Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure, Utilities.ORM.Manager.Schema.Default.Database.View, and Utilities.ORM.Manager.Schema.Default.Database.Table.

abstract ITrigger Utilities.ORM.Manager.Schema.BaseClasses.TableBase.AddTrigger ( string  Name,
string  Definition,
Enums.TriggerType  Type 
)
pure virtual

Adds a trigger to the table

Parameters
NameName of the trigger
DefinitionDefinition of the trigger
TypeTrigger type
Returns
The trigger specified
bool Utilities.ORM.Manager.Schema.BaseClasses.TableBase.ContainsColumn ( string  ColumnName)

Determines if a column exists in the table

Parameters
ColumnNameColumn name
Returns
True if it exists, false otherwise

Implements Utilities.ORM.Manager.Schema.Interfaces.ITable.

Definition at line 113 of file TableBase.cs.

void Utilities.ORM.Manager.Schema.BaseClasses.TableBase.SetupForeignKeys ( )

Sets up foreign keys

Implements Utilities.ORM.Manager.Schema.Interfaces.ITable.

Definition at line 121 of file TableBase.cs.

Property Documentation

ICollection<IColumn> Utilities.ORM.Manager.Schema.BaseClasses.TableBase.Columns
get

Columns

Definition at line 51 of file TableBase.cs.

string Utilities.ORM.Manager.Schema.BaseClasses.TableBase.Name
getset

Name of the table

Definition at line 56 of file TableBase.cs.

ISource Utilities.ORM.Manager.Schema.BaseClasses.TableBase.Source
get

Source/Parent

Definition at line 61 of file TableBase.cs.

IColumn Utilities.ORM.Manager.Schema.BaseClasses.TableBase.this[string Name]
get

The column specified

Parameters
NameName of the column
Returns
The column specified

Definition at line 131 of file TableBase.cs.

ICollection<ITrigger> Utilities.ORM.Manager.Schema.BaseClasses.TableBase.Triggers
get

List of triggers associated with the table

Definition at line 66 of file TableBase.cs.


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