Package com.workingdogs.village

Examples of com.workingdogs.village.QueryDataSet


    public static List<TurbineUserGroupRole> resultSet2Objects(java.sql.ResultSet results)
            throws TorqueException
    {
        try
        {
            QueryDataSet qds = null;
            List<Record> rows = null;
            try
            {
                qds = new QueryDataSet(results);
                rows = getSelectResults(qds);
            }
            finally
            {
                if (qds != null)
                {
                    qds.close();
                }
            }

            return populateObjects(rows);
        }
View Full Code Here


    public static List<TurbineRole> resultSet2Objects(java.sql.ResultSet results)
            throws TorqueException
    {
        try
        {
            QueryDataSet qds = null;
            List<Record> rows = null;
            try
            {
                qds = new QueryDataSet(results);
                rows = getSelectResults(qds);
            }
            finally
            {
                if (qds != null)
                {
                    qds.close();
                }
            }

            return populateObjects(rows);
        }
View Full Code Here

    public static List<TurbineGroup> resultSet2Objects(java.sql.ResultSet results)
            throws TorqueException
    {
        try
        {
            QueryDataSet qds = null;
            List<Record> rows = null;
            try
            {
                qds = new QueryDataSet(results);
                rows = getSelectResults(qds);
            }
            finally
            {
                if (qds != null)
                {
                    qds.close();
                }
            }

            return populateObjects(rows);
        }
View Full Code Here

    public static List<TurbinePermission> resultSet2Objects(java.sql.ResultSet results)
            throws TorqueException
    {
        try
        {
            QueryDataSet qds = null;
            List<Record> rows = null;
            try
            {
                qds = new QueryDataSet(results);
                rows = getSelectResults(qds);
            }
            finally
            {
                if (qds != null)
                {
                    qds.close();
                }
            }

            return populateObjects(rows);
        }
View Full Code Here

    public static List<JobEntry> resultSet2Objects(java.sql.ResultSet results)
            throws TorqueException
    {
        try
        {
            QueryDataSet qds = null;
            List<Record> rows = null;
            try
            {
                qds = new QueryDataSet(results);
                rows = getSelectResults(qds);
            }
            finally
            {
                if (qds != null)
                {
                    qds.close();
                }
            }

            return populateObjects(rows);
        }
View Full Code Here

        {
            log.debug(idSql);
        }

        // Execute the query.
        QueryDataSet qds = new QueryDataSet(connection, idSql);
        Record rec;
        try
        {
            qds.fetchRecords(1);
            rec = qds.getRecord(0)// Records are 0 based.
        }
        finally
        {
            if (qds != null)
            {
                qds.close();
            }
        }
        return rec.getValue(1); // Values are 1 based.
    }
View Full Code Here

        {
            log("Fetching data for table " + tableName, Project.MSG_INFO);
            // Set Statement object in associated TorqueDataDump
            // instance
            return new TableTool
                (new QueryDataSet(conn, "SELECT * FROM " + tableName));
        }
View Full Code Here

    private Value getIdAsVillageValue(Connection connection, Object keyInfo)
        throws Exception
    {
        String idSQL = dbAdapter.getIDMethodSQL(keyInfo);
        Value id = null;
        QueryDataSet qds = null;
        try
        {
            qds = new QueryDataSet(connection, idSQL);
            qds.fetchRecords(1);
            Record rec = qds.getRecord(0);
            id = rec.getValue(1);
        }
        finally
        {
            if (qds != null)
            {
                qds.close();
            }
        }
        return id;
    }
View Full Code Here

                log.debug("run(): query = " + query);
                log.debug("run(): memoryLimit = " + memoryLimit);
                log.debug("run(): blockBegin = " + blockBegin);
                log.debug("run(): blockEnd = " + blockEnd);
            }
            qds = new QueryDataSet(conn, query);

            // Continue getting rows one page at a time until the memory limit
            // is reached, all results have been retrieved, or the rest
            // of the results have been determined to be irrelevant.
            while (!killThread
View Full Code Here

        int numberOfResults,
        boolean singleRecord,
        Connection con)
        throws TorqueException
    {
        QueryDataSet qds = null;
        List results = Collections.EMPTY_LIST;
        try
        {
            // execute the query
            long startTime = System.currentTimeMillis();
            qds = new QueryDataSet(con, queryString);
            if (log.isDebugEnabled())
            {
                log.debug("Elapsed time="
                        + (System.currentTimeMillis() - startTime) + " ms");
            }
            results = getSelectResults(
                    qds, start, numberOfResults, singleRecord);
        }
        catch (Exception e)
        {
            throwTorqueException(e);
        }
        finally
        {
            if (qds != null)
            {
                try
                {
                    qds.close();
                }
                catch (Exception ignored)
                {
                }
            }
View Full Code Here

TOP

Related Classes of com.workingdogs.village.QueryDataSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.