Class PersistenceFilter

java.lang.Object
org.openhab.core.persistence.filter.PersistenceFilter
Direct Known Subclasses:
PersistenceEqualsFilter, PersistenceIncludeFilter, PersistenceThresholdFilter, PersistenceTimeFilter

@NonNullByDefault public abstract class PersistenceFilter extends Object
The PersistenceFilter is the base class for implementing persistence filters.
Author:
Markus Rathgeb - Initial contribution
  • Constructor Details

    • PersistenceFilter

      public PersistenceFilter(String name)
  • Method Details

    • getName

      public String getName()
      Get the name of this filter
      Returns:
      a unique name
    • apply

      public abstract boolean apply(Item item)
      Apply this filter to an item
      Parameters:
      item - the item to check
      Returns:
      true if the filter allows persisting this value
    • persisted

      public abstract void persisted(Item item)
      Notify filter that item was persisted
      Parameters:
      item - the persisted item
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object