Package org.bedework.calfacade
Class BwFilterDef
- All Implemented Interfaces:
Serializable,Comparable<BwFilterDef>,Comparator<BwFilterDef>,DescriptionEntity<BwLongString>,DisplayNameEntity,OwnedEntity,ShareableEntity,org.bedework.util.logging.Logged
public class BwFilterDef
extends BwShareableContainedDbentity<BwFilterDef>
implements DescriptionEntity<BwLongString>, DisplayNameEntity, Comparator<BwFilterDef>
A filter selects events (and possibly other entities) that fulfill
certain criteria. For example, "All events that have the category
'Lecture'".
All filters must be expressible as a db search expresssion. Entity
filters select events that own a given entity or own an entity within a
set. This translates to
event.location = given-location or
event.location in given-location-set
The test may be negated to give != and not in.
Some filters can have any number of children such as an OrFilter.
- Version:
- 1.1
- Author:
- Mike Douglass
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDescription(String lang, String val) voidvoidaddDisplayName(String lang, String val) voidaddDisplayName(BwString val) intcompare(BwFilterDef f1, BwFilterDef f2) intcompareTo(BwFilterDef that) findDescription(String lang) findDisplayName(String lang) Get the object's collection pathGet the definitionGet the descriptionsGet the display namesorg.bedework.caldav.util.filter.FilterBaseGet the filters represented by the definitiongetHref()getName()Get the nameintintinthashCode()booleanbooleanvoidsetDefinition(String val) Set the definitionvoidsetDescription(String val) voidsetDescriptions(Set<BwLongString> val) Set the descriptions SetvoidsetDisplayName(String val) voidSet the display names collectionvoidsetFilters(org.bedework.caldav.util.filter.FilterBase val) Set the filters represented by the definitionvoidSet the nameprotected voidtoStringSegment(org.bedework.util.misc.ToString ts) Add our stuff to the StringBuildervoidupdateDescriptions(String lang, String val) If description with given lang is present updates the value, otherwise adds it.voidupdateDisplayNames(String lang, String val) If display name with given lang is present updates the value, otherwise adds it.Methods inherited from class org.bedework.calfacade.base.BwShareableContainedDbentity
copyTo, setColPath, setColPath, shallowCopyToMethods inherited from class org.bedework.calfacade.base.BwShareableDbentity
copyTo, getAccess, getCreatorEnt, getCreatorHref, setAccess, setCreatorEnt, setCreatorHref, shallowCopyToMethods inherited from class org.bedework.calfacade.base.BwOwnedDbentity
copyTo, getOwnerHref, getPublick, setOwnerHref, setPublick, shallowCopyToMethods inherited from class org.bedework.calfacade.base.BwDbentity
addDeletedEntity, afterDeletion, beforeDeletion, beforeSave, beforeUpdate, getByteSize, getDeletedEntities, getSeq, length, setByteSize, setSeqMethods inherited from class org.bedework.calfacade.base.BwUnversionedDbentity
clone, equals, getId, markUnsaved, setHref, setId, unsavedMethods inherited from class org.bedework.calfacade.base.DumpEntity
dump, dump, getLogger, hasDumpValueMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warnMethods inherited from interface org.bedework.calfacade.base.OwnedEntity
getOwnerHref, getPublick, setOwnerHref, setPublick
-
Field Details
-
maxNameLength
public static final int maxNameLength- See Also:
-
-
Constructor Details
-
BwFilterDef
public BwFilterDef()
-
-
Method Details
-
setName
Set the name- Parameters:
val- String name
-
getName
Get the name- Returns:
- String name
-
setFilters
public void setFilters(org.bedework.caldav.util.filter.FilterBase val) Set the filters represented by the definition- Parameters:
val- BwFilter object
-
getFilters
public org.bedework.caldav.util.filter.FilterBase getFilters()Get the filters represented by the definition- Returns:
- BwFilter the filters
-
setDefinition
Set the definition- Parameters:
val- String definition
-
getDefinition
Get the definition- Returns:
- String definition
-
setDisplayNames
Description copied from interface:DisplayNameEntitySet the display names collection- Specified by:
setDisplayNamesin interfaceDisplayNameEntity- Parameters:
val- Collection of (BwString)display names
-
getDisplayNames
Description copied from interface:DisplayNameEntityGet the display names- Specified by:
getDisplayNamesin interfaceDisplayNameEntity- Returns:
- Collection display names set
-
getNumDisplayNames
public int getNumDisplayNames()- Specified by:
getNumDisplayNamesin interfaceDisplayNameEntity- Returns:
- int number of display names.
-
addDisplayName
- Specified by:
addDisplayNamein interfaceDisplayNameEntity
-
addDisplayName
- Specified by:
addDisplayNamein interfaceDisplayNameEntity
-
removeDisplayName
- Specified by:
removeDisplayNamein interfaceDisplayNameEntity- Returns:
- boolean true if removed.
-
updateDisplayNames
Description copied from interface:DisplayNameEntityIf display name with given lang is present updates the value, otherwise adds it.- Specified by:
updateDisplayNamesin interfaceDisplayNameEntity
-
findDisplayName
- Specified by:
findDisplayNamein interfaceDisplayNameEntity- Returns:
- BwString with language code or default
-
setDisplayName
- Specified by:
setDisplayNamein interfaceDisplayNameEntity- Parameters:
val- String default
-
getDisplayName
- Specified by:
getDisplayNamein interfaceDisplayNameEntity- Returns:
- String default
-
setDescriptions
Description copied from interface:DescriptionEntitySet the descriptions Set- Specified by:
setDescriptionsin interfaceDescriptionEntity<BwLongString>- Parameters:
val- Set of (BwString)descriptions
-
getDescriptions
Description copied from interface:DescriptionEntityGet the descriptions- Specified by:
getDescriptionsin interfaceDescriptionEntity<BwLongString>- Returns:
- Set descriptions set
-
getNumDescriptions
public int getNumDescriptions()- Specified by:
getNumDescriptionsin interfaceDescriptionEntity<BwLongString>- Returns:
- int number of descriptions.
-
addDescription
- Specified by:
addDescriptionin interfaceDescriptionEntity<BwLongString>
-
addDescription
- Specified by:
addDescriptionin interfaceDescriptionEntity<BwLongString>
-
removeDescription
- Specified by:
removeDescriptionin interfaceDescriptionEntity<BwLongString>- Returns:
- boolean true if removed.
-
updateDescriptions
Description copied from interface:DescriptionEntityIf description with given lang is present updates the value, otherwise adds it.- Specified by:
updateDescriptionsin interfaceDescriptionEntity<BwLongString>
-
findDescription
- Specified by:
findDescriptionin interfaceDescriptionEntity<BwLongString>- Returns:
- BwString with language code or default
-
setDescription
- Specified by:
setDescriptionin interfaceDescriptionEntity<BwLongString>- Parameters:
val- String default
-
getDescription
- Specified by:
getDescriptionin interfaceDescriptionEntity<BwLongString>- Returns:
- String default
-
getColPath
Description copied from class:BwShareableContainedDbentityGet the object's collection path- Overrides:
getColPathin classBwShareableContainedDbentity<BwFilterDef>- Returns:
- String path
-
getHref
- Overrides:
getHrefin classBwUnversionedDbentity<BwFilterDef>- Returns:
- non null unique href for the entity
-
toStringSegment
protected void toStringSegment(org.bedework.util.misc.ToString ts) Add our stuff to the StringBuilder- Overrides:
toStringSegmentin classBwShareableContainedDbentity<BwFilterDef>- Parameters:
ts- StringBuilder for result
-
compare
- Specified by:
comparein interfaceComparator<BwFilterDef>
-
compareTo
- Specified by:
compareToin interfaceComparable<BwFilterDef>- Overrides:
compareToin classBwUnversionedDbentity<BwFilterDef>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBwUnversionedDbentity<BwFilterDef>
-