teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

ソース全部となると膨大な量になってしまうので、関連すると思われる部分を追記しました。

2019/02/22 03:21

投稿

oraora
oraora

スコア10

title CHANGED
File without changes
body CHANGED
@@ -19,6 +19,125 @@
19
19
  var selectHogeFlow = (BaseHogeSelectFlow)Seasar.Framework.Container.Factory.
20
20
  SingletonS2ContainerFactory.Container.GetComponent(typeof(BaseHogeSelectFlow));
21
21
 
22
+ namespace Hoge.BusinessLogic
23
+ {
24
+ /// <summary>
25
+ /// HogeDB検索フロー.
26
+ /// </summary>
27
+ internal class HogeDbSelectFlow : BaseHogeSelectFlow
28
+ {
29
+ /// <summary>
30
+ /// コンストラクタ.
31
+ /// </summary>
32
+ public HogeDbSelectFlow() : base()
33
+ {
34
+ }
35
+
36
+ /// <summary>
37
+ /// 検索.
38
+ /// </summary>
39
+ /// <param name="HogeType">Hoge種別</param>
40
+ public override void Select(string HogeType)
41
+ {
42
+ var dbAccessor = new DbAccessor();
43
+
44
+ // Hoge情報の取得DAO.
45
+ var selHogeDao = new SelectHogeDao();
46
+ selHogeDao.HogeType = HogeType;
47
+ dbAccessor.AddDao(selHogeDao);
48
+
49
+ // DBアクセス実行.
50
+ dbAccessor.Execute();
51
+
52
+ // 一度クリアする.
53
+ dbAccessor.ClearDao();
54
+
55
+ // 問題情報の取得DAO.
56
+ var selQDao = new SelectQDao();
57
+ selQDao.HogeId = selHogeDao.Hoge.HogeId;
58
+ dbAccessor.AddDao(selQDao);
59
+
60
+ // 解答方式の取得DAO.
61
+ var selAMDao = new SelectAMDao();
62
+ selAMDao.HogeId = selHogeDao.Hoge.HogeId;
63
+ dbAccessor.AddDao(selAMDao);
64
+
65
+ // DBアクセス実行.
66
+ dbAccessor.Execute();
67
+
68
+ Hoge = selHogeDao.Hoge;
69
+ QList = selQDao.QList;
70
+ AMList = selAMDao.AMList;
71
+ }
72
+ }
73
+ }
74
+
75
+ namespace Hoge.BusinessLogic
76
+ {
77
+ /// <summary>
78
+ /// 問題検索フロー基底.
79
+ /// </summary>
80
+ internal abstract class BaseHogeSelectFlow
81
+ {
82
+ /// <summary>
83
+ /// 問題情報.
84
+ /// </summary>
85
+ public Hoge Hoge { get; set; }
86
+
87
+ /// <summary>
88
+ /// 問題リスト.
89
+ /// </summary>
90
+ public List<Q> QList { get; set; }
91
+
92
+ /// <summary>
93
+ /// 解答方式リスト.
94
+ /// </summary>
95
+ public List<AM> AMList { get; set; }
96
+
97
+ /// <summary>
98
+ /// コンストラクタ.
99
+ /// </summary>
100
+ public BaseHogeSelectFlow()
101
+ {
102
+ QList = new List<Q>();
103
+ AMList = new List<AM>();
104
+ }
105
+
106
+ /// <summary>
107
+ /// 検索.
108
+ /// </summary>
109
+ /// <param name="HogeType">問題種別.</param>
110
+ public abstract void Select(string HogeType);
111
+ }
112
+ }
113
+
114
+ <?xml version="1.0" encoding="utf-8" ?>
115
+
116
+ 【app.dicon】 --------------------------------
117
+
118
+ <components>
119
+
120
+ <!-- ************************************************************
121
+ Hoge.BusinessLogic.SurveyManager内で取得するコンポーネント.
122
+ ************************************************************ -->
123
+
124
+ <!-- 各質問情報の一括取得DAO -->
125
+ <component instance="prototype" class="Hoge.BusinessLogic.HogeDbSelectFlow"/>
126
+ <!-- 各質問情報を模擬データから取得 -->
127
+ <!-- <component instance="prototype" class="Hoge.BusinessLogic.HogeFileSelectFlow"/> -->
128
+
129
+
130
+ <!-- ************************************************************
131
+ Hoge.HogeUI.Util.ARRProxy内で取得する
132
+ コンポーネント.
133
+ ************************************************************ -->
134
+ <!-- 解答結果DB登録フロー -->
135
+ <component instance="prototype" class="Hoge.BusinessLogic.ARDbRFlow"/>
136
+ <!-- 解答結果ファイル登録フロー -->
137
+ <!-- <component instance="prototype" class="Hoge.BusinessLogic.ARFileRFlow"/> -->
138
+
139
+ </components>
140
+
22
141
  ```
23
142
 
24
143
  ### 試したこと