DRSubMasterCriteria Class Reference

Collaboration diagram for DRSubMasterCriteria:

Collaboration graph
[legend]

List of all members.

Public Member Functions

NSDictionary buildPresetLookupDict ()
 DRSubMasterCriteria ()
 DRSubMasterCriteria (String akey, boolean auseMethod, boolean auseTimeFormat, String aformat, String apossibleValuesUseType, boolean agroupEdges, NSArray apossibleValues)
 DRSubMasterCriteria (NSDictionary smcdict, NSArray apossibleValues)
String format ()
boolean groupEdges ()
boolean isPeriodic ()
boolean isPreset ()
String key ()
String keyDesc ()
String label ()
String lookUpKeyForValue (Object aVal)
Object lookUpValueForRecord (DRRecord rec)
boolean mustSearchForLookup ()
boolean nonNumberOrDate ()
NSMutableArray possibleRangeValuesFromRawValues (NSArray rawPossVals)
NSArray possibleUseTypes ()
NSArray possibleValues ()
NSMutableArray possibleValuesToUse ()
String possibleValuesUseType ()
NSArray rawPossibleValues ()
void setFormat (String v)
void setGroupEdges (boolean v)
void setKey (String v)
void setPossibleValuesUseType (String v)
void setRawPossibleValues (NSArray arr)
void setUseMethod (boolean v)
void setUseTimeFormat (boolean v)
String toString ()
boolean useMethod ()
boolean useTimeFormat ()
NSDictionary valDictFromSearchForLookup (Object aval)
NSDictionary valDictMaxMin (Object highVal, Object lowVal)
Object valueForRecord (DRRecord rec)

Static Public Member Functions

static DRSubMasterCriteria withDefinitionDictionaryPossibleValues (NSDictionary smcdict, NSArray apossibleValues)
static DRSubMasterCriteria withKeyUseMethodUseTimeFormatFormatPossibleValuesUseTypeGroupEdgesPossibleValues (String akey, boolean auseMethod, boolean auseTimeFormat, String aformat, String apossibleValuesUseType, boolean agroupEdges, NSArray apossibleValues)

Protected Member Functions

Object newWithDelta (Object val, double delta)
boolean usePeriodic ()
boolean usePredefined ()
boolean useRange ()

Protected Attributes

String _format
boolean _groupEdges
boolean _isPeriodic
boolean _isPreset
String _key
String _label
boolean _mustSearchForLookup
boolean _nonNumberOrDate
double _periodicDelta
NSMutableArray _possibleValues
String _possibleValuesUseType
NSDictionary _presetLookupDict
NSArray _rawPossibleValues
NSSelector _selKey
boolean _useMethod
boolean _useTimeFormat

Static Protected Attributes

static final NSArray _possibleUseTypes = new NSArray(new Object[]{"usePredefined" , "useRange" , "usePeriodic", "NONE"})
static final Logger log = Logger.getLogger(DRSubMasterCriteria.class)

Private Attributes

String _keyDesc = null


Detailed Description

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.

Constructor & Destructor Documentation

DRSubMasterCriteria ( NSDictionary  smcdict,
NSArray  apossibleValues 
)

Contructor that uses a NSDictionary which defines the properties.

DRSubMasterCriteria ( String  akey,
boolean  auseMethod,
boolean  auseTimeFormat,
String  aformat,
String  apossibleValuesUseType,
boolean  agroupEdges,
NSArray  apossibleValues 
)


Member Function Documentation

NSDictionary buildPresetLookupDict (  ) 

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.

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.

boolean isPeriodic (  ) 

boolean isPreset (  ) 

String key (  ) 

The key used for retrieving values from the records by.

String keyDesc (  ) 

Returns the description for the key.

String label (  ) 

String lookUpKeyForValue ( 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.

Object lookUpValueForRecord ( DRRecord  rec  ) 

boolean mustSearchForLookup (  ) 

Object newWithDelta ( Object  val,
double  delta 
) [protected]

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.

boolean nonNumberOrDate (  ) 

NSMutableArray possibleRangeValuesFromRawValues ( NSArray  rawPossVals  ) 

NSArray possibleUseTypes (  ) 

Returns the array of possible use types.

NSArray possibleValues (  ) 

NSMutableArray possibleValuesToUse (  ) 

String possibleValuesUseType (  ) 

NSArray rawPossibleValues (  ) 

void setFormat ( String  v  ) 

void setGroupEdges ( boolean  v  ) 

void setKey ( String  v  ) 

void setPossibleValuesUseType ( String  v  ) 

void setRawPossibleValues ( NSArray  arr  ) 

void setUseMethod ( boolean  v  ) 

void setUseTimeFormat ( boolean  v  ) 

String toString (  ) 

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.

boolean usePeriodic (  )  [protected]

boolean usePredefined (  )  [protected]

boolean useRange (  )  [protected]

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().

NSDictionary valDictFromSearchForLookup ( Object  aval  ) 

Will test inbetween'ness, will create new groups for periodics

NSDictionary valDictMaxMin ( Object  highVal,
Object  lowVal 
)

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.

static DRSubMasterCriteria withDefinitionDictionaryPossibleValues ( NSDictionary  smcdict,
NSArray  apossibleValues 
) [static]

static DRSubMasterCriteria withKeyUseMethodUseTimeFormatFormatPossibleValuesUseTypeGroupEdgesPossibleValues ( String  akey,
boolean  auseMethod,
boolean  auseTimeFormat,
String  aformat,
String  apossibleValuesUseType,
boolean  agroupEdges,
NSArray  apossibleValues 
) [static]


Member Data Documentation

String _format [protected]

boolean _groupEdges [protected]

boolean _isPeriodic [protected]

boolean _isPreset [protected]

String _key [protected]

String _keyDesc = null [private]

Holds the description for the key.

String _label [protected]

boolean _mustSearchForLookup [protected]

boolean _nonNumberOrDate [protected]

double _periodicDelta [protected]

final NSArray _possibleUseTypes = new NSArray(new Object[]{"usePredefined" , "useRange" , "usePeriodic", "NONE"}) [static, protected]

Defines the array of possible groupings.

NSDictionary _presetLookupDict [protected]

NSArray _rawPossibleValues [protected]

NSSelector _selKey [protected]

boolean _useMethod [protected]

boolean _useTimeFormat [protected]

final Logger log = Logger.getLogger(DRSubMasterCriteria.class) [static, protected]

Logging support


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:18 2012 for Project Wonder by  doxygen 1.5.8