XML Snippet: Use Comparison Filters in a BDC Model
Applies to: SharePoint Server 2010
The following is an example of a comparison filter in a BDC model.
Example
<Method IsStatic="false" LobName="GenericMethod" Name="Default" DefaultDisplayName="FinderGenericMethod">
<AccessControlList>
<AccessControlEntry Principal="REDMOND\Domain Users">
<Right BdcRight="Edit" />
<Right BdcRight="Execute" />
<Right BdcRight="SetPermissions" />
<Right BdcRight="SelectableInClients" />
</AccessControlEntry>
</AccessControlList>
<FilterDescriptors>
<FilterDescriptor Type="Username" Name="UserNameFilter">
<Properties>
<Property Name="CaseSensitive" Type="System.Boolean">false</Property>
<Property Name="IsDefault" Type="System.Boolean">false</Property>
<Property Name="UsedForDisambiguation" Type="System.Boolean">false</Property>
</Properties>
</FilterDescriptor>
<FilterDescriptor Type="Comparison" Name="Filter">
<Properties>
<Property Name="CaseSensitive" Type="System.Boolean">false</Property>
<Property Name="Comparator" Type="System.String">Equals</Property>
<Property Name="IsDefault" Type="System.Boolean">false</Property>
<Property Name="Operator" Type="System.String">Equals</Property>
<Property Name="UsedForDisambiguation" Type="System.Boolean">false</Property>
</Properties>
</FilterDescriptor>
<FilterDescriptor Type="Password" Name="PasswordFilter">
<Properties>
<Property Name="CaseSensitive" Type="System.Boolean">false</Property>
<Property Name="IsDefault" Type="System.Boolean">false</Property>
<Property Name="UsedForDisambiguation" Type="System.Boolean">false</Property>
</Properties>
</FilterDescriptor>
</FilterDescriptors>
<Parameters>
<Parameter Direction="In" Name="id">
<TypeDescriptor TypeName="System.Int32" Name="id" />
</Parameter>
<Parameter Direction="In" Name="parent">
<TypeDescriptor TypeName="BCSWebServiceProxy.RootComplexClass, Sample-LobSystemUserNamePasswordFilter" Name="parent">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Boolean" Name="Gender" />
<TypeDescriptor TypeName="System.Int32" Name="Integer" />
<TypeDescriptor TypeName="System.String" AssociatedFilter="UserNameFilter" Name="Name">
<DefaultValues>
<DefaultValue MethodInstanceName="FinderGenericMethod" Type="System.String">test1</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Direction="In" Name="son">
<TypeDescriptor TypeName="BCSWebServiceProxy.BrotherClass, Sample-LobSystemUserNamePasswordFilter" Name="son">
<TypeDescriptors>
<TypeDescriptor TypeName="System.DateTime" Name="Date">
<Interpretation>
<NormalizeDateTime LobDateTimeMode="UTC" />
</Interpretation>
</TypeDescriptor>
<TypeDescriptor TypeName="BCSWebServiceProxy.ThirdClass, Sample-LobSystemUserNamePasswordFilter" Name="Third">
<TypeDescriptors>
<TypeDescriptor TypeName="System.DateTime" Name="Date">
<Interpretation>
<NormalizeDateTime LobDateTimeMode="UTC" />
</Interpretation>
</TypeDescriptor>
<TypeDescriptor TypeName="System.Int32" AssociatedFilter="Filter" Name="Integer" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor TypeName="System.Boolean" Name="Gender" />
<TypeDescriptor TypeName="System.Int32" Name="Integer" />
<TypeDescriptor TypeName="System.String" AssociatedFilter="PasswordFilter" Name="Name">
<DefaultValues>
<DefaultValue MethodInstanceName="FinderGenericMethod" Type="System.String">test2</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Direction="In" Name="daughter">
<TypeDescriptor TypeName="BCSWebServiceProxy.SisterClass, Sample-LobSystemUserNamePasswordFilter" Name="daughter">
<TypeDescriptors>
<TypeDescriptor TypeName="System.DateTime" Name="Date">
<Interpretation>
<NormalizeDateTime LobDateTimeMode="UTC" />
</Interpretation>
</TypeDescriptor>
<TypeDescriptor TypeName="System.String" Name="Text" />
<TypeDescriptor TypeName="BCSWebServiceProxy.ThirdClass, Sample-LobSystemUserNamePasswordFilter" Name="Third">
<TypeDescriptors>
<TypeDescriptor TypeName="System.DateTime" Name="Date">
<Interpretation>
<NormalizeDateTime LobDateTimeMode="UTC" />
</Interpretation>
</TypeDescriptor>
<TypeDescriptor TypeName="System.Int32" Name="Integer" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor TypeName="System.Boolean" Name="Gender" />
<TypeDescriptor TypeName="System.Int32" Name="Integer" />
<TypeDescriptor TypeName="System.String" Name="Name">
<DefaultValues>
<DefaultValue MethodInstanceName="FinderGenericMethod" Type="System.String">teest</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Direction="Return" Name="GenericMethod">
<TypeDescriptor TypeName="BCSWebServiceProxy.RootComplexClass[], Sample-LobSystemUserNamePasswordFilter" IsCollection="true" Name="GenericMethod">
<TypeDescriptors>
<TypeDescriptor TypeName="BCSWebServiceProxy.RootComplexClass, Sample-LobSystemUserNamePasswordFilter" Name="GenericMethodElement">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Boolean" Name="Gender" />
<TypeDescriptor TypeName="System.Int32" ReadOnly="true" IdentifierName="Integer" Name="Integer" />
<TypeDescriptor TypeName="System.String" ReadOnly="true" IdentifierName="Name" Name="Name" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder" ReturnParameterName="GenericMethod" Default="true" Name="FinderGenericMethod">
<Properties>
<Property Name="RootFinder" Type="System.String"></Property>
<Property Name="UseClientCachingForSearch" Type="System.String"></Property>
</Properties>
<AccessControlList>
<AccessControlEntry Principal="REDMOND\Domain Users">
<Right BdcRight="Edit" />
<Right BdcRight="Execute" />
<Right BdcRight="SetPermissions" />
<Right BdcRight="SelectableInClients" />
</AccessControlEntry>
</AccessControlList>
</MethodInstance>
</MethodInstances>
</Method>