|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecter.grouping.DRSubMasterCriteria
public class DRSubMasterCriteria
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 |
---|
protected static final org.apache.log4j.Logger log
protected boolean _useMethod
protected java.lang.String _key
protected boolean _useTimeFormat
protected static final com.webobjects.foundation.NSArray _possibleUseTypes
protected java.lang.String _format
protected boolean _groupEdges
protected com.webobjects.foundation.NSArray _rawPossibleValues
protected com.webobjects.foundation.NSMutableArray _possibleValues
protected double _periodicDelta
protected java.lang.String _possibleValuesUseType
protected boolean _isPreset
protected boolean _isPeriodic
protected boolean _mustSearchForLookup
protected com.webobjects.foundation.NSDictionary _presetLookupDict
protected com.webobjects.foundation.NSSelector _selKey
protected boolean _nonNumberOrDate
protected java.lang.String _label
Constructor Detail |
---|
public DRSubMasterCriteria(com.webobjects.foundation.NSDictionary smcdict, com.webobjects.foundation.NSArray apossibleValues)
NSDictionary
which defines the properties.
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)
public DRSubMasterCriteria()
Method Detail |
---|
public static DRSubMasterCriteria withDefinitionDictionaryPossibleValues(com.webobjects.foundation.NSDictionary smcdict, com.webobjects.foundation.NSArray apossibleValues)
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)
public com.webobjects.foundation.NSMutableArray possibleRangeValuesFromRawValues(com.webobjects.foundation.NSArray rawPossVals)
public java.lang.String label()
public com.webobjects.foundation.NSDictionary buildPresetLookupDict()
public boolean nonNumberOrDate()
public boolean useMethod()
public void setUseMethod(boolean v)
public boolean useTimeFormat()
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()
.
public void setUseTimeFormat(boolean v)
public boolean groupEdges()
possibleValues()
are also grouped.
If they are, then they fall into a special High and Low bucket.
public void setGroupEdges(boolean v)
public java.lang.String key()
public void setKey(java.lang.String v)
public java.lang.String format()
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.
public void setFormat(java.lang.String v)
protected boolean usePeriodic()
protected boolean useRange()
protected boolean usePredefined()
public java.lang.String possibleValuesUseType()
public void setPossibleValuesUseType(java.lang.String v)
public com.webobjects.foundation.NSArray rawPossibleValues()
public void setRawPossibleValues(com.webobjects.foundation.NSArray arr)
public com.webobjects.foundation.NSArray possibleValues()
public boolean isPreset()
public boolean isPeriodic()
public boolean mustSearchForLookup()
public com.webobjects.foundation.NSDictionary valDictMaxMin(java.lang.Object highVal, java.lang.Object lowVal)
public com.webobjects.foundation.NSMutableArray possibleValuesToUse()
public com.webobjects.foundation.NSDictionary valDictFromSearchForLookup(java.lang.Object aval)
protected java.lang.Object newWithDelta(java.lang.Object val, double delta)
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.
public java.lang.Object valueForRecord(DRRecord rec)
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.
public java.lang.Object lookUpValueForRecord(DRRecord rec)
public java.lang.String lookUpKeyForValue(java.lang.Object aVal)
NSTimestamp
,
useTimeFormat()
is set and format()
is a valid date format, the formatted value will returned.
public com.webobjects.foundation.NSArray possibleUseTypes()
public java.lang.String keyDesc()
key
.
public java.lang.String toString()
toString
in class java.lang.Object
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |