|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.info.LyTag
leon.info.LyInfo
leon.info.LyFilterExpression
public final class LyFilterExpression
The LyFilterExpression class implements the description of an elementary expression applied on
objects of the application. A filter expression is an expression of one elementary criterion.
Filters are like a 'tree' of sub-filters AND/OR, terminated by one or several filter expressions.
A complex condition (a filter) is a logical association of elementary conditions.
The structure of an elementary expression is :
See also tag
LyFilter
Nested Class Summary | |
---|---|
static class |
LyFilterExpression.Condition
Condition. |
Nested classes/interfaces inherited from class leon.info.LyTag |
---|
LyTag.Model |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static short |
MOD_CASE_SENSITIVE
Modifier case sensitive. |
static short |
MOD_MULTILINGUAL
Modifier for multilingual filtering. |
static short |
MOD_NOT_BY_NAME
Modifier not by name for relations. |
static short |
MOD_PEER_FILTER_ONLY
Modifier for a filter which applies only in peer connector. |
static short |
MOD_RAW
Modifier no accents. |
static int |
RECOMPUTE_DATE_DELAY
Recompute the _now and $xxx in filter expression every 'n' seconds. -1 means never, 0 always. |
Constructor Summary | |
---|---|
LyFilterExpression(LyFieldInfo fieldInfo,
boolean not,
LyFilterExpression.Condition condition,
java.lang.Object value)
Constructor of a filter expression. |
|
LyFilterExpression(LyFieldInfo fieldInfo,
boolean not,
LyFilterExpression.Condition condition,
java.lang.Object value,
java.util.BitSet modifiers)
Constructor of a filter expression. |
|
LyFilterExpression(LyFieldInfo fieldInfo,
LyFilterExpression.Condition condition,
java.lang.Object value)
Constructor of a filter expression (shortcut of the previous constructor with not set to false). |
|
LyFilterExpression(LyFieldInfo fieldInfo,
java.lang.Object value)
Constructor of a filter expression (shortcut of the main constructor with not set to false and condition set to Condition.EQUALS). |
|
LyFilterExpression(java.lang.String id,
LyFieldInfo fieldInfo,
boolean not,
LyFilterExpression.Condition condition,
java.lang.Object value,
java.util.BitSet modifiers)
Constructor of a filter expression. |
Method Summary | |
---|---|
LyFilterExpression |
cloneFilterExpression()
Clone this filter expression. |
java.lang.String |
dump()
Dumps this expression as a String. |
LyFilterExpression.Condition |
getCondition()
Gets the condition for the filter expression. |
static java.lang.String |
getCondition(LyFilterExpression.Condition condition)
Return the name corresponding to the specified condition. |
static LyFilterExpression.Condition |
getCondition(java.lang.String conditionName)
Return the condition corresponding to the given name. |
LyFieldInfo |
getFieldInfo()
Gets the fieldInfo on which this expression applies. |
LyValue |
getFieldValue()
Gets wrapped value. |
java.lang.Object |
getInitValue()
Gets the initial value of this filter expression The values such as "_now" are replaced using getValue() but not in getInitValue(). |
static java.lang.String |
getModifier(short modifier)
Return the name corresponding to the specified modifier. |
static short |
getModifier(java.lang.String modifierName)
Return the modifier corresponding to the given name. |
java.util.BitSet |
getModifiers()
Gets modifiers of the expression. |
java.lang.String |
getName()
Returns a displayable string of this expression. |
static java.lang.String |
getNotCondition(LyFilterExpression.Condition condition)
Return the name corresponding to the specified not condition. |
LyFilterExpression[] |
getPeerExpression()
|
java.lang.Object |
getValue()
Gets the value on which comparison occur. |
boolean |
hasModifier(short modifier)
Checks whether the expression has the given modifier set. |
boolean |
isCaseSensitive()
Check whether this expression is case sensitive or not. |
boolean |
isDynamic()
Checks if this filter expression is dynamic or not. |
boolean |
isInverted()
Check whether this expression is inverted or not. |
boolean |
match(LyValueSet values)
Indicates whether the specified values matches the filter expression. |
boolean |
match(java.lang.Object object)
Indicates whether the specified object matches the filter expression. |
void |
setCaseSensitive(boolean caseSensitive)
Sets whether this expression is case sensitive or not. |
void |
setFieldInfo(LyFieldInfo fieldInfo)
Sets the fieldInfo on which this expression applies. |
void |
setInverted(boolean not)
Set the inverted mode of this filter expression. |
void |
setModifier(short modifier)
Sets a modifier on this expression. |
java.lang.String |
toString(boolean name)
Dumps this expression as a String. |
void |
unsetModifier(short modifier)
Unsets a modifier on this expression. |
void |
writeXml(java.io.PrintWriter pw)
Writes XML corresponding to this filter element. |
Methods inherited from class leon.info.LyInfo |
---|
getAlias, getApplication, getFile, getId, getInclude, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString |
Methods inherited from class leon.info.LyTag |
---|
clone, getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.parser.LyCommentInterface |
---|
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final short MOD_CASE_SENSITIVE
public static final short MOD_RAW
public static final short MOD_NOT_BY_NAME
public static final short MOD_PEER_FILTER_ONLY
public static final short MOD_MULTILINGUAL
public static int RECOMPUTE_DATE_DELAY
Constructor Detail |
---|
public LyFilterExpression(java.lang.String id, LyFieldInfo fieldInfo, boolean not, LyFilterExpression.Condition condition, java.lang.Object value, java.util.BitSet modifiers)
id
- Id of the filter expression.fieldInfo
- FieldInfo on which this filter expression applies.not
- Inverts filter condition or not.condition
- Filter condition.value
- Value of this expression (may be null).modifiers
- List of modifiers (may be null). This value is an instance of the class
returned by the getValueClass method of LyFieldInfo.LyFieldInfo.getValueClass()
public LyFilterExpression(LyFieldInfo fieldInfo, boolean not, LyFilterExpression.Condition condition, java.lang.Object value, java.util.BitSet modifiers)
fieldInfo
- FieldInfo on which this filter expression applies.not
- Inverts filter condition or not.condition
- Filter condition.value
- Value of this expression (may be null).modifiers
- List of modifiers (may be null). This value is an instance of the class
returned by the getValueClass method of LyFieldInfo.LyFieldInfo.getValueClass()
public LyFilterExpression(LyFieldInfo fieldInfo, boolean not, LyFilterExpression.Condition condition, java.lang.Object value)
fieldInfo
- FieldInfo on which this filter expression applies.not
- Inverts filter condition or not.condition
- Filter condition.value
- Value of this expression (may be null). This value is an instance of the
class returned by the getValueClass method of LyFieldInfo.LyFieldInfo.getValueClass()
public LyFilterExpression(LyFieldInfo fieldInfo, LyFilterExpression.Condition condition, java.lang.Object value)
fieldInfo
- FieldInfo on which this filter expression applies.condition
- Filter condition.value
- Value of this expression (may be null).public LyFilterExpression(LyFieldInfo fieldInfo, java.lang.Object value)
fieldInfo
- FieldInfo on which this filter expression applies.value
- Value of this expression (may be null).Method Detail |
---|
public static java.lang.String getCondition(LyFilterExpression.Condition condition)
condition
- Condition (one of the Condition.XXX)
public static java.lang.String getNotCondition(LyFilterExpression.Condition condition)
condition
- Condition (one of the Condition.XXX)
public static LyFilterExpression.Condition getCondition(java.lang.String conditionName)
conditionName
- Untranslated name.
public static java.lang.String getModifier(short modifier)
modifier
- Modifier (one of the MOD_XXX)
public static short getModifier(java.lang.String modifierName)
modifierName
- Untranslated name.
public LyFilterExpression cloneFilterExpression()
public boolean match(java.lang.Object object)
match
in interface LyFilterElement
object
- Object which should be checked.
LyFilterElement.match(java.lang.Object)
public boolean match(LyValueSet values)
match
in interface LyFilterElement
values
- Values which should be checked.
LyFilterElement.match(java.lang.Object)
public java.lang.String dump()
public java.lang.String toString(boolean name)
name
- boolean indicating if names or strings are requested in result string.
public void writeXml(java.io.PrintWriter pw)
writeXml
in interface LyFilterElement
pw
- PrintWriter on which the XML is written.public java.lang.String getName()
getName
in interface LyFilterElement
getName
in class LyInfo
public LyFieldInfo getFieldInfo()
public LyFilterExpression.Condition getCondition()
public boolean isInverted()
public boolean isCaseSensitive()
public boolean hasModifier(short modifier)
modifier
- Modifier to set on the expression. See the MOD_XXX constants, default is
null (no modifier).
public java.lang.Object getValue()
public java.lang.Object getInitValue()
public LyValue getFieldValue()
public java.util.BitSet getModifiers()
public void setModifier(short modifier)
modifier
- Modifier to set on the expression. See the MOD_XXX constants, default is null
(no modifier).public void unsetModifier(short modifier)
modifier
- Modifier to unset on the expression. See the MOD_XXX constants, default is null
(no modifier).public void setCaseSensitive(boolean caseSensitive)
caseSensitive
- True is the expression is case sensitive, false otherwise.public void setFieldInfo(LyFieldInfo fieldInfo)
fieldInfo
- FieldInfo concerned by this filter expression.public void setInverted(boolean not)
not
- indicates whether this filter expression should be inverted or not.public boolean isDynamic()
public LyFilterExpression[] getPeerExpression()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |