Project Wonder 5.0

er.grouping
Class DRSubMasterCriteria

java.lang.Object
  extended by er.grouping.DRSubMasterCriteria

public class DRSubMasterCriteria
extends java.lang.Object

Defines the specifics of a DRMasterCriteria. How to retrieve the values, how to convert them into values that can be grouped and how to group them into a set of ranges, if required.


Field Summary
protected  java.lang.String _format
           
protected  boolean _groupEdges
           
protected  boolean _isPeriodic
           
protected  boolean _isPreset
           
protected  java.lang.String _key
           
protected  java.lang.String _label
           
protected  boolean _mustSearchForLookup
           
protected  boolean _nonNumberOrDate
           
protected  double _periodicDelta
           
protected static com.webobjects.foundation.NSArray _possibleUseTypes
          Defines the array of possible groupings.
protected  com.webobjects.foundation.NSMutableArray _possibleValues
           
protected  java.lang.String _possibleValuesUseType
           
protected  com.webobjects.foundation.NSDictionary _presetLookupDict
           
protected  com.webobjects.foundation.NSArray _rawPossibleValues
           
protected  com.webobjects.foundation.NSSelector _selKey
           
protected  boolean _useMethod
           
protected  boolean _useTimeFormat
           
protected static org.apache.log4j.Logger log
          Logging support
 
Constructor Summary
DRSubMasterCriteria()
           
DRSubMasterCriteria(com.webobjects.foundation.NSDictionary smcdict, com.webobjects.foundation.NSArray apossibleValues)
          Contructor that uses a NSDictionary which defines the properties.
DRSubMasterCriteria(java.lang.String akey, boolean auseMethod, boolean auseTimeFormat, java.lang.String aformat, java.lang.String apossibleValuesUseType, boolean agroupEdges, com.webobjects.foundation.NSArray apossibleValues)
           
 
Method Summary
 com.webobjects.foundation.NSDictionary buildPresetLookupDict()
           
 java.lang.String format()
          When useTimeFormat() is set, then date values will be converted to a string before a comparison by using this format.
 boolean groupEdges()
          Defines if the values not falling into the possibleValues() are also grouped.
 boolean isPeriodic()
           
 boolean isPreset()
           
 java.lang.String key()
          The key used for retrieving values from the records by.
 java.lang.String keyDesc()
          Returns the description for the key.
 java.lang.String label()
           
 java.lang.String lookUpKeyForValue(java.lang.Object aVal)
          Converts a given object to a grouping value.
 java.lang.Object lookUpValueForRecord(DRRecord rec)
           
 boolean mustSearchForLookup()
           
protected  java.lang.Object newWithDelta(java.lang.Object val, double delta)
          Returns a new value by adding a delta to it.
 boolean nonNumberOrDate()
           
 com.webobjects.foundation.NSMutableArray possibleRangeValuesFromRawValues(com.webobjects.foundation.NSArray rawPossVals)
           
 com.webobjects.foundation.NSArray possibleUseTypes()
          Returns the array of possible use types.
 com.webobjects.foundation.NSArray possibleValues()
           
 com.webobjects.foundation.NSMutableArray possibleValuesToUse()
           
 java.lang.String possibleValuesUseType()
           
 com.webobjects.foundation.NSArray rawPossibleValues()
           
 void setFormat(java.lang.String v)
           
 void setGroupEdges(boolean v)
           
 void setKey(java.lang.String v)
           
 void setPossibleValuesUseType(java.lang.String v)
           
 void setRawPossibleValues(com.webobjects.foundation.NSArray arr)
           
 void setUseMethod(boolean v)
           
 void setUseTimeFormat(boolean v)
           
 java.lang.String toString()
           
 boolean useMethod()
          Decides if the extration is by method or instance variable.
protected  boolean usePeriodic()
           
protected  boolean usePredefined()
           
protected  boolean useRange()
           
 boolean useTimeFormat()
          Decides if the format() given is used to convert dates into strings before comparison or just compare NSTimestamp.
 com.webobjects.foundation.NSDictionary valDictFromSearchForLookup(java.lang.Object aval)
          Will test inbetween'ness, will create new groups for periodics
 com.webobjects.foundation.NSDictionary valDictMaxMin(java.lang.Object highVal, java.lang.Object lowVal)
           
 java.lang.Object valueForRecord(DRRecord rec)
          Returns the value for the given record.
static DRSubMasterCriteria withDefinitionDictionaryPossibleValues(com.webobjects.foundation.NSDictionary smcdict, com.webobjects.foundation.NSArray apossibleValues)
           
