C# Class nHydrate.Generator.Models.ColumnBase

This is the base for all column classes
Inheritance: nHydrate.Generator.Common.GeneratorFramework.BaseModelObject
显示文件 Open project: nHydrate/nHydrate Class Usage Examples

Protected Properties

Property Type Description
_allowNull bool
_category string
_dataType System.Data.SqlDbType
_description string
_generated bool
_id int
_isBrowsable bool
_length int
_name string
_prompt string
_scale int
_uIDataType System.ComponentModel.DataAnnotations.DataType

Private Properties

Property Type Description
GetAnnotationStringLength int
GetDefaultSize int
GetLengthString string
IsMaxLength bool

Public Methods

Method Description
ColumnBase ( INHydrateModelObject root ) : System
CreateRef ( ) : Reference
CreateRef ( string key ) : Reference
GetCodeType ( ) : string
GetCodeType ( bool allowNullable ) : string
GetCodeType ( bool allowNullable, bool forceNull ) : string
GetCommentLengthString ( ) : string

Gets a string reprsenting the data length for comments

This is not to be used for actual C# code or SQL

GetDataReaderMethodName ( ) : string

Gets the method of a datareader that corresponds to this specified datatype

GetPredefinedScale ( System dataType ) : int
GetPredefinedSize ( System dataType ) : int
GetSQLDefaultType ( ) : string

Gets the SQL Server type mapping for this data type

GetSQLDefaultType ( bool isRaw ) : string

Gets the SQL Server type mapping for this data type

IsSupportedType ( System type, SQLServerTypeConstants sqlVersion ) : bool

Determine if the specified type is

ResetId ( int id ) : void
SupportsLikeOperator ( ) : bool

Determines if this column can be used in a LIKE database operation

ToDatabaseCodeIdentifier ( ) : string

Create a valid T-SQL variable from the name

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

Protected Methods

Method Description
SetKey ( string key ) : void

Private Methods

Method Description
GetAnnotationStringLength ( ) : int
GetDefaultSize ( System dataType ) : int
GetLengthString ( ) : string
IsMaxLength ( ) : bool

Method Details

ColumnBase() public method

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

CreateRef() public abstract method

public abstract CreateRef ( ) : Reference
return Reference

CreateRef() public abstract method

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

GetCodeType() public method

public GetCodeType ( ) : string
return string

GetCodeType() public method

public GetCodeType ( bool allowNullable ) : string
allowNullable bool
return string

GetCodeType() public method

public GetCodeType ( bool allowNullable, bool forceNull ) : string
allowNullable bool
forceNull bool
return string

GetCommentLengthString() public method

Gets a string reprsenting the data length for comments
This is not to be used for actual C# code or SQL
public GetCommentLengthString ( ) : string
return string

GetDataReaderMethodName() public method

Gets the method of a datareader that corresponds to this specified datatype
public GetDataReaderMethodName ( ) : string
return string

GetPredefinedScale() public static method

public static GetPredefinedScale ( System dataType ) : int
dataType System
return int

GetPredefinedSize() public static method

public static GetPredefinedSize ( System dataType ) : int
dataType System
return int

GetSQLDefaultType() public method

Gets the SQL Server type mapping for this data type
public GetSQLDefaultType ( ) : string
return string

GetSQLDefaultType() public method

Gets the SQL Server type mapping for this data type
public GetSQLDefaultType ( bool isRaw ) : string
isRaw bool Determines if the square brackets '[]' are around the type
return string

IsSupportedType() public static method

Determine if the specified type is
public static IsSupportedType ( System type, SQLServerTypeConstants sqlVersion ) : bool
type System
sqlVersion SQLServerTypeConstants
return bool

ResetId() public method

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

SetKey() protected method

protected SetKey ( string key ) : void
key string
return void

SupportsLikeOperator() public method

Determines if this column can be used in a LIKE database operation
public SupportsLikeOperator ( ) : bool
return bool

ToDatabaseCodeIdentifier() public method

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

ToString() public method

public ToString ( ) : string
return string

XmlAppend() public abstract method

public abstract XmlAppend ( XmlNode node ) : void
node System.Xml.XmlNode
return void

XmlLoad() public abstract method

public abstract XmlLoad ( XmlNode node ) : void
node System.Xml.XmlNode
return void

Property Details

_allowNull protected_oe property

protected bool _allowNull
return bool

_category protected_oe property

protected string _category
return string

_dataType protected_oe property

protected System.Data.SqlDbType _dataType
return System.Data.SqlDbType

_description protected_oe property

protected string _description
return string

_generated protected_oe property

protected bool _generated
return bool

_id protected_oe property

protected int _id
return int

_isBrowsable protected_oe property

protected bool _isBrowsable
return bool

_length protected_oe property

protected int _length
return int

_name protected_oe property

protected string _name
return string

_prompt protected_oe property

protected string _prompt
return string

_scale protected_oe property

protected int _scale
return int

_uIDataType protected_oe property

protected System.ComponentModel.DataAnnotations.DataType _uIDataType
return System.ComponentModel.DataAnnotations.DataType