[DAO-90] SQLファイル名が誤っている場合に早期検出できるようにする Created: 2007-05-19 Updated: 2007-05-24 Resolved: 2007-05-24 |
|
Status: | Resolved |
Project: | S2Dao |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | 1.0.43 |
Type: | Improvement | Priority: | Major |
Reporter: | manhole | Assignee: | manhole |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
@SqlFileアノテーションを導入し、実現します。 元ネタはこちら。 [seasar-s2dao-dev:223]
|
Comments |
Comment by manhole [ 2007-05-24 ] |
解決済みにします。 |
Comment by manhole [ 2007-05-24 ] |
revision 882で対応しています。 testコードを書くうちに @SqlFile("org/example/sql/hoge.sql")
という記法を使用したいシチュエーションが思いつかなかったため、 @SqlFile か public static final String getEmployee_SQL_FILE = null; のみを実装しました。 |
Comment by manhole [ 2007-05-21 ] |
ひがさんでしたか (^^ |
Comment by higa [ 2007-05-21 ] |
賛成。 |
Comment by manhole [ 2007-05-21 ] |
2007/05/21 10:28のAnonymousさんに+1です。 Tigerアノテーションの定義が @Inherited @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface SqlFile { String value() default ""; } となると思いますので、これに合わせて public static final String getEmployee_SQL_FILE = ""; か public static final String getEmployee_SQL_FILE = null; と記述されていれば指定されているものと扱うので、どうでしょうか。 |
Comment by Anonymous [ 2007-05-21 ] |
戻り値の方が違うとややこしいので、getEmployee_SQL_FILE = nullの時は、デフォルトで、指定されていたらそれを使うというのが良いのではないでしょうか。 |
Comment by azusa [ 2007-05-19 ] |
定数アノテーションは public static final boolean getEmployee_SQL_FILE = true; public static final String getEmployee_SQL_FILE = "org/example/sql/hoge.sql"; のような感じでしょうか? |