• R/O
  • SSH
  • HTTPS

ea2ddl: コミット


コミットメタ情報

リビジョン134 (tree)
日時2011-09-20 10:54:54
作者taktos9

ログメッセージ

ColumnModelの実装

変更サマリ

差分

--- trunk/ea2ddl.net/ea2ddl.net/Model/ColumnModel.cs (nonexistent)
+++ trunk/ea2ddl.net/ea2ddl.net/Model/ColumnModel.cs (revision 134)
@@ -0,0 +1,49 @@
1+/*
2+ * Created by SharpDevelop.
3+ * User: takiguchi
4+ * Date: 2011/09/20
5+ * Time: 9:37
6+ *
7+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
8+ */
9+using System;
10+using System.Collections.Generic;
11+using EA;
12+
13+namespace ea2ddl.net.Model
14+{
15+ /// <summary>
16+ /// カラムモデル。
17+ /// </summary>
18+ public class ColumnModel
19+ {
20+ public string Name {get; private set;}
21+ public string Alias {get; private set;}
22+ public string Note {get; private set;}
23+ public string Type {get; private set;}
24+ public int? Precision {get; private set;}
25+ public int? Scale {get; private set;}
26+ public bool Nullable {get; private set;}
27+ /// <summary>
28+ /// ベンダー拡張の定義。
29+ /// </summary>
30+ public Dictionary<string, string> VendorExt {get; private set;}
31+
32+ public ColumnModel() {
33+ }
34+
35+ public ColumnModel(EA.Attribute columnDef, Dictionary<string, string> domainDictionary) {
36+ Name = columnDef.Name;
37+ Alias = columnDef.Style;
38+ Note = columnDef.Notes;
39+ Nullable = !columnDef.AllowDuplicates;
40+ VendorExt = new Dictionary<string, string>();
41+ }
42+
43+ private void InitializeVendorExt(EA.Attribute columnDef) {
44+ foreach (TaggedValue tag in columnDef.TaggedValuesEx) {
45+ VendorExt.Add(tag.Name, tag.Value);
46+ }
47+ }
48+ }
49+}
旧リポジトリブラウザで表示