|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.dataselectors.filters.DefaultFilterCondition
public class DefaultFilterCondition
The DefaultFilterCondition is the default implementation of the interface FilterConditionInterface.
Field Summary | |
---|---|
protected boolean |
_allowSelected
|
protected boolean |
_allowTyped
|
protected int |
_argumentCount
|
protected java.util.List |
_argumentLabels
|
protected java.lang.String |
_conditionLabel
|
protected java.lang.String |
_conditionMessageFormat
|
protected java.lang.Object |
_conditionObject
|
protected boolean |
_isConditionObjectNegated
|
static FilterConditionInterface |
IS_AFTER
|
static FilterConditionInterface |
IS_AFTER_OR_EQUAL
|
static FilterConditionInterface |
IS_BEFORE
|
static FilterConditionInterface |
IS_BEFORE_OR_EQUAL
|
static FilterConditionInterface |
IS_BETWEEN
The "is in between" filter condition. |
static FilterConditionInterface |
IS_EQUALS
The "is equal to" filter condition. |
static FilterConditionInterface |
IS_GREATER_THAN
The "is greater than" filter condition. |
static FilterConditionInterface |
IS_GREATER_THAN_OR_EQUAL
The "is greater than or equal to" filter condition. |
static FilterConditionInterface |
IS_IN_LIST
The "is in list" filter condition. |
static FilterConditionInterface |
IS_LESS_THAN
The "is less than" filter condition. |
static FilterConditionInterface |
IS_LESS_THAN_OR_EQUAL
The "is less than or equal to" filter condition. |
static FilterConditionInterface |
IS_MISSING_VALUE
The "is missing value" filter condition. |
static FilterConditionInterface |
IS_NOT_BETWEEN
The "is not in between" filter condition. |
static FilterConditionInterface |
IS_NOT_EQUALS
The "is not equal to" filter condition. |
static FilterConditionInterface |
IS_NOT_IN_LIST
The "is not in list" filter condition. |
static FilterConditionInterface |
IS_NOT_MISSING_VALUE
The "is not missing value" filter condition. |
static FilterConditionInterface |
IS_NOT_NULL
The "is not null" filter condition. |
static FilterConditionInterface |
IS_NULL
The "is null" filter condition. |
static java.lang.String |
RB_KEY
The prefix used for resource properties associated with this class. |
Constructor Summary | |
---|---|
DefaultFilterCondition()
Creates a new DefaultFilterCondition instance with only the default values. |
|
DefaultFilterCondition(FilterConditionInterface conditionToCopy)
Constructs a new instance that is a copy of the given condition. |
|
DefaultFilterCondition(FilterConditionInterface conditionToCopy,
java.lang.Object newConditionObject,
boolean isNegated)
Constructs a new instance that is a copy of the given condition but with the additional specified properties. |
|
DefaultFilterCondition(java.lang.String label,
java.lang.String format,
int parmCount,
java.lang.String[] parmLabels)
Constructs a new instance from the given properties. |
|
DefaultFilterCondition(java.lang.String label,
java.lang.String format,
int parmCount,
java.lang.String[] parmLabels,
java.lang.Object conditionObject)
Constructs a new instance from the given properties. |
|
DefaultFilterCondition(java.lang.String label,
java.lang.String format,
int parmCount,
java.lang.String[] parmLabels,
java.lang.Object conditionObject,
boolean isConditionObjectNegated)
Constructs a new instance from the given properties. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
static java.lang.String |
format(FilterItemInterface item,
FilterConditionInterface condition,
java.util.List values)
Static function to format a condition using a simple message format. |
static java.lang.String |
format(java.lang.String item,
FilterConditionInterface condition,
java.util.List values)
|
static java.lang.String |
format(java.lang.String item,
FilterConditionInterface condition,
java.util.List values,
java.text.Format formatter)
Static function to format a condition using a simple message format. |
java.lang.String |
format(java.lang.String item,
java.util.List values)
Formats this condition using its message format and the given arguments. |
java.lang.Object |
getCondition()
Returns the native condition object this object represents. |
int |
getConditionArgumentCount()
Returns the number of parameters required to fulfill this condition. |
java.lang.String |
getConditionArgumentLabel(int index)
Gets the label for the condition parameter at the given index. |
java.lang.String[] |
getConditionArgumentLabels()
Returns the individual labels for each parameter required by this condition. |
static FilterConditionInterface |
getConditionFromRB(java.lang.String key)
Creates a new FilterConditionInterface object based on the values found in the resources for this package at the given key. |
static FilterConditionInterface |
getConditionFromRB(java.lang.String key,
java.lang.Object conditionObject,
boolean isNegated)
Creates a new FilterConditionInterface object based on the given values and those found in the resources for this package at the given key. |
static FilterConditionInterface |
getConditionFromRB(java.lang.String key,
java.lang.Object conditionObject,
boolean isNegated,
java.util.Locale locale)
|
java.lang.String |
getConditionLabel()
Returns the text to use when displaying this condition to a user. |
java.lang.String |
getConditionLabel(java.util.Locale locale)
Returns the text to use when displaying this condition to a user. |
java.lang.String |
getConditionMessageFormat()
Returns the condition message format used by this condition. |
boolean |
isConditionObjectNegated()
Should the normal meaning of the condition object be negated when evaluated |
boolean |
isExpressionValueAllowed()
Returns TRUE if users are allowed to edit value expressions, false otherwise. |
boolean |
isPromptValueAllowed()
Returns TRUE if users are allowed to create a prompt value, false otherwise. |
boolean |
isUserValueAllowed()
Returns TRUE if users are allowed to specify their own values, false otherwise. |
boolean |
isValueListAllowed()
Returns TRUE if users are allowed to select a value from a list (if the list is available). |
void |
setCondition(java.lang.Object conditionObject)
Specifies the native condition object this object should represent. |
void |
setConditionArgumentCount(int argumentCount)
Sets the number of parameters required to fulfill this condition. |
void |
setConditionArgumentLabels(java.lang.String[] argumentLabels)
Sets the individual labels for the parameters required by this condition. |
void |
setConditionLabel(java.lang.String conditionLabel)
Sets the text to use when displaying this condition to a user. |
void |
setConditionMessageFormat(java.lang.String messageFormat)
Sets the condition message format used by this condition. |
void |
setConditionObjectNegated(boolean isConditionObjectNegated)
Sets the boolean flag used to specify if the normal meaning of the condition object be negated when evaluated. |
void |
setLocale(java.util.Locale locale)
Sets the locale for this condition, used when returning the condition label. |
void |
setUserValueAllowed(boolean value)
Sets the flag to specify whether a user defined value can be given to satisfy this condition. |
void |
setValueListAllowed(boolean value)
Sets the flag to specify whether a pick list should be presented when one is available. |
java.lang.String |
toString()
Gives the text representation of this condition. |
Field Detail |
---|
public static final java.lang.String RB_KEY
protected transient java.lang.Object _conditionObject
protected transient java.lang.String _conditionLabel
protected transient int _argumentCount
protected transient java.util.List _argumentLabels
protected transient java.lang.String _conditionMessageFormat
protected transient boolean _isConditionObjectNegated
protected transient boolean _allowTyped
protected transient boolean _allowSelected
public static final FilterConditionInterface IS_EQUALS
public static final FilterConditionInterface IS_NOT_EQUALS
public static final FilterConditionInterface IS_IN_LIST
public static final FilterConditionInterface IS_NOT_IN_LIST
public static final FilterConditionInterface IS_LESS_THAN
public static final FilterConditionInterface IS_LESS_THAN_OR_EQUAL
public static final FilterConditionInterface IS_GREATER_THAN
public static final FilterConditionInterface IS_GREATER_THAN_OR_EQUAL
public static final FilterConditionInterface IS_BETWEEN
public static final FilterConditionInterface IS_NOT_BETWEEN
public static final FilterConditionInterface IS_NULL
public static final FilterConditionInterface IS_NOT_NULL
public static final FilterConditionInterface IS_MISSING_VALUE
public static final FilterConditionInterface IS_NOT_MISSING_VALUE
public static final FilterConditionInterface IS_BEFORE
public static final FilterConditionInterface IS_BEFORE_OR_EQUAL
public static final FilterConditionInterface IS_AFTER
public static final FilterConditionInterface IS_AFTER_OR_EQUAL
Constructor Detail |
---|
public DefaultFilterCondition()
public DefaultFilterCondition(FilterConditionInterface conditionToCopy)
conditionToCopy
- the FilterConditionInterface instance to copypublic DefaultFilterCondition(FilterConditionInterface conditionToCopy, java.lang.Object newConditionObject, boolean isNegated)
conditionToCopy
- the FilterConditionInterface instance to copynewConditionObject
- the new native condition object this instance should representisNegated
- the boolean flag to specify if this condition is negatedpublic DefaultFilterCondition(java.lang.String label, java.lang.String format, int parmCount, java.lang.String[] parmLabels)
label
- the text to use when displaying this condition to a userformat
- the format describing how to represent this condition with parameters appliedparmCount
- the number of parameters required to fulfill this conditionparmLabels
- the individual labels for each parameterpublic DefaultFilterCondition(java.lang.String label, java.lang.String format, int parmCount, java.lang.String[] parmLabels, java.lang.Object conditionObject)
label
- the text to use when displaying this condition to a userformat
- the format describing how to represent this condition with parameters appliedparmCount
- the number of parameters required to fulfill this conditionparmLabels
- the individual labels for each parameterconditionObject
- the native condition object this instance should representpublic DefaultFilterCondition(java.lang.String label, java.lang.String format, int parmCount, java.lang.String[] parmLabels, java.lang.Object conditionObject, boolean isConditionObjectNegated)
label
- the text to use when displaying this condition to a userformat
- the format describing how to represent this condition with parameters appliedparmCount
- the number of parameters required to fulfill this conditionparmLabels
- the individual labels for each parameterconditionObject
- the native condition object this instance should representisConditionObjectNegated
- the boolean flag to specify if this condition is negatedMethod Detail |
---|
public boolean isConditionObjectNegated()
isConditionObjectNegated
in interface FilterConditionInterface
public void setConditionObjectNegated(boolean isConditionObjectNegated)
isConditionObjectNegated
- specify TRUE if this condition should be negated
when evaluatedpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.Object getCondition()
getCondition
in interface FilterConditionInterface
public void setCondition(java.lang.Object conditionObject)
conditionObject
- the native condition objectpublic java.lang.String getConditionLabel()
getConditionLabel
in interface FilterConditionInterface
public java.lang.String getConditionLabel(java.util.Locale locale)
getConditionLabel
in interface FilterConditionInterface
public void setConditionLabel(java.lang.String conditionLabel)
conditionLabel
- the text label for this conditionpublic int getConditionArgumentCount()
getConditionArgumentCount
in interface FilterConditionInterface
public void setConditionArgumentCount(int argumentCount)
argumentCount
- the number of parameters required by this conditionpublic java.lang.String[] getConditionArgumentLabels()
getConditionArgumentLabels
in interface FilterConditionInterface
public java.lang.String getConditionArgumentLabel(int index)
getConditionArgumentLabel
in interface FilterConditionInterface
index
- the index of the condition parameter
public void setConditionArgumentLabels(java.lang.String[] argumentLabels)
argumentLabels
- the new labels to usepublic java.lang.String getConditionMessageFormat()
getConditionMessageFormat
in interface FilterConditionInterface
public void setConditionMessageFormat(java.lang.String messageFormat)
setConditionMessageFormat
in interface FilterConditionInterface
public java.lang.String format(java.lang.String item, java.util.List values)
format
in interface FilterConditionInterface
item
- the text intended for the left-hand-side of the conditional expressionvalues
- the list of values intended for the right-hand-side of the conditional expression
public static java.lang.String format(FilterItemInterface item, FilterConditionInterface condition, java.util.List values)
item
- the FilterItemInterface to derive the item text fromcondition
- the condition object to derive the format fromvalues
- the list of values intended for the right-hand-side of the conditional expression
public static java.lang.String format(java.lang.String item, FilterConditionInterface condition, java.util.List values)
public static java.lang.String format(java.lang.String item, FilterConditionInterface condition, java.util.List values, java.text.Format formatter)
item
- the text intended for the left-hand-side of the conditional expressioncondition
- the condition object to derive the format fromvalues
- the list of values intended for the right-hand-side of the conditional expression
public static FilterConditionInterface getConditionFromRB(java.lang.String key)
key
- the key in the resource bundle for this package for the property containing
the visual text and condition parameters.
public static FilterConditionInterface getConditionFromRB(java.lang.String key, java.lang.Object conditionObject, boolean isNegated)
key
- the key in the resource bundle for this package for the property containing
the visual text and condition parameters.conditionObject
- the native object the new condition object will representisNegated
- a boolean flag to indicate whether this condition is negated
public static FilterConditionInterface getConditionFromRB(java.lang.String key, java.lang.Object conditionObject, boolean isNegated, java.util.Locale locale)
public void setValueListAllowed(boolean value)
value
- public void setUserValueAllowed(boolean value)
public boolean isUserValueAllowed()
isUserValueAllowed
in interface FilterConditionInterface
public boolean isValueListAllowed()
isValueListAllowed
in interface FilterConditionInterface
public boolean isExpressionValueAllowed()
isExpressionValueAllowed
in interface FilterConditionInterface
public boolean isPromptValueAllowed()
isPromptValueAllowed
in interface FilterConditionInterface
public void setLocale(java.util.Locale locale)
setLocale
in interface FilterConditionInterface
locale
- the new locale for this condition
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |