Class FilterSupport
- All Implemented Interfaces:
Serializable,Filter,MetadataFilter,SolarNodeFilter,SolarNodeMetadataFilter,TagFilter
- Direct Known Subclasses:
UserFilterCommand
Filter implementations.- Since:
- 1.32
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet a mapping of filter keys and associated filter values.Get the first location ID.Long[]Get all location IDs to filter on.Get the first node ID.Long[]Get an array of node IDs.Get the first source ID.String[]Get all source IDs to filter on.inthashCode()voidsetLocationId(Long locationId) Set a single location ID.voidsetLocationIds(Long[] locationIds) Set a list of location IDs to filter on.voidSet a single node ID.voidsetNodeIds(Long[] nodeIds) Set a list of node IDs to filter on.voidsetSourceId(String sourceId) Set a single source ID.voidsetSourceIds(String[] sourceIds) Set a list of source IDs to filter on.toString()Methods inherited from class net.solarnetwork.central.support.BaseFilterSupport
getMetadataFilter, getTag, getTags, getUserId, getUserIds, setMetadataFilter, setTag, setTags, setUserId, setUserIdsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.solarnetwork.central.domain.MetadataFilter
getMetadataFilter
-
Constructor Details
-
FilterSupport
public FilterSupport()
-
-
Method Details
-
getFilter
Description copied from interface:FilterGet a mapping of filter keys and associated filter values.- Specified by:
getFilterin interfaceFilter- Overrides:
getFilterin classBaseFilterSupport- Returns:
- a filter map
-
toString
- Overrides:
toStringin classBaseFilterSupport
-
setNodeId
Set a single node ID.This is a convenience method for requests that use a single node ID at a time. The node ID is still stored on the
nodeIdsarray, just as the first value. Calling this method replaces any existingnodeIdsvalue with a new array containing just the ID passed into this method.- Parameters:
nodeId- the ID of the node
-
getNodeId
Description copied from interface:SolarNodeFilterGet the first node ID.This returns the first available node ID from the
SolarNodeFilter.getNodeIds()array, or null if not available.- Specified by:
getNodeIdin interfaceSolarNodeFilter- Specified by:
getNodeIdin interfaceSolarNodeMetadataFilter- Returns:
- the node ID, or null if not available
-
getNodeIds
Description copied from interface:SolarNodeFilterGet an array of node IDs.- Specified by:
getNodeIdsin interfaceSolarNodeFilter- Specified by:
getNodeIdsin interfaceSolarNodeMetadataFilter- Returns:
- array of node IDs (may be null)
-
setNodeIds
Set a list of node IDs to filter on.- Parameters:
nodeIds- The nodeIds IDs to filter on.
-
setSourceId
Set a single source ID.This is a convenience method for requests that use a single source ID at a time. The source ID is still stored on the
sourceIdsarray, just as the first value. Calling this method replaces any existingsourceIdsvalue with a new array containing just the ID passed into this method.- Parameters:
sourceId- the source ID
-
getSourceId
Get the first source ID.This returns the first available source ID from the
sourceIdsarray, or null if not available.- Returns:
- the first source ID, or null
-
getSourceIds
Get all source IDs to filter on.- Returns:
- The source IDs, or null.
-
setSourceIds
Set a list of source IDs to filter on.- Parameters:
sourceIds- The source IDs to filter on.
-
setLocationId
Set a single location ID.This is a convenience method for requests that use a single location ID at a time. The location ID is still stored on the
locationIdsarray, just as the first value. Calling this method replaces any existinglocationIdsvalue with a new array containing just the ID passed into this method.- Parameters:
locationId- the ID of the location
-
getLocationId
Get the first location ID. This returns the first available location ID from thelocationIdsarray, or null if not available.- Returns:
- the first location ID, or null
-
getLocationIds
Get all location IDs to filter on.- Returns:
- The location IDs, or null.
-
setLocationIds
Set a list of location IDs to filter on.- Parameters:
locationIds- The location IDs to filter on.
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseFilterSupport- Since:
- 1.1
-
equals
- Overrides:
equalsin classBaseFilterSupport- Since:
- 1.1
-