Project Wonder 5.0

er.grouping
Class DRAttribute

java.lang.Object
  extended by er.grouping.DRAttribute
Direct Known Subclasses:
DRAttributeGroup

public class DRAttribute
extends java.lang.Object

DRAttributes are to display what EOAttributes are to the back-end. Each DRAttribute can be defined with:

  • 'keyPath' (what you want to ask the dictionary or EO)
  • 'label' (what you want to call the attribute for display)
  • a boolean for 'shouldTotal'
  • a boolean for 'shouldSort'
  • 'format' for formatting dates
  • a toggle turning a attribute into a group. Each group can have 0 or more DRAttributes within it.

    Author:
    david neumann

    Field Summary
    protected  DRAttributeGroup _attributeGroup
               
    protected  com.webobjects.foundation.NSArray _emptyArray
               
    protected  java.lang.String _format
               
    protected  boolean _isComputed
               
    protected  boolean _isGroup
               
    protected  boolean _isPlaceHolderTotal
               
    protected  boolean _isTotal
               
    protected  java.lang.String _keyPath
               
    protected  java.lang.String _label
               
    protected  boolean _shouldRestrictToFirstRow
               
    protected  boolean _shouldSort
               
    protected  boolean _shouldTotal
               
    protected  com.webobjects.foundation.NSDictionary _userInfo
               
     
    Constructor Summary
    DRAttribute()
               
    DRAttribute(DRAttributeGroup attributeGroup)
              Constructor with DRAttributeGroup.
    DRAttribute(java.lang.String keyPath, java.lang.String format, java.lang.String label, boolean shouldTotal, com.webobjects.foundation.NSDictionary userInfo)
              Constructor with parameters.
     
    Method Summary
     DRAttributeGroup attributeGroup()
               
     com.webobjects.foundation.NSMutableArray attributes()
               
     double computeFromRawRecords(com.webobjects.foundation.NSArray rawRecords)
               
     com.webobjects.foundation.NSArray flatAttributes()
               
     com.webobjects.foundation.NSArray flatAttributesTotal()
               
    protected  com.webobjects.foundation.NSArray flatAttributesWithDepthDictionary(int attributeListDepth, com.webobjects.foundation.NSMutableDictionary flatAttributeDepthDict)
               
     java.lang.String format()
               
     boolean isComputed()
               
     boolean isGroup()
               
     boolean isPlaceHolderTotal()
               
     java.lang.String keyPath()
               
     java.lang.String label()
               
     void resetDefaults()
               
     void setAttributeGroup(DRAttributeGroup attributeGroup)
               
     void setFormat(java.lang.String value)
               
     void setIsPlaceHolderTotal(boolean value)
               
     void setKeyPath(java.lang.String value)
               
     void setLabel(java.lang.String value)
               
     void setShouldRestrictToFirstRow(boolean value)
               
     void setShouldSort(boolean value)
               
     void setShouldTotal(boolean value)
               
     void setUserInfo(com.webobjects.foundation.NSDictionary value)
               
     boolean shouldRestrictToFirstRow()
               
     boolean shouldSort()
               
     boolean shouldTotal()
               
     boolean showTotal()
               
     java.lang.String toString()
               
     com.webobjects.foundation.NSDictionary userInfo()
               
    static DRAttribute withAttributeGroup(DRAttributeGroup attributeGroup)
              Creates a new DRAttributes from a DRAttributeGroup.
    static DRAttribute withKeyPathFormatLabelTotalUserInfo(java.lang.String keyPath, java.lang.String format, java.lang.String label, boolean shouldTotal, com.webobjects.foundation.NSDictionary userInfo)
              Creates a new DRAttribute from the supplied parmeters.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    _keyPath

    protected java.lang.String _keyPath

    _format

    protected java.lang.String _format

    _shouldTotal

    protected boolean _shouldTotal

    _shouldSort

    protected boolean _shouldSort

    _shouldRestrictToFirstRow

    protected boolean _shouldRestrictToFirstRow

    _isGroup

    protected boolean _isGroup

    _label

    protected java.lang.String _label

    _userInfo

    protected com.webobjects.foundation.NSDictionary _userInfo

    _attributeGroup

    protected DRAttributeGroup _attributeGroup

    _isPlaceHolderTotal

    protected boolean _isPlaceHolderTotal

    _isTotal

    protected boolean _isTotal

    _isComputed

    protected boolean _isComputed

    _emptyArray

    protected com.webobjects.foundation.NSArray _emptyArray
    Constructor Detail

    DRAttribute

    public DRAttribute(java.lang.String keyPath,
                       java.lang.String format,
                       java.lang.String label,
                       boolean shouldTotal,
                       com.webobjects.foundation.NSDictionary userInfo)
    Constructor with parameters.

    Parameters:
    keyPath -
    format -
    label -
    shouldTotal -
    userInfo -

    DRAttribute

    public DRAttribute(DRAttributeGroup attributeGroup)
    Constructor with DRAttributeGroup.

    Parameters:
    attributeGroup -

    DRAttribute

    public DRAttribute()
    Method Detail

    withAttributeGroup

    public static DRAttribute withAttributeGroup(DRAttributeGroup attributeGroup)
    Creates a new DRAttributes from a DRAttributeGroup.

    Parameters:
    attributeGroup -

    withKeyPathFormatLabelTotalUserInfo

    public static DRAttribute withKeyPathFormatLabelTotalUserInfo(java.lang.String keyPath,
                                                                  java.lang.String format,
                                                                  java.lang.String label,
                                                                  boolean shouldTotal,
                                                                  com.webobjects.foundation.NSDictionary userInfo)
    Creates a new DRAttribute from the supplied parmeters.

    Parameters:
    keyPath -
    format -
    label -
    shouldTotal -
    userInfo -

    resetDefaults

    public void resetDefaults()

    keyPath

    public java.lang.String keyPath()

    setKeyPath

    public void setKeyPath(java.lang.String value)

    format

    public java.lang.String format()

    setFormat

    public void setFormat(java.lang.String value)

    showTotal

    public boolean showTotal()

    shouldTotal

    public boolean shouldTotal()

    setShouldTotal

    public void setShouldTotal(boolean value)

    shouldSort

    public boolean shouldSort()

    setShouldSort

    public void setShouldSort(boolean value)

    shouldRestrictToFirstRow

    public boolean shouldRestrictToFirstRow()

    setShouldRestrictToFirstRow

    public void setShouldRestrictToFirstRow(boolean value)

    label

    public java.lang.String label()

    setLabel

    public void setLabel(java.lang.String value)

    userInfo

    public com.webobjects.foundation.NSDictionary userInfo()

    setUserInfo

    public void setUserInfo(com.webobjects.foundation.NSDictionary value)

    isGroup

    public boolean isGroup()

    attributes

    public com.webobjects.foundation.NSMutableArray attributes()

    flatAttributes

    public com.webobjects.foundation.NSArray flatAttributes()

    flatAttributesTotal

    public com.webobjects.foundation.NSArray flatAttributesTotal()

    flatAttributesWithDepthDictionary

    protected com.webobjects.foundation.NSArray flatAttributesWithDepthDictionary(int attributeListDepth,
                                                                                  com.webobjects.foundation.NSMutableDictionary flatAttributeDepthDict)

    setAttributeGroup

    public void setAttributeGroup(DRAttributeGroup attributeGroup)

    attributeGroup

    public DRAttributeGroup attributeGroup()

    isPlaceHolderTotal

    public boolean isPlaceHolderTotal()

    setIsPlaceHolderTotal

    public void setIsPlaceHolderTotal(boolean value)

    isComputed

    public boolean isComputed()

    toString

    public java.lang.String toString()
    Overrides:
    toString in class java.lang.Object

    computeFromRawRecords

    public double computeFromRawRecords(com.webobjects.foundation.NSArray rawRecords)

    Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

    Copyright © 2002 – 2007 Project Wonder.