@SuppressWarnings("unchecked")
    public Queryable(UnitOfWork uow, String obj, BaseCommand cmd) {
        uow.open();
        TStr = obj;

        try {
            if (!ReflectionCache.containsKey(obj))
                ReflectionCache.put(obj, Class.forName(obj));
            if (!uow.cacheManager.cacheExists(obj))
                uow.cacheManager.addCache(new Cache(obj, 10000, false, false, 600, 600));
            cache = uow.cacheManager.getCache(obj);

            Statement stmt = uow.Conn.createStatement();

            String sql = cmd.getSql();
            if(uow.logQueries)
                uow.logger.debug(sql);
            ResultSet rs = stmt.executeQuery(sql);

            try {
                while (rs.next()) {
                    T cls = (T) ReflectionCache.get(obj).newInstance();

                    cls.Parse(uow, rs);

                    cache.put(new Element(cls.getId(), cls));
                    list.add(cls);
                }

            } catch (SQLException ignored) {

            } finally {
                try {
                    rs.close();
                } catch (Exception ignore) {
                }
            }

            stmt.close();
        } catch (Exception ex) {
            UnitOfWork.logger.fatal("Stacktrace:", ex);
        }
        uow.close();
    }