@Override
    public int hashCode() {
        int hashCode = 1;
        if (sql != null) {
            hashCode += sql.hashCode();
        }
        hashCode = hashCode * 31 + types.hashCode();
        hashCode = hashCode * 31 + params.hashCode();
        return hashCode;
    }
Sets all parameters on the given PreparedStatement. The standard code block
for turning a CachedPreparedStatement into a PreparedStatement is as follows:

<pre>
PreparedStatement pstmt = con.prepareStatement(cachedPstmt.getSQL());
cachedPstmt.setParams(pstmt);
</pre>

@param pstmt the prepared statement.
@throws java.sql.SQLException if an SQL Exception occurs.
xmppserver/src/main/java/org/jivesoftware/database/CachedPreparedStatement.java