Package org.apache.ojb.broker.query

Examples of org.apache.ojb.broker.query.ReportQuery


        super(queryObject, broker);
        try
        {
            // BRJ: use only explicit attributes (columns) !
            // ignore those automatically added for ordering or grouping
            ReportQuery q = (ReportQuery)queryObject.getQuery();
            m_attributeCount = q.getAttributes().length;
           
            init_jdbcTypes();
        }
        catch (SQLException e)
        {
View Full Code Here


     * get the jdbcTypes from the Query or the ResultSet if not available from the Query
     * @throws SQLException
     */
    private void init_jdbcTypes() throws SQLException
    {
        ReportQuery q = (ReportQuery) getQueryObject().getQuery();
        m_jdbcTypes = new int[m_attributeCount];
       
        // try to get jdbcTypes from Query
        if (q.getJdbcTypes() != null)
        {
            m_jdbcTypes = q.getJdbcTypes();
        }
        else
        {
            ResultSetMetaData rsMetaData = getRsAndStmt().m_rs.getMetaData();
            for (int i = 0; i < m_attributeCount; i++)
View Full Code Here

     * involved to maximize performance.
     */
    protected Object getObjectFromResultSet() throws PersistenceBrokerException
    {
        Object[] result = new Object[m_attributeCount];
        ReportQuery q =(ReportQuery) getQueryObject().getQuery();

        for (int i = 0; i < m_attributeCount; i++)
        {
            try
            {
                int jdbcType = m_jdbcTypes[i];
                String attr = q.getAttributes()[i];
                FieldDescriptor fld = (FieldDescriptor) q.getAttributeFieldDescriptors().get(attr);
                Object val =JdbcTypesHelper.getObjectFromColumn(getRsAndStmt().m_rs, new Integer(jdbcType), i + 1);
               
                if (fld != null && fld.getFieldConversion() != null)
                {
                    val = fld.getFieldConversion().sqlToJava(val);
View Full Code Here

        super(queryObject, broker);
        try
        {
            // BRJ: use only explicit attributes (columns) !
            // ignore those automatically added for ordering or grouping
            ReportQuery q = (ReportQuery)queryObject.getQuery();
            m_attributeCount = q.getAttributes().length;
           
            init_jdbcTypes();
        }
        catch (SQLException e)
        {
View Full Code Here

     * get the jdbcTypes from the Query or the ResultSet if not available from the Query
     * @throws SQLException
     */
    private void init_jdbcTypes() throws SQLException
    {
        ReportQuery q = (ReportQuery) getQueryObject().getQuery();
        m_jdbcTypes = new int[m_attributeCount];
       
        // try to get jdbcTypes from Query
        if (q.getJdbcTypes() != null)
        {
            m_jdbcTypes = q.getJdbcTypes();
        }
        else
        {
            ResultSetMetaData rsMetaData = getRsAndStmt().m_rs.getMetaData();
            for (int i = 0; i < m_attributeCount; i++)
View Full Code Here

        super(queryObject, broker);
        try
        {
            // BRJ: use only explicit attributes (columns) !
            // ignore those automatically added for ordering or grouping
            ReportQuery q = (ReportQuery)queryObject.getQuery();
            m_attributeCount = q.getAttributes().length;
           
            init_jdbcTypes();
        }
        catch (SQLException e)
        {
View Full Code Here

     * get the jdbcTypes from the Query or the ResultSet if not available from the Query
     * @throws SQLException
     */
    private void init_jdbcTypes() throws SQLException
    {
        ReportQuery q = (ReportQuery) getQueryObject().getQuery();
        m_jdbcTypes = new int[m_attributeCount];
       
        // try to get jdbcTypes from Query
        if (q.getJdbcTypes() != null)
        {
            m_jdbcTypes = q.getJdbcTypes();
        }
        else
        {
            ResultSetMetaData rsMetaData = getRsAndStmt().m_rs.getMetaData();
            for (int i = 0; i < m_attributeCount; i++)
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.query.ReportQuery

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.