Namespaces

Types

Type Table

Namespace NHibernate.Mapping

Interfaces IRelationalModel

Methods

Properties

Public instance methods

void AddCheckConstraint(string constraint)

Parameters
string constraint

void AddColumn(Column column)

Adds the Column to the ICollection of Columns that are part of the Table.
Parameters
Column column The Column to include in the Table.

ForeignKey CreateForeignKey(string keyName, IList columns, Type referencedClass)

Create a ForeignKey for the columns in the Table.
This does not necessarily create a ForeignKey , if one already exists for the columns then it will return an existing ForeignKey .
Parameters
return ForeignKey A ForeignKey for the columns in the Table.
string keyName
IList columns An IList of Column objects.
Type referencedClass

bool Equals(object obj)

Parameters
return bool
object obj

Column GetColumn(int n)

Gets the Column at the specified index.
Parameters
return Column The Column at the specified index.
int n The index of the Column to get.

int GetHashCode()

Parameters
return int

Index GetIndex(string name)

Gets the Index identified by the name.
Parameters
return Index The Index identified by the name. If the Index identified by the name does not exist then it is created.
string name The name of the Index to get.

string GetQualifiedName(Dialect dialect)

Gets the schema qualified name of the Table.
Parameters
return string The name of the table qualified with the schema if one is specified.
Dialect dialect The Dialect that knows how to Quote the Table name.

string GetQualifiedName(Dialect dialect, string defaultQualifier)

Gets the schema qualified name of the Table using the specified qualifier
If this were used with MSSQL it would return a dbo.table_name.
Parameters
return string A String representing the Qualified name.
Dialect dialect The Dialect that knows how to Quote the Table name.
string defaultQualifier The Qualifier to use when accessing the table.

string GetQuotedName(Dialect dialect)

Gets the name of this Table in quoted form if it is necessary.
Parameters
return string The Table name in a form that is safe to use inside of a SQL statement. Quoted if it needs to be, not quoted if it does not need to be.
Dialect dialect The Dialect that knows how to quote the Table name.

Type GetType()

Parameters
return Type

UniqueKey GetUniqueKey(string name)

Gets the UniqueKey identified by the name.
Parameters
return UniqueKey The UniqueKey identified by the name. If the UniqueKey identified by the name does not exist then it is created.
string name The name of the UniqueKey to get.

void SetIdentifierValue(SimpleValue idValue)

Sets the Identifier of the Table.
Parameters
SimpleValue idValue The SimpleValue that represents the Identifier.

IList SqlAlterStrings(Dialect dialect, IMapping p, DataTable tableInfo)

Parameters
return IList
Dialect dialect
IMapping p
DataTable tableInfo

string SqlCreateString(Dialect dialect, IMapping p, string defaultSchema)

Generates the SQL string to create this Table in the database.
Parameters
return string A string that contains the SQL to create this Table, Primary Key Constraints , and Unique Key Constraints.
Dialect dialect The Dialect to use for SQL rules.
IMapping p
string defaultSchema

string SqlDropString(Dialect dialect, string defaultSchema)

Generates the SQL string to drop this Table in the database.
Parameters
return string A string that contains the SQL to drop this Table and to cascade the drop to the constraints if the database supports it.
Dialect dialect The Dialect to use for SQL rules.
string defaultSchema

string ToString()

Parameters
return string

string UniqueColumnString(ICollection col)

Generates a unique string for an ICollection of Column objects.
Parameters
return string An unique string for the Column objects.
ICollection col An ICollection of Column objects.

Public properties

ICollection ColumnCollection get;

Gets an ICollection of Column objects that are part of the Table.
return ICollection

int ColumnSpan get;

Gets the number of columns that this Table contains.
return int

ICollection ForeignKeyCollection get;

Gets an ICollection of ForeignKey objects that are part of the Table.
return ICollection

ICollection IndexCollection get;

Gets an ICollection of Index objects that are part of the Table.
return ICollection

bool IsQuoted get; set;

Gets or sets if the column needs to be quoted in SQL statements.
return bool

string Name get; set;

Gets or sets the name of the Table in the database.
return string

PrimaryKey PrimaryKey get; set;

Gets or sets the PrimaryKey of the Table.
return PrimaryKey

string Schema get; set;

Gets or sets the schema the table is in.
return string

int UniqueInteger get;

Gets the unique number of the Table.
return int

ICollection UniqueKeyCollection get;

Gets an ICollection of UniqueKey objects that are part of the Table.
return ICollection