public static Map<String,Map> _search(String domain, String where, String sort, int limit) {
        LinkedHashMap<String, Map> result = null;
        try {
            validateDomain(domain);
            String select = "select * from " + domain;
            if(where!=null && !"".equals(where))
                select += " where " + where;
            if(sort!=null && !"".equals(sort))
                select += " order by " + sort;
            if(limit>0)
                select += " limit " + limit;

            SelectResult selectResult = getSimpleDBClient().select(new SelectRequest(select));
            if(selectResult!=null) {
                result = new LinkedHashMap<String,Map>();
                for(Item item : selectResult.getItems()) {
                    Map<String, String> attributes = new LinkedHashMap<String,String>();
                    for(Attribute attribute : item.getAttributes()) {
                        attributes.put(attribute.getName(), attribute.getValue());
                    }
                    result.put(item.getName(),attributes);
                }
            }
        } catch (SAWSException sawse) {
            sawse.printStackTrace();
        }
        return result;
    }