docs: private String getQueryClauses(final Map<String, Object> params,
  			final Map<String, Object> orderParams) {
  		final StringBuffer queryString = new StringBuffer();
  		if ((params != null) && !params.isEmpty()) {
  			queryString.append(" where ");
  			for (final Iterator<Map.Entry<String, Object>> it = params
  					.entrySet().iterator(); it.hasNext();) {
  				final Map.Entry<String, Object> entry = it.next();
  				if (entry.getValue() instanceof Boolean) {
  					queryString.append(entry.getKey()).append(" is ")
  							.append(entry.getValue()).append(" ");
  				} else {
  					if (entry.getValue() instanceof Number) {
  						queryString.append(entry.getKey()).append(" = ")
  								.append(entry.getValue());
  					} else {
  						// string equality
  						queryString.append(entry.getKey()).append(" = '")
  								.append(entry.getValue()).append("'");
  					}
  				}
  				if (it.hasNext()) {
  					queryString.append(" and ");
  				}
  			}
  		}
  		if ((orderParams != null) && !orderParams.isEmpty()) {
  			queryString.append(" order by ");
  			for (final Iterator<Map.Entry<String, Object>> it = orderParams
  					.entrySet().iterator(); it.hasNext();) {
  				final Map.Entry<String, Object> entry = it.next();
  				queryString.append(entry.getKey()).append(" ");
  				if (entry.getValue() != null) {
  					queryString.append(entry.getValue());
  				}
  				if (it.hasNext()) {
  					queryString.append(", ");
  				}
  			}
  		}
  		return queryString.toString();
  	}