Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Experiments / Attic / Generator / Castle.ActiveRecord.Generator.Components / Database / ColumnDefinition.cs
blobdaa3dc0a8b3b46b7914aa0cc4b37ad271a158463
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.ActiveRecord.Generator.Components.Database
17 using System;
18 using System.Data.OleDb;
21 [Serializable]
22 public class ColumnDefinition
24 private String _name;
25 private bool _primaryKey;
26 private bool _foreignKey;
27 private bool _unique;
28 private bool _nullable;
29 private TableDefinition _relatedTable;
30 private OleDbType _type = OleDbType.Empty;
32 public ColumnDefinition( String name )
34 _name = name;
37 public ColumnDefinition(String name, bool primaryKey,
38 bool foreignKey, bool unique, bool nullable, OleDbType type)
40 _name = name;
41 _primaryKey = primaryKey;
42 _foreignKey = foreignKey;
43 _unique = unique;
44 _nullable = nullable;
45 _type = type;
48 public ColumnDefinition(String name, bool primaryKey,
49 bool foreignKey, bool unique, bool nullable, OleDbType type,
50 TableDefinition relatedTable) : this(name, primaryKey, foreignKey, unique, nullable, type)
52 _relatedTable = relatedTable;
55 public String Name
57 get { return _name; }
60 public bool PrimaryKey
62 get { return _primaryKey; }
63 set { _primaryKey = value; }
66 public bool ForeignKey
68 get { return _foreignKey; }
69 set { _foreignKey = value; }
72 public bool Unique
74 get { return _unique; }
75 set { _unique = value; }
78 public TableDefinition RelatedTable
80 get { return _relatedTable; }
81 set { _relatedTable = value; }
84 public bool Nullable
86 get { return _nullable; }
87 set { _nullable = value; }
90 public OleDbType Type
92 get { return _type; }
93 set { _type = value; }