public abstract class BaseService<T> extends S2AbstractService<T> {
/**
* 与えられたテーブルのIDENTITYを取得する。
*
* @return
*/
public Integer getLastId(String tableName) {
Integer lastId=
jdbcManager
.selectBySql(
Integer.class,
"SELECT IDENT_CURRENT('"+tableName+"');")
.getSingleResult();
return lastId;
}
}
More than 5 years have passed since last update.
SAStruts + S2JDBC + SQLServerで指定テーブルのIDENTITYを取得する
Last updated at Posted at 2015-01-31
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
11