code: public void createPreparedStatement(String query, List<Object> params) throws SQLException {
  
          m_preparedStatement = m_connection.prepareStatement(query);
  
          // Check the params
          if (params != null) {
              for (int i = 0; i < params.size(); i++) {
                  Object item = params.get(i);
  
                  // Check if the parameter is a string
                  if (item instanceof String) {
                      m_preparedStatement.setString(i + 1, (String)item);
                  }
                  if (item instanceof Integer) {
                      Integer number = (Integer)item;
                      m_preparedStatement.setInt(i + 1, number.intValue());
                  }
                  if (item instanceof Long) {
                      Long longNumber = (Long)item;
                      m_preparedStatement.setLong(i + 1, longNumber.longValue());
                  }
  
                  // If item is none of types above set the statement to use the bytes
                  if (!(item instanceof Integer) && !(item instanceof String) && !(item instanceof Long)) {
                      try {
                          m_preparedStatement.setBytes(i + 1, CmsDataTypeUtil.dataSerialize(item));
                      } catch (IOException e) {
                          e.printStackTrace();
                      }
                  }
              }
          }
  
      }
docs: Creates a new SQL Statement on the connection of this DB wrapper.<p>
  
  @param query the DB query to use
  @param params List of additional parameters
  
  @throws SQLException if statement cannot be created