@Override
    public List<IEntityObject> ExecuteQuery(Class<? extends EntityObject> c, NamedQuery query) {
        Connection conn = null;
        List<IEntityObject> res = new ArrayList<IEntityObject>();

        try {
            if ((conn = this.getConnection()) != null) {
                Statement statement = conn.createStatement();
                String queryString = query.getFinalString();
                if (DEBUG) {
                    qlog.log(queryString);
                }
                ResultSet rs = statement.executeQuery(queryString);

                while (rs.next()) {
                    IEntityObject item = (IEntityObject) c.newInstance();
                    item.setObject(rs);

                    res.add(item);
                }

                statement.close();
            }
        } catch (SQLException e) {
            e.printStackTrace();
            return null;
        } catch (NullPointerException e) {
            e.printStackTrace();
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        } finally {
            closeConnection(conn);
        }

        return res;
    }