|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.extension.jdbc.service.S2AbstractService<T>
T - エンティティの型public abstract class S2AbstractService<T>
サービスを作るベースクラスです。
| フィールドの概要 | |
|---|---|
protected java.lang.Class<T> |
entityClass
エンティティのクラスです。 |
protected JdbcManager |
jdbcManager
JDBCマネージャです。 |
protected java.lang.String |
sqlFilePathPrefix
SQLファイルのパスのプレフィックスです。 |
| コンストラクタの概要 | |
|---|---|
S2AbstractService()
コンストラクタです。 |
|
S2AbstractService(java.lang.Class<T> entityClass)
コンストラクタです。 |
|
| メソッドの概要 | ||
|---|---|---|
int |
delete(T entity)
エンティティを削除します。 |
|
java.util.List<T> |
findAll()
すべてのエンティティを検索します。 |
|
java.util.List<T> |
findByCondition(BeanMap conditions)
条件付で検索します。 |
|
long |
getCount()
件数を返します。 |
|
int |
insert(T entity)
エンティティを挿入します。 |
|
protected AutoSelect<T> |
select()
自動検索を返します。 |
|
protected
|
selectBySqlFile(java.lang.Class<T2> baseClass,
java.lang.String path)
SQLファイル検索を返します。 |
|
protected
|
selectBySqlFile(java.lang.Class<T2> baseClass,
java.lang.String path,
java.lang.Object parameter)
SQLファイル検索を返します。 |
|
protected void |
setEntityClass(java.lang.Class<T> entityClass)
エンティティのクラスを設定します。 |
|
int |
update(T entity)
エンティティを更新します。 |
|
protected SqlFileUpdate |
updateBySqlFile(java.lang.String path)
SQLファイル更新を返します。 |
|
protected SqlFileUpdate |
updateBySqlFile(java.lang.String path,
java.lang.Object parameter)
SQLファイル更新を返します。 |
|
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
protected JdbcManager jdbcManager
protected java.lang.Class<T> entityClass
protected java.lang.String sqlFilePathPrefix
| コンストラクタの詳細 |
|---|
public S2AbstractService()
public S2AbstractService(java.lang.Class<T> entityClass)
entityClass - エンティティのクラス| メソッドの詳細 |
|---|
protected AutoSelect<T> select()
public java.util.List<T> findAll()
public java.util.List<T> findByCondition(BeanMap conditions)
conditions - 条件
AutoSelect.where(Map)public long getCount()
public int insert(T entity)
entity - エンティティ
public int update(T entity)
entity - エンティティ
public int delete(T entity)
entity - エンティティ
protected <T2> SqlFileSelect<T2> selectBySqlFile(java.lang.Class<T2> baseClass,
java.lang.String path)
T2 - 戻り値のJavaBeansの型baseClass - 戻り値のJavaBeansのクラスpath - エンティティのディレクトリ部分を含まないSQLファイルのパス
protected <T2> SqlFileSelect<T2> selectBySqlFile(java.lang.Class<T2> baseClass,
java.lang.String path,
java.lang.Object parameter)
T2 - 戻り値のJavaBeansの型baseClass - 戻り値のJavaBeansのクラスpath - エンティティのディレクトリ部分を含まないSQLファイルのパスparameter - パラメータ。
パラメータが1つしかない場合は、値を直接指定します。 パラメータが複数ある場合は、JavaBeansを作って、 プロパティ名をSQLファイルのバインド変数名とあわせます。 JavaBeansはpublicフィールドで定義することもできます。
パラメータが1つで型がDate、Calendarのいずれか場合、Parameterに定義されたメソッドによりパラメータの時制を指定できます。
パラメータが1つで型がString、byte[]、Serializableのいずれかの場合、Parameterに定義されたメソッドによりパラメータをラージオブジェクトとして扱えます。
protected SqlFileUpdate updateBySqlFile(java.lang.String path)
path - エンティティのディレクトリ部分を含まないSQLファイルのパス
protected SqlFileUpdate updateBySqlFile(java.lang.String path,
java.lang.Object parameter)
path - エンティティのディレクトリ部分を含まないSQLファイルのパスparameter - パラメータ用のJavaBeans
protected void setEntityClass(java.lang.Class<T> entityClass)
entityClass - エンティティのクラス
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||