• R/O
  • SSH
  • HTTPS

terasoluna: Commit


Commit MetaInfo

Revision11 (tree)
Zeit2007-11-29 21:11:43
Autorterasoluna

Log Message

terasoluna-dao 新規インポート

Ändern Zusammenfassung

Diff

--- trunk/terasoluna-dao/LICENSE.txt (nonexistent)
+++ trunk/terasoluna-dao/LICENSE.txt (revision 11)
@@ -0,0 +1,188 @@
1+ Apache License
2+ Version 2.0, January 2004
3+ http://www.apache.org/licenses/
4+
5+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+ 1. Definitions.
8+
9+ "License" shall mean the terms and conditions for use, reproduction,
10+ and distribution as defined by Sections 1 through 9 of this document.
11+
12+ "Licensor" shall mean the copyright owner or entity authorized by
13+ the copyright owner that is granting the License.
14+
15+ "Legal Entity" shall mean the union of the acting entity and all
16+ other entities that control, are controlled by, or are under common
17+ control with that entity. For the purposes of this definition,
18+ "control" means (i) the power, direct or indirect, to cause the
19+ direction or management of such entity, whether by contract or
20+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21+ outstanding shares, or (iii) beneficial ownership of such entity.
22+
23+ "You" (or "Your") shall mean an individual or Legal Entity
24+ exercising permissions granted by this License.
25+
26+ "Source" form shall mean the preferred form for making modifications,
27+ including but not limited to software source code, documentation
28+ source, and configuration files.
29+
30+ "Object" form shall mean any form resulting from mechanical
31+ transformation or translation of a Source form, including but
32+ not limited to compiled object code, generated documentation,
33+ and conversions to other media types.
34+
35+ "Work" shall mean the work of authorship, whether in Source or
36+ Object form, made available under the License, as indicated by a
37+ copyright notice that is included in or attached to the work
38+ (an example is provided in the Appendix below).
39+
40+ "Derivative Works" shall mean any work, whether in Source or Object
41+ form, that is based on (or derived from) the Work and for which the
42+ editorial revisions, annotations, elaborations, or other modifications
43+ represent, as a whole, an original work of authorship. For the purposes
44+ of this License, Derivative Works shall not include works that remain
45+ separable from, or merely link (or bind by name) to the interfaces of,
46+ the Work and Derivative Works thereof.
47+
48+ "Contribution" shall mean any work of authorship, including
49+ the original version of the Work and any modifications or additions
50+ to that Work or Derivative Works thereof, that is intentionally
51+ submitted to Licensor for inclusion in the Work by the copyright owner
52+ or by an individual or Legal Entity authorized to submit on behalf of
53+ the copyright owner. For the purposes of this definition, "submitted"
54+ means any form of electronic, verbal, or written communication sent
55+ to the Licensor or its representatives, including but not limited to
56+ communication on electronic mailing lists, source code control systems,
57+ and issue tracking systems that are managed by, or on behalf of, the
58+ Licensor for the purpose of discussing and improving the Work, but
59+ excluding communication that is conspicuously marked or otherwise
60+ designated in writing by the copyright owner as "Not a Contribution."
61+
62+ "Contributor" shall mean Licensor and any individual or Legal Entity
63+ on behalf of whom a Contribution has been received by Licensor and
64+ subsequently incorporated within the Work.
65+
66+ 2. Grant of Copyright License. Subject to the terms and conditions of
67+ this License, each Contributor hereby grants to You a perpetual,
68+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69+ copyright license to reproduce, prepare Derivative Works of,
70+ publicly display, publicly perform, sublicense, and distribute the
71+ Work and such Derivative Works in Source or Object form.
72+
73+ 3. Grant of Patent License. Subject to the terms and conditions of
74+ this License, each Contributor hereby grants to You a perpetual,
75+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76+ (except as stated in this section) patent license to make, have made,
77+ use, offer to sell, sell, import, and otherwise transfer the Work,
78+ where such license applies only to those patent claims licensable
79+ by such Contributor that are necessarily infringed by their
80+ Contribution(s) alone or by combination of their Contribution(s)
81+ with the Work to which such Contribution(s) was submitted. If You
82+ institute patent litigation against any entity (including a
83+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84+ or a Contribution incorporated within the Work constitutes direct
85+ or contributory patent infringement, then any patent licenses
86+ granted to You under this License for that Work shall terminate
87+ as of the date such litigation is filed.
88+
89+ 4. Redistribution. You may reproduce and distribute copies of the
90+ Work or Derivative Works thereof in any medium, with or without
91+ modifications, and in Source or Object form, provided that You
92+ meet the following conditions:
93+
94+ (a) You must give any other recipients of the Work or
95+ Derivative Works a copy of this License; and
96+
97+ (b) You must cause any modified files to carry prominent notices
98+ stating that You changed the files; and
99+
100+ (c) You must retain, in the Source form of any Derivative Works
101+ that You distribute, all copyright, patent, trademark, and
102+ attribution notices from the Source form of the Work,
103+ excluding those notices that do not pertain to any part of
104+ the Derivative Works; and
105+
106+ (d) If the Work includes a "NOTICE" text file as part of its
107+ distribution, then any Derivative Works that You distribute must
108+ include a readable copy of the attribution notices contained
109+ within such NOTICE file, excluding those notices that do not
110+ pertain to any part of the Derivative Works, in at least one
111+ of the following places: within a NOTICE text file distributed
112+ as part of the Derivative Works; within the Source form or
113+ documentation, if provided along with the Derivative Works; or,
114+ within a display generated by the Derivative Works, if and
115+ wherever such third-party notices normally appear. The contents
116+ of the NOTICE file are for informational purposes only and
117+ do not modify the License. You may add Your own attribution
118+ notices within Derivative Works that You distribute, alongside
119+ or as an addendum to the NOTICE text from the Work, provided
120+ that such additional attribution notices cannot be construed
121+ as modifying the License.
122+
123+ You may add Your own copyright statement to Your modifications and
124+ may provide additional or different license terms and conditions
125+ for use, reproduction, or distribution of Your modifications, or
126+ for any such Derivative Works as a whole, provided Your use,
127+ reproduction, and distribution of the Work otherwise complies with
128+ the conditions stated in this License.
129+
130+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131+ any Contribution intentionally submitted for inclusion in the Work
132+ by You to the Licensor shall be under the terms and conditions of
133+ this License, without any additional terms or conditions.
134+ Notwithstanding the above, nothing herein shall supersede or modify
135+ the terms of any separate license agreement you may have executed
136+ with Licensor regarding such Contributions.
137+
138+ 6. Trademarks. This License does not grant permission to use the trade
139+ names, trademarks, service marks, or product names of the Licensor,
140+ except as required for reasonable and customary use in describing the
141+ origin of the Work and reproducing the content of the NOTICE file.
142+
143+ 7. Disclaimer of Warranty. Unless required by applicable law or
144+ agreed to in writing, Licensor provides the Work (and each
145+ Contributor provides its Contributions) on an "AS IS" BASIS,
146+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147+ implied, including, without limitation, any warranties or conditions
148+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149+ PARTICULAR PURPOSE. You are solely responsible for determining the
150+ appropriateness of using or redistributing the Work and assume any
151+ risks associated with Your exercise of permissions under this License.
152+
153+ 8. Limitation of Liability. In no event and under no legal theory,
154+ whether in tort (including negligence), contract, or otherwise,
155+ unless required by applicable law (such as deliberate and grossly
156+ negligent acts) or agreed to in writing, shall any Contributor be
157+ liable to You for damages, including any direct, indirect, special,
158+ incidental, or consequential damages of any character arising as a
159+ result of this License or out of the use or inability to use the
160+ Work (including but not limited to damages for loss of goodwill,
161+ work stoppage, computer failure or malfunction, or any and all
162+ other commercial damages or losses), even if such Contributor
163+ has been advised of the possibility of such damages.
164+
165+ 9. Accepting Warranty or Additional Liability. While redistributing
166+ the Work or Derivative Works thereof, You may choose to offer,
167+ and charge a fee for, acceptance of support, warranty, indemnity,
168+ or other liability obligations and/or rights consistent with this
169+ License. However, in accepting such obligations, You may act only
170+ on Your own behalf and on Your sole responsibility, not on behalf
171+ of any other Contributor, and only if You agree to indemnify,
172+ defend, and hold each Contributor harmless for any liability
173+ incurred by, or claims asserted against, such Contributor by reason
174+ of your accepting any such warranty or additional liability.
175+
176+
177+
178+
179+
180+
181+
182+
183+
184+ANTLR 2 License
185+
186+We reserve no legal rights to the ANTLR--it is fully in the public domain. An individual or company may do whatever they wish with source code distributed with ANTLR or the code generated by ANTLR, including the incorporation of ANTLR, or its output, into commerical software.
187+
188+We encourage users to develop software with ANTLR. However, we do ask that credit is given to us for developing ANTLR. By "credit", we mean that if you use ANTLR or incorporate any source code into one of your programs (commercial product, research project, or otherwise) that you acknowledge this fact somewhere in the documentation, research report, etc... If you like ANTLR and have developed a nice tool with the output, please mention that you developed it using ANTLR. In addition, we ask that the headers remain intact in our source code. As long as these guidelines are kept, we expect to continue enhancing this system and expect to make other tools available as they are completed.
\ No newline at end of file
--- trunk/terasoluna-dao/ant/jensitybuild.xml (nonexistent)
+++ trunk/terasoluna-dao/ant/jensitybuild.xml (revision 11)
@@ -0,0 +1,102 @@
1+<?xml version="1.0" encoding="Shift_JIS"?>
2+
3+<!-- 試験密度測定を行なうビルドファイル。 -->
4+
5+<project name="" basedir=".." default="count">
6+
7+ <target name="usage">
8+ <echo message=""/>
9+ <echo message="試験密度測定を行なうビルドファイル。"/>
10+ <echo message="----------------------------------------------------------"/>
11+ <echo message="【環境設定】"/>
12+ <echo message="ツール「jensity」を使用する。"/>
13+ <echo message="試験密度の測定にはテスト対象クラスのソースコード(.javaと.class)、"/>
14+ <echo message="テストクラス(.class)が必要。"/>
15+ <echo message="また、実行環境のパスにjensity.jar、bcel-5.2.jar、stepcounter.jar、"/>
16+ <echo message="jensity-style.xslが必要となる。"/>
17+ <echo message="----------------------------------------------------------"/>
18+ <echo message="【実行可能なタスク】"/>
19+ <echo message="count --> 試験密度測定の実行"/>
20+ <echo message="・出力されるファイル:${test.root}/dentityReports/result.html"/>
21+ <echo message=""/>
22+ </target>
23+
24+ <!-- ●●●●● 環境設定 ■■■■■■■■■■■■■■■■■■■■■■■■ -->
25+ <!-- buildディレクトリ -->
26+ <property name="build.dir" value="${basedir}/ant" />
27+
28+ <!-- ●●●●● プロパティファイル設定 ■■■■■■■■■■■■■■■■■ -->
29+ <property file="${build.dir}/jensitybuild.properties" />
30+
31+ <!-- ●●●●● クラスパスの設定 ■■■■■■■■■■■■■■■■■■■■ -->
32+ <!-- □${jensity.lib}のディレクトリにjensity.jar、bcel-5.2.jar、stepcounter.jar、-->
33+ <!-- jensity-style.xslを指定する必要があります -->
34+ <property name="jensity.classpath"
35+ value="${jensity.lib}/jensity.jar;
36+ ${jensity.lib}/bcel-5.2.jar;
37+ ${jensity.lib}/stepcounter.jar;" />
38+
39+
40+ <!-- ●●●●● 試験密度測定用プロパティ ■■■■■■■■■■■■■■■■ -->
41+ <!-- 中間XMLファイルの出力先 -->
42+ <property name="density.report.xml.dir" value="${result.dir}/xml" />
43+
44+ <!-- テストクラスのサフィックス -->
45+ <property name="density.test.suffix" value="Test[0-9]*" />
46+ <property name="lower" value="65" /> <!-- 試験密度の許容下限値 -->
47+ <property name="upper" value="350" /> <!-- 試験密度の許容上限値 -->
48+
49+ <!-- ●●●●● jensityタスク ■■■■■■■■■■■■■■■■■■■■■ -->
50+ <taskdef name="density"
51+ classname="jp.co.nttdata.terasoluna.jensity.DensityTask"
52+ classpath="${jensity.classpath}}" />
53+
54+ <!-- ■■■■■ 試験密度測定 実行 ■■■■■ -->
55+ <target name="count">
56+ <!-- ファイル出力先ディレクトリ作成 -->
57+ <delete dir="${result.dir}" />
58+ <mkdir dir="${result.dir}" />
59+ <mkdir dir="${density.report.xml.dir}" />
60+
61+ <!-- ソースコード(クラスファイル)+テストコード(クラスファイル)をマージする -->
62+ <!-- (jensityではクラスファイルのディレクトリを1つしか指定できないため) -->
63+ <property name="temp.class.dir" value="${result.dir}/temp/classes" />
64+ <mkdir dir="${temp.class.dir}"/>
65+ <copy todir="${temp.class.dir}" preservelastmodified="true">
66+ <fileset dir="${class.dir}">
67+ <include name="**/*.class"/>
68+ </fileset>
69+ </copy>
70+ <copy todir="${temp.class.dir}" preservelastmodified="true">
71+ <fileset dir="${testclass.dir}">
72+ <include name="**/*.class"/>
73+ </fileset>
74+ </copy>
75+
76+ <!-- 試験密度測定(XMLレポート出力) -->
77+ <!-- classdir : クラスファイルの格納先(1つしか指定できません)
78+ destdir : 中間XMLレポートの出力
79+ testsuffix : テストクラスのサフィックス(省略した場合は"Test")
80+ fileset : 測定対象のソースファイル -->
81+ <density classdir="${temp.class.dir}"
82+ destdir="${density.report.xml.dir}"
83+ testsuffix="${density.test.suffix}" >
84+ <fileset dir="${src.dir}">
85+ <include name="jp/terasoluna/fw/**/*.java" />
86+ </fileset>
87+ </density>
88+
89+ <!-- XMLレポートからHTMLレポートへ変換 -->
90+ <style basedir="${density.report.xml.dir}" destdir="${result.dir}"
91+ extension=".html"
92+ style="${jensity.lib}/jensity-style.xsl">
93+ <param name="lower" expression="${lower}" />
94+ <param name="upper" expression="${upper}" />
95+ </style>
96+
97+ <!-- 作業用ファイル削除 -->
98+ <delete dir="${result.dir}/temp" />
99+ </target>
100+
101+ </project>
102+
\ No newline at end of file
--- trunk/terasoluna-dao/ant/build.xml (nonexistent)
+++ trunk/terasoluna-dao/ant/build.xml (revision 11)
@@ -0,0 +1,114 @@
1+<?xml version="1.0"?>
2+<!-- ======================================================================
3+ 2005/08/11 16:40:11
4+
5+ terasoluna-dao.jarを生成するビルドファイル。
6+ ====================================================================== -->
7+<project name="terasoluna-dao" default="jar" basedir="..">
8+ <property file="./ant/build.properties" />
9+ <property name="lib.dir" value="${terasoluna.lib.home}/lib"/>
10+ <property name="terasoluna.lib.dir" value="${terasoluna.lib.home}/dist"/>
11+ <tstamp/>
12+
13+ <!-- クラスパスの設定 -->
14+ <property name="classpath.lib"
15+ value="${lib.dir}/spring.jar;"/>
16+
17+ <!-- =================================
18+ ライブラリがあるかチェック
19+ ================================= -->
20+ <target name="checkDependencyProject">
21+ <available type="dir" file="${terasoluna.lib.home}/lib"
22+ property="terasoluna-lib.exist" />
23+ <fail unless="terasoluna-lib.exist"
24+ message="ビルドを実行するにはterasoluna-libプロジェクトが必要です。"/>
25+ </target>
26+
27+ <!-- =================================
28+ クラスファイルの削除を行う。
29+ ================================= -->
30+ <target name="clean" description="クラスファイルの削除">
31+ <delete includeEmptyDirs="true" failonerror="false">
32+ <fileset dir="${class.dir}" includes="**/*"/>
33+ </delete>
34+ </target>
35+
36+ <!-- =================================
37+ コンパイルを行う。
38+ ================================= -->
39+ <target name="compile" depends="clean" description="コンパイル実行">
40+ <mkdir dir="${class.dir}"/>
41+ <javac srcdir="${source.dir}"
42+ destdir="${class.dir}"
43+ classpath="${classpath.lib}"
44+ nowarn="true"
45+ debug="on" />
46+ </target>
47+
48+ <!-- =================================
49+   Jarファイルを作成する
50+ ================================= -->
51+ <target name="jar" depends="checkDependencyProject,compile">
52+ <delete file="${dist.dir}/${ant.project.name}.jar"/>
53+ <mkdir dir="${dist.dir}"/>
54+ <jar destfile="${dist.dir}/${ant.project.name}.jar">
55+ <manifest>
56+ <attribute name="Built-By" value="${user.name}"/>
57+ <attribute name="Implementation-Title" value="TERASOLUNA Framework for Spring"/>
58+ <attribute name="Implementation-Version" value="${terasoluna.version} ${TODAY}"/>
59+ <attribute name="Implementation-Vendor" value="NTT DATA Corporation."/>
60+ </manifest>
61+ <fileset dir="${class.dir}"/>
62+ </jar>
63+ <copy todir="${terasoluna.lib.home}/dist"
64+ file="${dist.dir}/${ant.project.name}.jar"/>
65+ </target>
66+
67+ <!-- =================================
68+  ソースコードを圧縮したZipファイルを作成する
69+ ================================= -->
70+ <target name="createSourceZip">
71+ <delete file="${dist.dir}/${ant.project.name}-src.zip"/>
72+ <mkdir dir="${dist.dir}"/>
73+ <zip destfile="${dist.dir}/${ant.project.name}-src.zip"
74+ basedir="${source.dir}" />
75+ <copy todir="${terasoluna.lib.home}/src"
76+ file="${dist.dir}/${ant.project.name}-src.zip"/>
77+ </target>
78+
79+ <!-- =================================
80+ JavaDocの生成を行う。
81+ ================================= -->
82+ <target name="createJavaDoc" description="JavaDoc生成">
83+ <delete dir="./doc/javadoc" />
84+ <mkdir dir="./doc/javadoc" />
85+ <javadoc classpath="${classpath.lib}"
86+ sourcepath="${source.dir}" destdir="./doc/javadoc"
87+ doctitle="${ant.project.name}" windowtitle="${ant.project.name}"
88+ use="true" splitindex="true"
89+ encoding="Windows-31J"
90+ private="true"
91+ packagenames="**/*">
92+ </javadoc>
93+ </target>
94+
95+ <!-- =================================
96+ このプロジェクトをZipファイルにしてdistフォルダに格納する。
97+ ================================= -->
98+ <target name="zip">
99+ <delete file="${dist.dir}/${ant.project.name}-${terasoluna.version}.zip"/>
100+ <mkdir dir="${dist.dir}"/>
101+ <zip destfile="${dist.dir}/${ant.project.name}.zip">
102+ <fileset dir="${basedir}/..">
103+ <include name="${ant.project.name}/.classpath"/>
104+ <include name="${ant.project.name}/.project"/>
105+ <include name="${ant.project.name}/sources/**/*"/>
106+ <include name="${ant.project.name}/ant/**/*"/>
107+ <include name="${ant.project.name}/LICENSE.txt"/>
108+ </fileset>
109+ </zip>
110+ <rename dest="${dist.dir}/${ant.project.name}-${terasoluna.version}.zip"
111+ src="${dist.dir}/${ant.project.name}.zip"/>
112+ </target>
113+</project>
114+
--- trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/IllegalClassTypeException.java (nonexistent)
+++ trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/IllegalClassTypeException.java (revision 11)
@@ -0,0 +1,75 @@
1+/*
2+ * Copyright (c) 2007 NTT DATA Corporation
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+package jp.terasoluna.fw.dao;
18+
19+import org.springframework.dao.DataAccessException;
20+
21+/**
22+ * QueryDAOインターフェースの配列変換時に例外が発生した場合のRuntime例外クラス。
23+ *
24+ * 引数のクラスと、戻り値の型が一致しない場合、
25+ * およびMapの配列変換時にDAO実装クラスから投げられる例外である。
26+ *
27+ */
28+public class IllegalClassTypeException extends DataAccessException {
29+
30+ /**
31+ * シリアルバージョンID。
32+ */
33+ private static final long serialVersionUID = -3147888263699426883L;
34+
35+ /**
36+ * エラーメッセージ
37+ */
38+ public static final String ERROR_ILLEGAL_CLASS_TYPE
39+ = "The illegal Class Type of the argument.";
40+
41+ /**
42+ * コンストラクタ。
43+ */
44+ public IllegalClassTypeException() {
45+ super(ERROR_ILLEGAL_CLASS_TYPE);
46+ }
47+
48+ /**
49+ * コンストラクタ。
50+ *
51+ * @param message メッセージ
52+ */
53+ public IllegalClassTypeException(String message) {
54+ super(message);
55+ }
56+
57+ /**
58+ * コンストラクタ。
59+ *
60+ * @param cause 原因となった例外
61+ */
62+ public IllegalClassTypeException(Throwable cause) {
63+ super(ERROR_ILLEGAL_CLASS_TYPE, cause);
64+ }
65+
66+ /**
67+ * コンストラクタ。
68+ *
69+ * @param message メッセージ
70+ * @param cause 原因となった例外
71+ */
72+ public IllegalClassTypeException(String message, Throwable cause) {
73+ super(message, cause);
74+ }
75+}
--- trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/UpdateDAO.java (nonexistent)
+++ trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/UpdateDAO.java (revision 11)
@@ -0,0 +1,74 @@
1+/*
2+ * Copyright (c) 2007 NTT DATA Corporation
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+package jp.terasoluna.fw.dao;
18+
19+import java.util.List;
20+
21+/**
22+ * UpdateDAOインタフェース。
23+ *
24+ * 更新系SQLを実行するためのDAOインタフェースである。
25+ *
26+ */
27+public interface UpdateDAO {
28+
29+ /**
30+ * 引数sqlIDで指定されたSQLを実行して、結果件数を返却する。
31+ * 実行するSQLは「insert, update delete」の3種類とする。
32+ *
33+ * @param sqlID 実行するSQLのID
34+ * @param bindParams SQLにバインドする値を格納したオブジェクト
35+ * @return SQLの実行結果件数を返却
36+ */
37+ int execute(String sqlID, Object bindParams);
38+
39+ /**
40+ * バッチ追加メソッド。
41+ * バッチ処理として追加したいSQLのSQLIDとバインドパラメータを
42+ * 引数に渡す。
43+ *
44+ * @param sqlID 実行するSQLのID
45+ * @param bindParams SQLにバインドする値を格納したオブジェクト
46+ * @deprecated addBatchの代わりに{@link #executeBatch(List)}
47+ * を使用すること
48+ */
49+ @Deprecated
50+ void addBatch(String sqlID, Object bindParams);
51+
52+ /**
53+ * バッチ処理の実行メソッド。
54+ *
55+ * @return SQLの実行結果
56+ * @deprecated executeBatchの代わりに{@link #executeBatch(List)}
57+ * を使用すること
58+ */
59+ @Deprecated
60+ int executeBatch();
61+
62+ /**
63+ * バッチ更新処理を行うメソッド。<br/>
64+ * 引数の{@link SqlHolder}のリストで指定されたすべてのSQLを実行する。
65+ * DAOインスタンスに状態を持たせない為、バッチ更新対象のSQLはすべて
66+ * このメソッド内で実行まで完結する必要がある。
67+ *
68+ * @param sqlHolders バッチ更新対象のsqlId、パラメータを格納した
69+ * SqlHolderインスタンスのリスト
70+ * @return SQLの実行結果件数
71+ */
72+ int executeBatch(List<SqlHolder> sqlHolders);
73+
74+}
--- trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/QueryDAO.java (nonexistent)
+++ trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/QueryDAO.java (revision 11)
@@ -0,0 +1,149 @@
1+/*
2+ * Copyright (c) 2007 NTT DATA Corporation
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+package jp.terasoluna.fw.dao;
18+
19+import java.util.List;
20+import java.util.Map;
21+
22+/**
23+ * QueryDAOインタフェース。
24+ *
25+ * 参照系SQLを実行するためのDAOインタフェースである。
26+ *
27+ */
28+public interface QueryDAO {
29+
30+ /**
31+ * SQLの実行結果を指定された型にして返却する。
32+ *
33+ * @param <E> 返却値の型
34+ * @param sqlID 実行するSQLのID
35+ * @param bindParams SQLにバインドする値を格納したオブジェクト
36+ * @param clazz 返却値のクラス
37+ * @return SQLの実行結果
38+ */
39+ <E> E executeForObject(String sqlID, Object bindParams, Class clazz);
40+
41+ /**
42+ * SQLの実行結果をMapに格納して返却する。
43+ *
44+ * @param sqlID 実行するSQLのID
45+ * @param bindParams SQLにバインドする値を格納したオブジェクト
46+ * @return SQLの実行結果
47+ */
48+ Map<String, Object> executeForMap(String sqlID, Object bindParams);
49+
50+ /**
51+ * SQLの実行結果を指定された型の配列にして返却する。
52+ *
53+ * @param <E> 返却値の型
54+ * @param sqlID 実行するSQLのID
55+ * @param bindParams SQLにバインドする値を格納したオブジェクト
56+ * @param clazz 返却値のクラス
57+ * @return SQLの実行結果
58+ */
59+ <E> E[] executeForObjectArray(String sqlID,
60+ Object bindParams, Class clazz);
61+
62+ /**
63+ * SQLの実行結果をMapの配列に格納して返却する。
64+ *
65+ * @param sqlID 実行するSQLのID
66+ * @param bindParams SQLにバインドする値を格納したオブジェクト
67+ * @return SQLの実行結果
68+ */
69+ Map<String, Object>[] executeForMapArray(String sqlID,
70+ Object bindParams);
71+
72+ /**
73+ * SQLの実行結果を指定されたインデックスから指定された行数分、
74+ * 指定された型の配列にして返却する。
75+ *
76+ * @param <E> 返却値の型
77+ * @param sqlID 実行するSQLのID
78+ * @param bindParams SQLにバインドする値を格納したオブジェクト
79+ * @param clazz 返却値のクラス
80+ * @param beginIndex 取得する開始インデックス
81+ * @param maxCount 取得する件数
82+ * @return SQLの実行結果
83+ */
84+ <E> E[] executeForObjectArray(String sqlID,
85+ Object bindParams, Class clazz, int beginIndex, int maxCount);
86+
87+ /**
88+ * SQLの実行結果を指定されたインデックスから指定された行数分、
89+ * Mapの配列にして返却する。
90+ *
91+ * @param sqlID 実行するSQLのID
92+ * @param bindParams SQLにバインドする値を格納したオブジェクト
93+ * @param beginIndex 取得する開始インデックス
94+ * @param maxCount 取得する件数
95+ * @return SQLの実行結果
96+ */
97+ Map<String, Object>[] executeForMapArray(String sqlID,
98+ Object bindParams, int beginIndex, int maxCount);
99+
100+ /**
101+ * SQLの実行結果を指定された型のListで返却する。
102+ *
103+ * @param <E> 返却値の型
104+ * @param sqlID 実行するSQLのID
105+ * @param bindParams SQLにバインドする値を格納したオブジェクト
106+ * @return SQLの実行結果
107+ */
108+ <E> List<E> executeForObjectList(String sqlID,
109+ Object bindParams);
110+
111+ /**
112+ * SQLの実行結果をMapのListに格納して返却する。
113+ *
114+ * @param sqlID 実行するSQLのID
115+ * @param bindParams SQLにバインドする値を格納したオブジェクト
116+ * @return SQLの実行結果
117+ */
118+ List<Map<String, Object>> executeForMapList(String sqlID,
119+ Object bindParams);
120+
121+ /**
122+ * SQLの実行結果を指定されたインデックスから指定された行数分、
123+ * 指定された型のListで返却する。
124+ *
125+ * @param <E> 返却値の型
126+ * @param sqlID 実行するSQLのID
127+ * @param bindParams SQLにバインドする値を格納したオブジェクト
128+ * @param beginIndex 取得する開始インデックス
129+ * @param maxCount 取得する件数
130+ * @return SQLの実行結果
131+ */
132+ <E> List<E> executeForObjectList(String sqlID,
133+ Object bindParams, int beginIndex, int maxCount);
134+
135+ /**
136+ * SQLの実行結果を指定されたインデックスから指定された行数分、
137+ * MapのListにして返却する。
138+ *
139+ * @param sqlID 実行するSQLのID
140+ * @param bindParams SQLにバインドする値を格納したオブジェクト
141+ * @param beginIndex 取得する開始インデックス
142+ * @param maxCount 取得する件数
143+ * @return SQLの実行結果
144+ */
145+ List<Map<String, Object>> executeForMapList(String sqlID,
146+ Object bindParams, int beginIndex, int maxCount);
147+
148+
149+}
\ No newline at end of file
--- trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/SqlHolder.java (nonexistent)
+++ trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/SqlHolder.java (revision 11)
@@ -0,0 +1,62 @@
1+/*
2+ * Copyright (c) 2007 NTT DATA Corporation
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+package jp.terasoluna.fw.dao;
18+
19+/**
20+ * SQLを保持するクラス。<br/>
21+ * <@link UpdateDAO#executeBatch(List)>の引数として使用する。
22+ *
23+ */
24+public class SqlHolder {
25+
26+ /**
27+ * SQLID
28+ */
29+ protected String sqlID = null;
30+
31+ /**
32+ * SQLの引数
33+ */
34+ protected Object bindParams = null;
35+
36+ /**
37+ * コンストラクタ。
38+ * @param sqlID SQLID
39+ * @param bindParams SQLの引数
40+ */
41+ public SqlHolder(String sqlID, Object bindParams) {
42+ this.sqlID = sqlID;
43+ this.bindParams = bindParams;
44+ }
45+
46+ /**
47+ * SQLIDを取得する。
48+ * @return SQLID
49+ */
50+ public String getSqlID() {
51+ return sqlID;
52+ }
53+
54+ /**
55+ * SQLの引数を取得する。
56+ * @return SQLの引数
57+ */
58+ public Object getBindParams() {
59+ return bindParams;
60+ }
61+
62+}
--- trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/StoredProcedureDAO.java (nonexistent)
+++ trunk/terasoluna-dao/sources/jp/terasoluna/fw/dao/StoredProcedureDAO.java (revision 11)
@@ -0,0 +1,36 @@
1+/*
2+ * Copyright (c) 2007 NTT DATA Corporation
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+package jp.terasoluna.fw.dao;
18+
19+/**
20+ * StoredProcedureDAOインタフェース。
21+ *
22+ * StoredProcedureを実行するためのDAOインタフェースである。
23+ *
24+ */
25+public interface StoredProcedureDAO {
26+
27+ /**
28+ * 指定されたSQLIDのストアドプロシージャーを実行する。
29+ * ストアドプロシージャーの結果であるアウトパラメータは、
30+ * 引数のbindParamsに反映される。
31+ *
32+ * @param sqlID 実行するSQLのID
33+ * @param bindParams SQLにバインドする値を格納したオブジェクト
34+ */
35+ void executeForObject(String sqlID, Object bindParams);
36+}
Show on old repository browser