Package org.apache.ojb.broker.metadata

Examples of org.apache.ojb.broker.metadata.FieldHelper


    /**
     * Appends to the statement the ORDER BY clause for the Query
     */
    protected void appendOrderByClause(List orderByFields, int[] orderByColumnNumbers, StringBuffer buf)
    {
        FieldHelper cf;

        if (orderByColumnNumbers == null)
        {
            return;
        }
View Full Code Here


    /**
     * Appends to the statement the GROUP BY clause for the Query
     */
    protected void appendGroupByClause(List groupByFields, StringBuffer buf)
    {
        FieldHelper cf;

        if (groupByFields == null || groupByFields.size() == 0)
        {
            return;
        }
View Full Code Here

     * @param existingColumns the list of column names (String) that are already appended
     * @return the array of column numbers (base 1)
     */
    protected int[] ensureColumns(List columns, List existingColumns, StringBuffer buf)
    {
        FieldHelper cf;
        int[] columnNumbers = new int[columns.size()];

        for (int i = 0; i < columnNumbers.length; i++)
        {
            cf = (FieldHelper) columns.get(i);
View Full Code Here

     */
    public void addOrderBy(String fieldName, boolean sortAscending)
    {
        if (fieldName != null)
        {
            _getOrderby().add(new FieldHelper(fieldName, sortAscending));
        }
    }
View Full Code Here

     */
    public void addGroupBy(String fieldName)
    {
        if (fieldName != null)
        {
            _getGroupby().add(new FieldHelper(fieldName, false));
        }
    }
View Full Code Here

     */
    public void addGroupBy(String fieldName)
    {
        if (fieldName != null)
        {
            m_groupby.add(new FieldHelper(fieldName, false));
        }
    }
View Full Code Here

     */
    public void addOrderBy(String fieldName, boolean sortAscending)
    {
        if (fieldName != null)
        {
            m_orderby.add(new FieldHelper(fieldName, sortAscending));
        }
    }
View Full Code Here

       
        Iterator iter = columns.iterator();

        while (iter.hasNext())
        {
            FieldHelper cf = (FieldHelper) iter.next();
            if (!existingColumns.contains(cf.name))
            {
                getAttributeInfo(cf.name, false, null, getQuery().getPathClasses());
            }
        }
View Full Code Here

        Iterator iter = columns.iterator();
        int ojb_col = existingColumns.size() + 1;

        while (iter.hasNext())
        {
            FieldHelper cf = (FieldHelper) iter.next();
            if (!existingColumns.contains(cf.name))
            {
                existingColumns.add(cf.name);
               
                buf.append(",");
View Full Code Here

        }
       
        buf.append(" ORDER BY ");
        for (int i = 0; i < orderByFields.size(); i++)
        {
            FieldHelper cf = (FieldHelper) orderByFields.get(i);
            int colNumber = selectedFields.indexOf(cf.name);
           
            if (i > 0)
            {
                buf.append(",");
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.metadata.FieldHelper

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.