public void saveAndUpdateByJdbc(Collection<? extends T> entities){
    		if(entities == null || entities.size() == 0)
    			return;
        	final Collection<? extends T> beanList = entities;
        	Session session = getCurrentSession();
            session.doWork(new Work() {
			public void execute(Connection connection) throws SQLException {
				String sql = createSql(beanList.iterator().next());
				PreparedStatement stmt = connection.prepareStatement(sql,ResultSet.TYPE_SCROLL_SENSITIVE,
						ResultSet.CONCUR_READ_ONLY);
				for (T bean : beanList) {
					setValue(stmt, bean);
				}
				stmt.executeBatch();
			}
		});
    }