public static String getSQL(String sql, StatementParameter param) {
		int i = 0;
		while (sql.indexOf('?') > -1) {
			if (param == null) {
				throw new InvalidParamDataAccessException("没有设置参数.");
			}
			if (i >= param.size()) {
				return sql;
			}
			Class<?> type = param.getType(i);
			Object obj = param.getObject(i);
			String value = getValue(type, obj);
			sql = sql.substring(0, sql.indexOf('?')) + value + sql.substring(sql.indexOf('?') + 1, sql.length());
			i++;
		}
		return sql;//
	}
public static String getSQL ( String sql , StatementParameter param ) { int i = 0 ; while ( sql . indexOf ( '?' ) > - 1 ) { if ( param == null ) { throw new InvalidParamDataAccessException ( "没有设置参数." ) ; } if ( i >= param . size ( ) ) { return sql ; } Class < ? > type = param . getType ( i ) ; Object obj = param . getObject ( i ) ; String value = getValue ( type , obj ) ; sql = sql . substring ( 0 , sql . indexOf ( '?' ) ) + value + sql . substring ( sql . indexOf ( '?' ) + 1 , sql . length ( ) ) ; i ++ ; } return sql ; }
获取拼接参数后的sql.

@param sql sql
@param param 参数列表
@return 拼接后的sql