DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
RootTable.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System;
18 
19 namespace Deveel.Data.Sql.Tables {
20  public abstract class RootTable : Table, IRootTable {
21  public ObjectName TableName {
22  get { return TableInfo.TableName; }
23  }
24 
25  protected virtual bool IsSameTable(RootTable other) {
26  return (TableName.Equals(other.TableName));
27  }
28 
29  public bool TypeEquals(IRootTable other) {
30  if (other is RootTable) {
31  return IsSameTable((RootTable) other);
32  }
33 
34  return this == other;
35  }
36  }
37 }
bool TypeEquals(IRootTable other)
Definition: RootTable.cs:29
Describes the name of an object within a database.
Definition: ObjectName.cs:44
virtual bool IsSameTable(RootTable other)
Definition: RootTable.cs:25
ObjectName TableName
Gets the fully qualified name of the table that is ensured to be unique within the system...
Definition: TableInfo.cs:97
Defines the metadata properties of a table existing within a database.
Definition: TableInfo.cs:41
Interface that is implemented by all root tables.
Definition: IRootTable.cs:33