Class SourceLocationFilter

java.lang.Object
net.solarnetwork.central.support.SourceLocationFilter
All Implemented Interfaces:
Serializable, Filter, SourceLocation

public class SourceLocationFilter extends Object implements Serializable, SourceLocation
Criteria for location data tied to a source.
See Also:
  • Constructor Details

    • SourceLocationFilter

      public SourceLocationFilter()
      Default constructor.
    • SourceLocationFilter

      public SourceLocationFilter(String source, String locationName)
      Construct with criteria parameters.
      Parameters:
      source - the source name
      locationName - the location name
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • removeEmptyValues

      public void removeEmptyValues()
      Change values that are non-null but empty to null.

      This method is helpful for web form submission, to remove filter values that are empty and would otherwise try to match on empty string values.

    • getFilter

      public Map<String,?> getFilter()
      Description copied from interface: Filter
      Get a mapping of filter keys and associated filter values.
      Specified by:
      getFilter in interface Filter
      Returns:
      a filter map
    • getLocationName

      public String getLocationName()
    • setLocationName

      public void setLocationName(String locationName)
    • getSourceName

      public String getSourceName()
    • setSourceName

      public void setSourceName(String sourceName)
    • getSource

      public String getSource()
      Description copied from interface: SourceLocation
      Get the source name.
      Specified by:
      getSource in interface SourceLocation
      Returns:
      the source name
    • setSource

      public void setSource(String source)
    • getLocation

      public SolarLocation getLocation()
      Description copied from interface: SourceLocation
      A location filter.
      Specified by:
      getLocation in interface SourceLocation
      Returns:
      the location filter
    • setLocation

      public void setLocation(SolarLocation location)
    • getSortDescriptors

      public List<net.solarnetwork.domain.SortDescriptor> getSortDescriptors()
    • getTimeZoneId

      public String getTimeZoneId()
    • setTimeZoneId

      public void setTimeZoneId(String timeZoneId)
    • getSorts

      public List<net.solarnetwork.domain.MutableSortDescriptor> getSorts()
    • setSorts

      public void setSorts(List<net.solarnetwork.domain.MutableSortDescriptor> sorts)
    • getOffset

      public Integer getOffset()
    • setOffset

      public void setOffset(Integer offset)
    • getMax

      public Integer getMax()
    • setMax

      public void setMax(Integer max)
    • getId

      public Long getId()
      Description copied from interface: SourceLocation
      Get a specific ID to find.
      Specified by:
      getId in interface SourceLocation
      Returns:
      the ID
    • setId

      public void setId(Long id)
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Since:
      1.3