Class DisplayFilter
- java.lang.Object
-
- com.esri.arcgisruntime.layers.DisplayFilter
-
- Direct Known Subclasses:
ScaleRangeDisplayFilter
public class DisplayFilter extends java.lang.Object
Represents a type used for limiting which features are rendered.Features filtered from display remain available for query and analysis. Use display filter when only a subset of features needs to be visible while maintaining access to all features.
- Since:
- 100.13.0
- See Also:
ScaleDisplayFilterDefinition.getFilters()
,ManualDisplayFilterDefinition.getActiveFilter()
-
-
Constructor Summary
Constructors Constructor Description DisplayFilter(java.lang.String name, java.lang.String whereClause)
Creates a newDisplayFilter
with the specified name and where clause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFilterId()
Gets the identifier for this display filter.java.lang.String
getName()
Gets a descriptive name for this display filter.java.lang.String
getWhereClause()
Gets a SQL expression that defines which features are rendered.void
setName(java.lang.String name)
Sets a descriptive name for this display filter.void
setWhereClause(java.lang.String whereClause)
Sets a SQL expression that defines which features are rendered.
-
-
-
Constructor Detail
-
DisplayFilter
public DisplayFilter(java.lang.String name, java.lang.String whereClause)
Creates a newDisplayFilter
with the specified name and where clause.- Parameters:
name
- a descriptive name for this display filterwhereClause
- a SQL expression that defines which features are rendered- Throws:
java.lang.IllegalArgumentException
- if name is null or emptyjava.lang.IllegalArgumentException
- if whereClause is null or empty- Since:
- 100.13.0
-
-
Method Detail
-
getFilterId
public java.lang.String getFilterId()
Gets the identifier for this display filter.Use a unique name to identify this display filter when used in a webmap as a
ManualDisplayFilterDefinition.getActiveFilter()
.- Returns:
- the identifier for this display filter
- Since:
- 100.13.0
-
getName
public java.lang.String getName()
Gets a descriptive name for this display filter.- Returns:
- a descriptive name for this display filter
- Since:
- 100.13.0
-
setName
public void setName(java.lang.String name)
Sets a descriptive name for this display filter.- Parameters:
name
- a descriptive name for this display filter- Throws:
java.lang.IllegalArgumentException
- if name is null- Since:
- 100.13.0
-
getWhereClause
public java.lang.String getWhereClause()
Gets a SQL expression that defines which features are rendered.The where clause string that is used as the
getWhereClause()
should follow standard SQL syntax similar to what is discussed in the document SQL reference for query expressions used in ArcGIS. A where clause that is not valid for the data may result in no features being drawn when this display filter is applied either byManualDisplayFilterDefinition.getActiveFilter()
or byScaleRangeDisplayFilter.getMaxScale()
. Check the layer'sLayerViewState
for aLayerViewStatus.WARNING
; if there is one, then there might beLayerViewState.getError()
describing that the display filter's where clause is not valid.- Returns:
- a SQL expression that defines which features are rendered
- Since:
- 100.13.0
-
setWhereClause
public void setWhereClause(java.lang.String whereClause)
Sets a SQL expression that defines which features are rendered.The where clause string that is used as the
getWhereClause()
should follow standard SQL syntax similar to what is discussed in the document SQL reference for query expressions used in ArcGIS. A where clause that is not valid for the data may result in no features being drawn when this display filter is applied either byManualDisplayFilterDefinition.getActiveFilter()
or byScaleRangeDisplayFilter.getMaxScale()
. Check the layer'sLayerViewState
for aLayerViewStatus.WARNING
; if there is one, then there might beLayerViewState.getError()
describing that the display filter's where clause is not valid.- Parameters:
whereClause
- a SQL expression that defines which features are rendered- Throws:
java.lang.IllegalArgumentException
- if whereClause is null or empty- Since:
- 100.13.0
-
-