Package org.apache.empire.data

Examples of org.apache.empire.data.ColumnExpr


        return null;
    }
   
    protected Column getColumn()
    {
        ColumnExpr column = getColumnExpr();
        if (column==null)
            return null;
        // Get Update Column
        return column.getSourceColumn();       
    }
View Full Code Here


        if (value==null && column!=null)
            value = column;
        // Find Record Value
        if (value instanceof ColumnExpr)
        {
            ColumnExpr column = ((ColumnExpr)value);
            if (rec!=null)
            {   // Find column by object first
                int index = rec.getFieldIndex(column);
                if (index<0)
                {   // Column not found. Trying name
                    log.debug("Column object '" + column.getName() + "' not found. Trying name.");
                    index = rec.getFieldIndex( column.getName());
                    if (index<0)
                    {   // Column not found 
                        log.error("Column '" + column.getName() + "' not found in record.");
                        return null;
                    }
                }
                // Get value from record
                return rec.getValue(index);
            }
            else
            {   // Check if Columns specifies a bean property
                Object bean = getBean();
                if (bean!=null)
                {   // Property Name
                    String prop = column.getBeanPropertyName();
                    return getBeanProperty(bean, prop);
                }
            }
            // Cannot find data source (record or bean) 
            // log.warn("No record supplied for column value");
View Full Code Here

    {
        // Add all Columns
        int count = 0;
        for (int i = 0; i < getFieldCount(); i++)
        { // Check Property
            ColumnExpr column = getColumnExpr(i);
            if (ignoreList != null && ignoreList.contains(column))
                continue; // ignore this property
            // Get Property Name
            String property = column.getBeanPropertyName();
            if (property!=null)
                getBeanProperty(bean, property, this.getValue(i));
            count++;
        }
        return count;
View Full Code Here

    private Options getLookupOptions()
    {
        if (lookup != null)
            return lookup;
        // Get List from Column
        ColumnExpr expr = getColumnExpr();
        if (expr!=null)
            return expr.getOptions();
        /*
        ColumnExpr expr = getColumnExpr();
        if (expr instanceof DBAliasExpr)
            expr = ((DBAliasExpr)expr).getExpr();
        // Check whether column expression is a Column
View Full Code Here

    public boolean getBeanProperties(Object bean, Collection<ColumnExpr> ignoreList)
    {
        // Add all Columns
        for (int i = 0; i < getFieldCount(); i++)
        { // Check Property
            ColumnExpr column = getColumnExpr(i);
            if (ignoreList != null && ignoreList.contains(column))
                continue; // ignore this property
            // Get Property Name
            String property = column.getBeanPropertyName();
            if (getBeanProperty(bean, property, this.getValue(i))==false)
            {   // Error setting property.
                return false;
            }
        }
View Full Code Here

    public boolean getBeanProperties(Object bean, Collection<ColumnExpr> ignoreList)
    {
        // Add all Columns
        for (int i = 0; i < getFieldCount(); i++)
        { // Check Property
            ColumnExpr column = getColumnExpr(i);
            if (ignoreList != null && ignoreList.contains(column))
                continue; // ignore this property
            // Get Property Name
            String property = column.getBeanPropertyName();
            if (getBeanProperty(bean, property, this.getValue(i))==false)
            {   // Error setting property.
                return false;
            }
        }
View Full Code Here

    private String getCssClass(TableRowTag.RowInfo ri)
    {
        if (this.cssClass!=null)
            return this.cssClass;
        // Check if current
        ColumnExpr column = getColumnExpr();
        if (ri.currentClass!=null && ri.currentColumn!=null && ri.currentColumn.equals(column))
            return ri.currentClass; // Current column
        // Return the columnClass
        return ri.columnClass;
    }
View Full Code Here

    private Options getLookupOptions()
    {
        if (lookup != null)
            return lookup;
        // Get List from Column
        ColumnExpr expr = getColumnExpr();
        if (expr!=null)
            return expr.getOptions();
        /*
        ColumnExpr expr = getColumnExpr();
        if (expr instanceof DBAliasExpr)
            expr = ((DBAliasExpr)expr).getExpr();
        // Check whether column expression is a Column
View Full Code Here

    public boolean getBeanProperties(Object bean, Collection<ColumnExpr> ignoreList)
    {
        // Add all Columns
        for (int i = 0; i < getFieldCount(); i++)
        { // Check Property
            ColumnExpr column = getColumnExpr(i);
            if (ignoreList != null && ignoreList.contains(column))
                continue; // ignore this property
            // Get Property Name
            String property = column.getBeanPropertyName();
            if (getBeanProperty(bean, property, this.getValue(i))==false)
            {   // Error setting property.
                return false;
            }
        }
View Full Code Here

        return null;
    }
   
    protected Column getColumn()
    {
        ColumnExpr column = getColumnExpr();
        if (column==null)
            return null;
        // Get Update Column
        return column.getSourceColumn();       
    }
View Full Code Here

TOP

Related Classes of org.apache.empire.data.ColumnExpr

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.