|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.site.content.Localized
org.torweg.pulse.site.content.filter.FilterRule
@Entity public class FilterRule
a FilterRule is part of a Filter.
Each FilterRule has a set of FilterRuleProperty. These
properties are associated with Content by the Filter to allow
filtering.
| Constructor Summary | |
|---|---|
protected |
FilterRule()
Deprecated. |
|
FilterRule(java.lang.String n)
constructs a new FilterRule with the given name. |
| Method Summary | |
|---|---|
boolean |
addProperty(FilterRuleProperty p)
adds a FilterRuleProperty to the FilterRule. |
void |
addProperty(int index, FilterRuleProperty p)
adds a new FilterMatches at the given index. |
void |
clearProperties()
clears all properties. |
int |
compareTo(FilterRule r)
returns the result of the comparison. |
boolean |
contains(FilterRuleProperty p)
returns whether the FilterRule contains the given FilterRuleProperty. |
org.jdom.Element |
deserializeToJDOM()
returns a JDOM representation of the FilterRule. |
boolean |
equals(java.lang.Object o)
returns whether the given Object is equal to the FilterRule. |
Filter |
getFilter()
returns the Filter the rule belongs to. |
java.util.List<FilterRuleProperty> |
getProperties()
|
int |
hashCode()
returns the int value of the id or super.hashCode(), if the id is
still null. |
boolean |
isEmpty()
returns whether the rule does not contain properties. |
boolean |
remove(FilterRuleProperty p)
removes the given FilterRuleProperty from the FilterRule. |
FilterRuleProperty |
removeProperty(int index)
removes the FilterRuleProperty at the given index. |
protected void |
setFilter(Filter f)
sets the Filter the rule belongs to. |
FilterRuleProperty |
setProperty(int index, FilterRuleProperty p)
sets the given FilterRuleProperty at the given index. |
int |
size()
returns the number of FilterRuleProperties contained in the
FilterRule. |
| Methods inherited from class org.torweg.pulse.site.content.Localized |
|---|
getId, getLocalization, getLocalization, getLocalizations, getName, putLocalization, removeLocalization, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated protected FilterRule()
public FilterRule(java.lang.String n)
FilterRule with the given name.
n - the name of the rule| Method Detail |
|---|
public final Filter getFilter()
Filter the rule belongs to.
Filter the rule belongs toprotected final void setFilter(Filter f)
Filter the rule belongs to.
f - the filter to setpublic final java.util.List<FilterRuleProperty> getProperties()
public final boolean addProperty(FilterRuleProperty p)
FilterRuleProperty to the FilterRule.
p - the property to add
true, if the property has been addedList.add(java.lang.Object)public final void addProperty(int index, FilterRuleProperty p)
FilterMatches at the given index.
index - the indexp - the property to addList.add(int, java.lang.Object)public final FilterRuleProperty setProperty(int index, FilterRuleProperty p)
FilterRuleProperty at the given index.
index - the indexp - the property to be set
List.set(int, java.lang.Object)public final void clearProperties()
List.clear()public final boolean contains(FilterRuleProperty p)
FilterRule contains the given FilterRuleProperty.
p - the property to look for
true, if the property has been foundList.contains(java.lang.Object)public final boolean isEmpty()
true, if the rule has no propertiesList.isEmpty()public final boolean remove(FilterRuleProperty p)
FilterRuleProperty from the FilterRule.
p - the property to be removed
true, if the property has been removedList.remove(java.lang.Object)public final FilterRuleProperty removeProperty(int index)
FilterRuleProperty at the given index.
index - the index
List.remove(int)public final int size()
FilterRuleProperties contained in the
FilterRule.
FilterRuleProperties contained in the
FilterRuleList.size()public final int hashCode()
super.hashCode(), if the id is
still null.
hashCode in class java.lang.Objectsuper.hashCode(), if the id is
still nullObject.hashCode()public final boolean equals(java.lang.Object o)
Object is equal to the FilterRule.
equals in class java.lang.Objecto - the object to compare with
true, if the given object is a FilterRule and the
result of compareTo(FilterRule) is 0public final int compareTo(FilterRule r)
If both rules have been persisted, the rule's ids are compared. Otherwise the hash codes are compared.
compareTo in interface java.lang.Comparable<FilterRule>r - the rule to compare to
Comparable.compareTo(Object)public org.jdom.Element deserializeToJDOM()
FilterRule.
deserializeToJDOM in interface JDOMableFilterRule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||