C# Class nHydrate.Generator.Models.Table

Inheritance: nHydrate.Generator.Common.GeneratorFramework.BaseModelObject, ICodeFacadeObject, INamedObject
Datei anzeigen Open project: nHydrate/nHydrate Class Usage Examples

Protected Properties

Property Type Description
_allowTimestamp bool
_associativeTable bool
_codeFacade string
_columns ReferenceCollection
_createAudit bool
_createMetaData bool
_customRetrieveRules ReferenceCollection
_description string
_fullIndexSearch bool
_generated bool
_hasHistory bool
_id int
_isTypeTable TypedTableConstants
_modifiedAudit bool
_name string
_relationships ReferenceCollection
_staticData RowEntryCollection
_tableIndexList List
_viewRelationships ReferenceCollection

Private Properties

Property Type Description
DoesBaseAllowTableAudit bool
GetAbsoluteBaseTable Table
GetBasePKColumn Column
GetBasePKColumnList IEnumerable
PostLoad void

Public Methods

Method Description
CanInherit ( Table parentTable ) : bool

Determines if the specified table can be a parent of this table

CreateRef ( ) : Reference
CreateRef ( string key ) : Reference
FullHierarchyPrimaryKeyIsDatabaseIdentity ( ) : bool
GetChildRoleRelationsFullHierarchy ( ) : IEnumerable

Get all relations where this table or any derived table is the child

GetCodeFacade ( ) : string
GetColumnInRelationships ( ) : ColumnCollection
GetColumnNotInRelationships ( ) : IEnumerable
GetColumns ( ) : IEnumerable

Returns the columns for this table only (not hierarchy)

GetColumnsByType ( System type ) : IEnumerable
GetColumnsFullHierarchy ( ) : ColumnCollection

This gets all columns from this and all base classes

GetColumnsFullHierarchy ( bool includeCurrent ) : ColumnCollection

This gets all columns from this and all base classes

GetColumnsNotInBase ( ) : ColumnCollection

This gets all columns in this class NOT in a base class

GetForeignKeyColumns ( ) : IEnumerable
GetFullHierarchyTableJoin ( ) : string
GetFullHierarchyTableJoin ( bool useLinqAlias ) : string
GetParentRoleRelationsFullHierarchy ( ) : IEnumerable

Get all relations where this table or any derived table is the parent

GetParentTables ( ) : IEnumerable
GetRelatedTypeTableByColumn ( Column column, bool fullHierarchy, string &roleName ) : Table
GetRelatedTypeTableByColumn ( Column column, string &roleName ) : Table
GetRelations ( ) : RelationCollection

Returns a list of generated relations for this table

GetRelationsFullHierarchy ( ) : IEnumerable
GetRelationsWhereChild ( bool fullHierarchy = false ) : IEnumerable

Returns generated relations for this table

GetSQLSchema ( ) : string
GetTableComponentsFullHierarchy ( bool includeCurrent ) : IEnumerable

This gets all table components from this and all base classes

GetTableCompositesFullHierarchy ( bool includeCurrent ) : IEnumerable

This gets all table composites from this and all base classes

GetTableHierarchy ( ) : IEnumerable

Get the full hierarchy of tables starting with this table and working back to the most base table

GetTablesInheritedFromHierarchy ( ) : IEnumerable

Get all the tables that are descendants of this table

GetViewRelations ( ) : ViewRelationCollection

Returns a list of generated relations for this table to views

IsColumnInherited ( Column column ) : bool
IsColumnRelatedToTypeTable ( Column column, string &roleName ) : bool

Given a column in this table, determines if there is a relation to a type table based on it

IsInheritedFrom ( Table table ) : bool

Determines if the specified table is an ancestor of the this table object

PropertyExistsInBase ( string columnName ) : bool
ResetId ( int newId ) : void
ShareAncestor ( Table table ) : bool

Determines if this table shares a common ancestor with the specified table

Table ( INHydrateModelObject root ) : System
ToDatabaseCodeIdentifier ( ) : string

