List<ODocument> result = null;
OCommandRequest command = DbHelper.selectCommandBuilder(MODEL_NAME, false, criteria);
try{
result = DbHelper.selectCommandExecute(command, criteria.getParams());
}catch (OCommandExecutionException e ){
throw new InvalidCriteriaException("Invalid criteria. Please check if your querystring is encoded in a corrected way. Double check the single-quote and the quote characters",e);
}catch (OQueryParsingException e ){
throw new InvalidCriteriaException("Invalid criteria. Please check if your querystring is encoded in a corrected way. Double check the single-quote and the quote characters",e);
}catch (OCommandSQLParsingException e){
throw new InvalidCriteriaException(e);
}catch (StringIndexOutOfBoundsException e){
throw new InvalidCriteriaException("Invalid criteria. Please check your query, the syntax and the parameters",e);
}catch (IndexOutOfBoundsException e){
throw new InvalidCriteriaException("Invalid criteria. Please check your query, the syntax and the parameters",e);
}
if (Logger.isTraceEnabled()) Logger.trace("Method End");
return result;
}