static DRSubMasterCriteria withKeyUseMethodUseTimeFormatFormatPossibleValuesUseTypeGroupEdgesPossibleValues(java.lang.String akey, boolean auseMethod, boolean auseTimeFormat, java.lang.String aformat, java.lang.String apossibleValuesUseType, boolean agroupEdges, com.webobjects.foundation.NSArray apossibleValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Logging support


_useMethod

protected boolean _useMethod

_key

protected java.lang.String _key

_useTimeFormat

protected boolean _useTimeFormat

_possibleUseTypes

protected static final com.webobjects.foundation.NSArray _possibleUseTypes
Defines the array of possible groupings.


_format

protected java.lang.String _format

_groupEdges

protected boolean _groupEdges

_rawPossibleValues

protected com.webobjects.foundation.NSArray _rawPossibleValues

_possibleValues

protected com.webobjects.foundation.NSMutableArray _possibleValues

_periodicDelta

protected double _periodicDelta

_possibleValuesUseType

protected java.lang.String _possibleValuesUseType

_isPreset

protected boolean _isPreset

_isPeriodic

protected boolean _isPeriodic

_mustSearchForLookup

protected boolean _mustSearchForLookup

_presetLookupDict

protected com.webobjects.foundation.NSDictionary _presetLookupDict

_selKey

protected com.webobjects.foundation.NSSelector _selKey

_nonNumberOrDate

protected boolean _nonNumberOrDate

_label

protected java.lang.String _label
Constructor Detail

DRSubMasterCriteria

public DRSubMasterCriteria(com.webobjects.foundation.NSDictionary smcdict,
                           com.webobjects.foundation.NSArray apossibleValues)
Contructor that uses a NSDictionary which defines the properties.


DRSubMasterCriteria

public DRSubMasterCriteria(java.lang.String akey,
                           boolean auseMethod,
                           boolean auseTimeFormat,
                           java.lang.String aformat,
                           java.lang.String apossibleValuesUseType,
                           boolean agroupEdges,
                           com.webobjects.foundation.NSArray apossibleValues)

DRSubMasterCriteria

public DRSubMasterCriteria()
Method Detail

withDefinitionDictionaryPossibleValues

public static DRSubMasterCriteria withDefinitionDictionaryPossibleValues(com.webobjects.foundation.NSDictionary smcdict,
                                                                         com.webobjects.foundation.NSArray apossibleValues)

withKeyUseMethodUseTimeFormatFormatPossibleValuesUseTypeGroupEdgesPossibleValues

public static DRSubMasterCriteria withKeyUseMethodUseTimeFormatFormatPossibleValuesUseTypeGroupEdgesPossibleValues(java.lang.String akey,
                                                                                                                   boolean auseMethod,
                                                                                                                   boolean auseTimeFormat,
                                                                                                                   java.lang.String aformat,
                                                                                                                   java.lang.String apossibleValuesUseType,
                                                                                                                   boolean agroupEdges,
                                                                                                                   com.webobjects.foundation.NSArray apossibleValues)

possibleRangeValuesFromRawValues

public com.webobjects.foundation.NSMutableArray possibleRangeValuesFromRawValues(com.webobjects.foundation.NSArray rawPossVals)

label

public java.lang.String label()

buildPresetLookupDict

public com.webobjects.foundation.NSDictionary buildPresetLookupDict()

nonNumberOrDate

public boolean nonNumberOrDate()

useMethod

public boolean useMethod()
Decides if the extration is by method or instance variable. If this returns true, then only methods will be used to extract values from the raw objects, not their instance variables.


setUseMethod

public void setUseMethod(boolean v)

useTimeFormat

public boolean useTimeFormat()
Decides if the format() given is used to convert dates into strings before comparison or just compare NSTimestamp. If you set this, you should also set a valid NSTimestampFormatter pattern in format().


setUseTimeFormat

public void setUseTimeFormat(boolean v)

groupEdges

public boolean groupEdges()
Defines if the values not falling into the possibleValues() are also grouped. If they are, then they fall into a special High and Low bucket.


setGroupEdges

public void setGroupEdges(boolean v)

key

public java.lang.String key()
The key used for retrieving values from the records by.


setKey

public void setKey(java.lang.String v)

format

public java.lang.String format()
When useTimeFormat() is set, then date values will be converted to a string before a comparison by using this format. The string can be any valid NSTimestampFormatter string, which means that you can also use java.util.DateFormatter patterns.


setFormat

public void setFormat(java.lang.String v)

usePeriodic

protected boolean usePeriodic()

useRange

protected boolean useRange()

usePredefined

protected boolean usePredefined()

possibleValuesUseType

public java.lang.String possibleValuesUseType()

setPossibleValuesUseType

public void setPossibleValuesUseType(java.lang.String v)

rawPossibleValues

public com.webobjects.foundation.NSArray rawPossibleValues()

setRawPossibleValues

public void setRawPossibleValues(com.webobjects.foundation.NSArray arr)

possibleValues

public com.webobjects.foundation.NSArray possibleValues()

isPreset

public boolean isPreset()

isPeriodic

public boolean isPeriodic()

mustSearchForLookup

public boolean mustSearchForLookup()

valDictMaxMin

public com.webobjects.foundation.NSDictionary valDictMaxMin(java.lang.Object highVal,
                                                            java.lang.Object lowVal)

possibleValuesToUse

public com.webobjects.foundation.NSMutableArray possibleValuesToUse()

valDictFromSearchForLookup

public com.webobjects.foundation.NSDictionary valDictFromSearchForLookup(java.lang.Object aval)
Will test inbetween'ness, will create new groups for periodics


newWithDelta

protected java.lang.Object newWithDelta(java.lang.Object val,
                                        double delta)
Returns a new value by adding a delta to it. In case of a NSTimestamp, the delta will be seconds, in case of a Number, the delta is added as a double. Otherwise, a conversion to a double is attempted and the delta is added afterwards.


valueForRecord

public java.lang.Object valueForRecord(DRRecord rec)
Returns the value for the given record. If useMethod() is given, the method is called and no further action is taken if that fails. Otherwise we use NSKeyValueCoding which also considers instance variables.


lookUpValueForRecord

public java.lang.Object lookUpValueForRecord(DRRecord rec)

lookUpKeyForValue

public java.lang.String lookUpKeyForValue(java.lang.Object aVal)
Converts a given object to a grouping value. If case the value if a NSTimestamp, useTimeFormat() is set and format() is a valid date format, the formatted value will returned.


possibleUseTypes

public com.webobjects.foundation.NSArray possibleUseTypes()
Returns the array of possible use types.


keyDesc

public java.lang.String keyDesc()
Returns the description for the key.


toString

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

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

Copyright © 2002 – 2007 Project Wonder.