Create a valid T-SQL variable from the name

ToDatabaseIdentifier ( ) : string
ToString ( ) : string
XmlAppend ( XmlNode node ) : void
XmlLoad ( XmlNode node ) : void

Protected Methods

Method Description
CreateDataTable ( ) : System.Data.DataTable

Private Methods

Method Description
DoesBaseAllowTableAudit ( ) : bool
GetAbsoluteBaseTable ( ) : Table
GetBasePKColumn ( Column column ) : Column
GetBasePKColumnList ( ) : IEnumerable
PostLoad ( ) : void

Method Details

CanInherit() public method

Determines if the specified table can be a parent of this table
public CanInherit ( Table parentTable ) : bool
parentTable Table
return bool

CreateDataTable() protected method

protected CreateDataTable ( ) : System.Data.DataTable
return System.Data.DataTable

CreateRef() public method

public CreateRef ( ) : Reference
return Reference

CreateRef() public method

public CreateRef ( string key ) : Reference
key string
return Reference

FullHierarchyPrimaryKeyIsDatabaseIdentity() public method

public FullHierarchyPrimaryKeyIsDatabaseIdentity ( ) : bool
return bool

GetChildRoleRelationsFullHierarchy() public method

Get all relations where this table or any derived table is the child
public GetChildRoleRelationsFullHierarchy ( ) : IEnumerable
return IEnumerable

GetCodeFacade() public method

public GetCodeFacade ( ) : string
return string

GetColumnInRelationships() public method

public GetColumnInRelationships ( ) : ColumnCollection
return ColumnCollection

GetColumnNotInRelationships() public method

public GetColumnNotInRelationships ( ) : IEnumerable
return IEnumerable

GetColumns() public method

Returns the columns for this table only (not hierarchy)
public GetColumns ( ) : IEnumerable
return IEnumerable

GetColumnsByType() public method

public GetColumnsByType ( System type ) : IEnumerable
type System
return IEnumerable

GetColumnsFullHierarchy() public method

This gets all columns from this and all base classes
public GetColumnsFullHierarchy ( ) : ColumnCollection
return ColumnCollection

GetColumnsFullHierarchy() public method

This gets all columns from this and all base classes
public GetColumnsFullHierarchy ( bool includeCurrent ) : ColumnCollection
includeCurrent bool
return ColumnCollection

GetColumnsNotInBase() public method

This gets all columns in this class NOT in a base class
public GetColumnsNotInBase ( ) : ColumnCollection
return ColumnCollection

GetForeignKeyColumns() public method

public GetForeignKeyColumns ( ) : IEnumerable
return IEnumerable

GetFullHierarchyTableJoin() public method

public GetFullHierarchyTableJoin ( ) : string
return string

GetFullHierarchyTableJoin() public method

public GetFullHierarchyTableJoin ( bool useLinqAlias ) : string
useLinqAlias bool
return string

GetParentRoleRelationsFullHierarchy() public method

Get all relations where this table or any derived table is the parent
public GetParentRoleRelationsFullHierarchy ( ) : IEnumerable
return IEnumerable

GetParentTables() public method

public GetParentTables ( ) : IEnumerable
return IEnumerable

GetRelatedTypeTableByColumn() public method

public GetRelatedTypeTableByColumn ( Column column, bool fullHierarchy, string &roleName ) : Table
column Column
fullHierarchy bool
roleName string
return Table

GetRelatedTypeTableByColumn() public method

public GetRelatedTypeTableByColumn ( Column column, string &roleName ) : Table
column Column
roleName string
return Table

GetRelations() public method

Returns a list of generated relations for this table
public GetRelations ( ) : RelationCollection
return RelationCollection

GetRelationsFullHierarchy() public method

public GetRelationsFullHierarchy ( ) : IEnumerable
return IEnumerable

GetRelationsWhereChild() public method

Returns generated relations for this table
public GetRelationsWhereChild ( bool fullHierarchy = false ) : IEnumerable
fullHierarchy bool
return IEnumerable

