|
@@ -118,7 +118,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <T> T selectOne(String statement) {
|
|
public <T> T selectOne(String statement) {
|
|
return this.sqlSessionProxy.<T>selectOne(statement);
|
|
return this.sqlSessionProxy.<T>selectOne(statement);
|
|
}
|
|
}
|
|
@@ -126,7 +126,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <T> T selectOne(String statement, Object parameter) {
|
|
public <T> T selectOne(String statement, Object parameter) {
|
|
return this.sqlSessionProxy.<T>selectOne(statement, parameter);
|
|
return this.sqlSessionProxy.<T>selectOne(statement, parameter);
|
|
}
|
|
}
|
|
@@ -134,7 +134,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <K, V> Map<K, V> selectMap(String statement, String mapKey) {
|
|
public <K, V> Map<K, V> selectMap(String statement, String mapKey) {
|
|
return this.sqlSessionProxy.<K, V>selectMap(statement, mapKey);
|
|
return this.sqlSessionProxy.<K, V>selectMap(statement, mapKey);
|
|
}
|
|
}
|
|
@@ -142,7 +142,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey) {
|
|
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey) {
|
|
return this.sqlSessionProxy.<K, V>selectMap(statement, parameter, mapKey);
|
|
return this.sqlSessionProxy.<K, V>selectMap(statement, parameter, mapKey);
|
|
}
|
|
}
|
|
@@ -150,7 +150,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, RowBounds rowBounds) {
|
|
public <K, V> Map<K, V> selectMap(String statement, Object parameter, String mapKey, RowBounds rowBounds) {
|
|
return this.sqlSessionProxy.<K, V>selectMap(statement, parameter, mapKey, rowBounds);
|
|
return this.sqlSessionProxy.<K, V>selectMap(statement, parameter, mapKey, rowBounds);
|
|
}
|
|
}
|
|
@@ -158,7 +158,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <T> Cursor<T> selectCursor(String statement) {
|
|
public <T> Cursor<T> selectCursor(String statement) {
|
|
return this.sqlSessionProxy.selectCursor(statement);
|
|
return this.sqlSessionProxy.selectCursor(statement);
|
|
}
|
|
}
|
|
@@ -166,7 +166,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <T> Cursor<T> selectCursor(String statement, Object parameter) {
|
|
public <T> Cursor<T> selectCursor(String statement, Object parameter) {
|
|
return this.sqlSessionProxy.selectCursor(statement, parameter);
|
|
return this.sqlSessionProxy.selectCursor(statement, parameter);
|
|
}
|
|
}
|
|
@@ -174,7 +174,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <T> Cursor<T> selectCursor(String statement, Object parameter, RowBounds rowBounds) {
|
|
public <T> Cursor<T> selectCursor(String statement, Object parameter, RowBounds rowBounds) {
|
|
return this.sqlSessionProxy.selectCursor(statement, parameter, rowBounds);
|
|
return this.sqlSessionProxy.selectCursor(statement, parameter, rowBounds);
|
|
}
|
|
}
|
|
@@ -182,7 +182,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <E> List<E> selectList(String statement) {
|
|
public <E> List<E> selectList(String statement) {
|
|
return this.sqlSessionProxy.<E>selectList(statement);
|
|
return this.sqlSessionProxy.<E>selectList(statement);
|
|
}
|
|
}
|
|
@@ -190,7 +190,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <E> List<E> selectList(String statement, Object parameter) {
|
|
public <E> List<E> selectList(String statement, Object parameter) {
|
|
return this.sqlSessionProxy.<E>selectList(statement, parameter);
|
|
return this.sqlSessionProxy.<E>selectList(statement, parameter);
|
|
}
|
|
}
|
|
@@ -198,7 +198,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <E> List<E> selectList(String statement, Object parameter, RowBounds rowBounds) {
|
|
public <E> List<E> selectList(String statement, Object parameter, RowBounds rowBounds) {
|
|
return this.sqlSessionProxy.<E>selectList(statement, parameter, rowBounds);
|
|
return this.sqlSessionProxy.<E>selectList(statement, parameter, rowBounds);
|
|
}
|
|
}
|
|
@@ -206,8 +206,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
- @SuppressWarnings("rawtypes")
|
|
|
|
|
|
+ @Override
|
|
public void select(String statement, ResultHandler handler) {
|
|
public void select(String statement, ResultHandler handler) {
|
|
this.sqlSessionProxy.select(statement, handler);
|
|
this.sqlSessionProxy.select(statement, handler);
|
|
}
|
|
}
|
|
@@ -215,8 +214,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
- @SuppressWarnings("rawtypes")
|
|
|
|
|
|
+ @Override
|
|
public void select(String statement, Object parameter, ResultHandler handler) {
|
|
public void select(String statement, Object parameter, ResultHandler handler) {
|
|
this.sqlSessionProxy.select(statement, parameter, handler);
|
|
this.sqlSessionProxy.select(statement, parameter, handler);
|
|
}
|
|
}
|
|
@@ -224,8 +222,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
- @SuppressWarnings("rawtypes")
|
|
|
|
|
|
+ @Override
|
|
public void select(String statement, Object parameter, RowBounds rowBounds, ResultHandler handler) {
|
|
public void select(String statement, Object parameter, RowBounds rowBounds, ResultHandler handler) {
|
|
this.sqlSessionProxy.select(statement, parameter, rowBounds, handler);
|
|
this.sqlSessionProxy.select(statement, parameter, rowBounds, handler);
|
|
}
|
|
}
|
|
@@ -233,7 +230,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public int insert(String statement) {
|
|
public int insert(String statement) {
|
|
return this.sqlSessionProxy.insert(statement);
|
|
return this.sqlSessionProxy.insert(statement);
|
|
}
|
|
}
|
|
@@ -241,7 +238,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public int insert(String statement, Object parameter) {
|
|
public int insert(String statement, Object parameter) {
|
|
return this.sqlSessionProxy.insert(statement, parameter);
|
|
return this.sqlSessionProxy.insert(statement, parameter);
|
|
}
|
|
}
|
|
@@ -249,7 +246,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public int update(String statement) {
|
|
public int update(String statement) {
|
|
return this.sqlSessionProxy.update(statement);
|
|
return this.sqlSessionProxy.update(statement);
|
|
}
|
|
}
|
|
@@ -257,7 +254,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public int update(String statement, Object parameter) {
|
|
public int update(String statement, Object parameter) {
|
|
return this.sqlSessionProxy.update(statement, parameter);
|
|
return this.sqlSessionProxy.update(statement, parameter);
|
|
}
|
|
}
|
|
@@ -265,7 +262,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public int delete(String statement) {
|
|
public int delete(String statement) {
|
|
return this.sqlSessionProxy.delete(statement);
|
|
return this.sqlSessionProxy.delete(statement);
|
|
}
|
|
}
|
|
@@ -273,7 +270,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public int delete(String statement, Object parameter) {
|
|
public int delete(String statement, Object parameter) {
|
|
return this.sqlSessionProxy.delete(statement, parameter);
|
|
return this.sqlSessionProxy.delete(statement, parameter);
|
|
}
|
|
}
|
|
@@ -281,7 +278,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public <T> T getMapper(Class<T> type) {
|
|
public <T> T getMapper(Class<T> type) {
|
|
return getConfiguration().getMapper(type, this);
|
|
return getConfiguration().getMapper(type, this);
|
|
}
|
|
}
|
|
@@ -289,7 +286,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public void commit() {
|
|
public void commit() {
|
|
throw new UnsupportedOperationException("Manual commit is not allowed over a Spring managed SqlSession");
|
|
throw new UnsupportedOperationException("Manual commit is not allowed over a Spring managed SqlSession");
|
|
}
|
|
}
|
|
@@ -297,7 +294,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public void commit(boolean force) {
|
|
public void commit(boolean force) {
|
|
throw new UnsupportedOperationException("Manual commit is not allowed over a Spring managed SqlSession");
|
|
throw new UnsupportedOperationException("Manual commit is not allowed over a Spring managed SqlSession");
|
|
}
|
|
}
|
|
@@ -305,7 +302,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public void rollback() {
|
|
public void rollback() {
|
|
throw new UnsupportedOperationException("Manual rollback is not allowed over a Spring managed SqlSession");
|
|
throw new UnsupportedOperationException("Manual rollback is not allowed over a Spring managed SqlSession");
|
|
}
|
|
}
|
|
@@ -313,7 +310,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public void rollback(boolean force) {
|
|
public void rollback(boolean force) {
|
|
throw new UnsupportedOperationException("Manual rollback is not allowed over a Spring managed SqlSession");
|
|
throw new UnsupportedOperationException("Manual rollback is not allowed over a Spring managed SqlSession");
|
|
}
|
|
}
|
|
@@ -321,7 +318,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public void close() {
|
|
public void close() {
|
|
throw new UnsupportedOperationException("Manual close is not allowed over a Spring managed SqlSession");
|
|
throw new UnsupportedOperationException("Manual close is not allowed over a Spring managed SqlSession");
|
|
}
|
|
}
|
|
@@ -329,7 +326,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public void clearCache() {
|
|
public void clearCache() {
|
|
this.sqlSessionProxy.clearCache();
|
|
this.sqlSessionProxy.clearCache();
|
|
}
|
|
}
|
|
@@ -337,7 +334,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public Configuration getConfiguration() {
|
|
public Configuration getConfiguration() {
|
|
return this.sqlSessionFactory.getConfiguration();
|
|
return this.sqlSessionFactory.getConfiguration();
|
|
}
|
|
}
|
|
@@ -345,7 +342,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
/**
|
|
/**
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public Connection getConnection() {
|
|
public Connection getConnection() {
|
|
return this.sqlSessionProxy.getConnection();
|
|
return this.sqlSessionProxy.getConnection();
|
|
}
|
|
}
|
|
@@ -355,7 +352,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
*
|
|
*
|
|
* @since 1.0.2
|
|
* @since 1.0.2
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public List<BatchResult> flushStatements() {
|
|
public List<BatchResult> flushStatements() {
|
|
return this.sqlSessionProxy.flushStatements();
|
|
return this.sqlSessionProxy.flushStatements();
|
|
}
|
|
}
|
|
@@ -381,7 +378,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
* @see org.springframework.beans.factory.support.DisposableBeanAdapter#inferDestroyMethodIfNecessary
|
|
* @see org.springframework.beans.factory.support.DisposableBeanAdapter#inferDestroyMethodIfNecessary
|
|
* @see org.springframework.beans.factory.support.DisposableBeanAdapter#CLOSE_METHOD_NAME
|
|
* @see org.springframework.beans.factory.support.DisposableBeanAdapter#CLOSE_METHOD_NAME
|
|
*/
|
|
*/
|
|
-
|
|
|
|
|
|
+ @Override
|
|
public void destroy() throws Exception {
|
|
public void destroy() throws Exception {
|
|
// This method forces spring disposer to avoid call of
|
|
// This method forces spring disposer to avoid call of
|
|
// SqlSessionTemplate.close() which gives UnsupportedOperationException
|
|
// SqlSessionTemplate.close() which gives UnsupportedOperationException
|
|
@@ -396,6 +393,7 @@ public class MybatisSqlSessionTemplate implements SqlSession, DisposableBean {
|
|
*/
|
|
*/
|
|
private class SqlSessionInterceptor implements InvocationHandler {
|
|
private class SqlSessionInterceptor implements InvocationHandler {
|
|
|
|
|
|
|
|
+ @Override
|
|
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
|
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
|
SqlSession sqlSession = MybatisSqlSessionTemplate.this.sqlSessionFactory
|
|
SqlSession sqlSession = MybatisSqlSessionTemplate.this.sqlSessionFactory
|
|
.openSession(MybatisSqlSessionTemplate.this.executorType);
|
|
.openSession(MybatisSqlSessionTemplate.this.executorType);
|