com.esri.arcgis.carto
Class IFeatureLayerDefinitionProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.carto.IFeatureLayerDefinitionProxy
All Implemented Interfaces:
IFeatureLayerDefinition, Externalizable, Serializable

public class IFeatureLayerDefinitionProxy
extends com.esri.arcgis.interop.Dispatch
implements IFeatureLayerDefinition, Serializable

Provides access to members that define a subset of the features from the underlying feature class.

Superseded By

IFeatureLayerDefinition2

Remarks

Use this interface to set a definition query on a layer so that only the features that meet the specified criteria are displayed. Use DefinitionExpression to access the definition query.
Also, you can use CreateSelectionLayer to create a new FeatureLayer based on an existing FeatureLayer's selected features. In the ArcMap user documentation and interface this new layer is called a selection layer.

You can use RelationshipClass to access the the relationship class, if one exists, that defines the relationship between the layer and the table that is joined to it. This same object can be accessed through IDisplayRelationshipClass::RelationshipClass. IDisplayRelationshipClass can be more convenient because it has multiple additionl methods and properties for working with layer joins.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IFeatureLayerDefinitionProxy()
           
  IFeatureLayerDefinitionProxy(Object obj)
           
protected IFeatureLayerDefinitionProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 IFeatureLayer createSelectionLayer(String layerName, boolean useCurrentSelection, String joinTableNames, String expression)
          Creates a new feature layer from the existing layer based on the current selection and the specified query expression.
 String getDefinitionExpression()
          Definition query expression for the existing layer.
 ISelectionSet getDefinitionSelectionSet()
          The selection set that defines the subset of features in a selection layer.
 IRelationshipClass getRelationshipClass()
          The current relationship class used to display related fields.
 void removeListener(String iidStr, Object theListener)
           
 void setDefinitionExpression(String expression)
          Definition query expression for the existing layer.
 void setRelationshipClassByRef(IRelationshipClass relClass)
          The current relationship class used to display related fields.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IFeatureLayerDefinitionProxy

public IFeatureLayerDefinitionProxy()

IFeatureLayerDefinitionProxy

public IFeatureLayerDefinitionProxy(Object obj)
                             throws IOException
Throws:
IOException

IFeatureLayerDefinitionProxy

protected IFeatureLayerDefinitionProxy(Object obj,
                                       String iid)
                                throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getDefinitionExpression

public String getDefinitionExpression()
                               throws IOException,
                                      AutomationException
Definition query expression for the existing layer.

Description

Use the DefinitionExpression property to read or set the definition query for an existing layer just like you would in the Definition Query tab of the layer's properties dialog.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDefinitionExpression in interface IFeatureLayerDefinition
Returns:
The expression
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefinitionExpression

public void setDefinitionExpression(String expression)
                             throws IOException,
                                    AutomationException
Definition query expression for the existing layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setDefinitionExpression in interface IFeatureLayerDefinition
Parameters:
expression - The expression (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefinitionSelectionSet

public ISelectionSet getDefinitionSelectionSet()
                                        throws IOException,
                                               AutomationException
The selection set that defines the subset of features in a selection layer.

Remarks

You can use the DefintionSelectionSet property to get the selection set that was used to define the new layer created by the IFeatureLayerDefintion::CreateSelectionLayer method. Note, before calling CreateSelectionLayer, the selection set returned by DefintionSelectionSet will be Nothing. Therefore, you can only use this property after you have called the CreateSelectionLayer method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDefinitionSelectionSet in interface IFeatureLayerDefinition
Returns:
A reference to a com.esri.arcgis.geodatabase.ISelectionSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createSelectionLayer

public IFeatureLayer createSelectionLayer(String layerName,
                                          boolean useCurrentSelection,
                                          String joinTableNames,
                                          String expression)
                                   throws IOException,
                                          AutomationException
Creates a new feature layer from the existing layer based on the current selection and the specified query expression.

Description

CreateSelectionLayer creates a new FeatureLayer from an existing FeatureLayer.
LayerName defines the new layer's name.
Set useCurrentSelection = TRUE here if you want to use the currently selected features on the existing layer.
joinTableNames may contain the name of related table(s) separated by commas. The existing join(s) will then be passed on to the new layer.
The DefinitionExpression parameter can be used to set a definition expression on the newly created layer but currently this will be defined at the feature class rather than at the layer level and will not show up in the UI. If you want to set a definition query on the newly created layer, it is best to use IFeatureLayerDefinition again to set the definition query after the layer has been created.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
createSelectionLayer in interface IFeatureLayerDefinition
Parameters:
layerName - The layerName (in)
useCurrentSelection - The useCurrentSelection (in)
joinTableNames - The joinTableNames (in)
expression - The expression (in)
Returns:
A reference to a com.esri.arcgis.carto.IFeatureLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRelationshipClass

public IRelationshipClass getRelationshipClass()
                                        throws IOException,
                                               AutomationException
The current relationship class used to display related fields.

Remarks

RelClass must be a defined relationship class on the base feature class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRelationshipClass in interface IFeatureLayerDefinition
Returns:
A reference to a com.esri.arcgis.geodatabase.IRelationshipClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRelationshipClassByRef

public void setRelationshipClassByRef(IRelationshipClass relClass)
                               throws IOException,
                                      AutomationException
The current relationship class used to display related fields.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setRelationshipClassByRef in interface IFeatureLayerDefinition
Parameters:
relClass - A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.