GetSQLSchema() public method

public GetSQLSchema ( ) : string
return string

GetTableComponentsFullHierarchy() public method

This gets all table components from this and all base classes
public GetTableComponentsFullHierarchy ( bool includeCurrent ) : IEnumerable
includeCurrent bool
return IEnumerable

GetTableCompositesFullHierarchy() public method

This gets all table composites from this and all base classes
public GetTableCompositesFullHierarchy ( bool includeCurrent ) : IEnumerable
includeCurrent bool
return IEnumerable

GetTableHierarchy() public method

Get the full hierarchy of tables starting with this table and working back to the most base table
public GetTableHierarchy ( ) : IEnumerable
return IEnumerable

GetTablesInheritedFromHierarchy() public method

Get all the tables that are descendants of this table
public GetTablesInheritedFromHierarchy ( ) : IEnumerable
return IEnumerable

GetViewRelations() public method

Returns a list of generated relations for this table to views
public GetViewRelations ( ) : ViewRelationCollection
return ViewRelationCollection

IsColumnInherited() public method

public IsColumnInherited ( Column column ) : bool
column Column
return bool

IsColumnRelatedToTypeTable() public method

Given a column in this table, determines if there is a relation to a type table based on it
public IsColumnRelatedToTypeTable ( Column column, string &roleName ) : bool
column Column
roleName string
return bool

IsInheritedFrom() public method

Determines if the specified table is an ancestor of the this table object
public IsInheritedFrom ( Table table ) : bool
table Table
return bool

PropertyExistsInBase() public method

public PropertyExistsInBase ( string columnName ) : bool
columnName string
return bool

ResetId() public method

public ResetId ( int newId ) : void
newId int
return void

ShareAncestor() public method

Determines if this table shares a common ancestor with the specified table
public ShareAncestor ( Table table ) : bool
table Table
return bool

Table() public method

public Table ( INHydrateModelObject root ) : System
root INHydrateModelObject
return System

ToDatabaseCodeIdentifier() public method

Create a valid T-SQL variable from the name
public ToDatabaseCodeIdentifier ( ) : string
return string

ToDatabaseIdentifier() public method

public ToDatabaseIdentifier ( ) : string
return string

ToString() public method

public ToString ( ) : string
return string

XmlAppend() public method

public XmlAppend ( XmlNode node ) : void
node XmlNode
return void

XmlLoad() public method

public XmlLoad ( XmlNode node ) : void
node XmlNode
return void

Property Details

_allowTimestamp protected_oe property

protected bool _allowTimestamp
return bool

_associativeTable protected_oe property

protected bool _associativeTable
return bool

_codeFacade protected_oe property

protected string _codeFacade
return string

_columns protected_oe property

protected ReferenceCollection _columns
return ReferenceCollection

_createAudit protected_oe property

protected bool _createAudit
return bool

_createMetaData protected_oe property

protected bool _createMetaData
return bool

_customRetrieveRules protected_oe property

protected ReferenceCollection _customRetrieveRules
return ReferenceCollection

_description protected_oe property

protected string _description
return string

_fullIndexSearch protected_oe property

protected bool _fullIndexSearch
return bool

_generated protected_oe property

protected bool _generated
return bool

_hasHistory protected_oe property

protected bool _hasHistory
return bool

_id protected_oe property

protected int _id
return int

_isTypeTable protected_oe property

protected TypedTableConstants _isTypeTable
return TypedTableConstants

_modifiedAudit protected_oe property

protected bool _modifiedAudit
return bool

_name protected_oe property

protected string _name
return string

_relationships protected_oe property

protected ReferenceCollection _relationships
return ReferenceCollection

_staticData protected_oe property

protected RowEntryCollection _staticData
return RowEntryCollection

_tableIndexList protected_oe property

protected List _tableIndexList
return List

_viewRelationships protected_oe property

protected ReferenceCollection _viewRelationships
return ReferenceCollection