November 22, 2014
Hot Topics:

Business Data Catalog in Microsoft Office SharePoint Server 2007: Architecture and Schemas

  • October 3, 2007
  • By Gustavo Velez
  • Send Email »
  • More Articles »

Methods

Methods are the operations that allow the Entity to be realized in the application. In the example, this element suggests how dangerous the animal is perceived to be. The metadata of the Method delineates the operation to render (DataBase query, StoredProcedure, method of a WebService) as well as the parameters and filters as shown below:

<Methods>
   <Method Name="AnimalsMethod">
      <Properties>
         <Property Name="RdbCommandText" Type="System.String">
                   SELECT Animals.AnimalID AS AnimalID,
                   Animals.AnimalSurename +
                   ' (' + Animals.AnimalFamilyname + ')' AS Animal,
                   DangerousLevels.DangerousLevelDescription
                   AS DangerousLevel FROM Animals
                   INNER JOIN DangerousLevels
                   ON Animals.AnimalDangerousLevel =
                      DangerousLevels.DangerousLevelID
                   WHERE (Animals.AnimalID&gt;=@GenMinAnimalID)
                   and (Animals.AnimalID&lt;=@GenMaxAnimalID)
                   ORDER BY Animal
         </Property>
         <Property Name="RdbCommandType"
                   Type="System.Data.CommandType, System.Data,
                   Version=2.0.0.0, Culture=neutral,
                   PublicKeyToken=b77a5c561934e089">Text</Property>
      </Properties>
      <FilterDescriptors>
         <FilterDescriptor Type="Comparison" Name="AnimalID" />
      </FilterDescriptors>
      <Parameters>
         <Parameter Direction="In" Name="@GenMinAnimalID">
            <TypeDescriptor TypeName="System.Int32"
                            IdentifierName="AnimalID"
                            AssociatedFilter="AnimalID"
                            Name="AnimalID">
               <DefaultValues>
                  <DefaultValue MethodInstanceName="AnimalsFinder"
                                Type="System.Int32">0</DefaultValue>
                  <DefaultValue MethodInstanceName=
                                "AnimalsSpecificFinder"
                                Type="System.Int32">0</DefaultValue>
               </DefaultValues>
            </TypeDescriptor>
         </Parameter>
         <Parameter Direction="In" Name="@GenMaxAnimalID">
            <TypeDescriptor TypeName="System.Int32"
                            IdentifierName="AnimalID"
                            AssociatedFilter="AnimalID"
                            Name="AnimalID">
               <DefaultValues>
                  <DefaultValue MethodInstanceName="AnimalsFinder"
                                Type="System.Int32">9999999
                  </DefaultValue>
                  <DefaultValue MethodInstanceName=
                                "AnimalsSpecificFinder"
                                Type="System.Int32">9999999
                  </DefaultValue>
               </DefaultValues>
            </TypeDescriptor>
         </Parameter>
         <Parameter Direction="Return" Name="Animals">
            <TypeDescriptor TypeName="System.Data.IDataReader,
                            System.Data, Version=2.0.3600.0,
                            Culture=neutral,
                            PublicKeyToken=b77a5c561934e089"
                            Name="AnimalsDataReader"
                            IsCollection="true">
               <TypeDescriptors>
                  <TypeDescriptor TypeName="System.Data.IDataRecord,
                                  System.Data, Version=2.0.3600.0,
                                  Culture=neutral,
                                  PublicKeyToken=b77a5c561934e089"
                                  Name="AnimalsDataRecord">
                     <TypeDescriptors>
                        <TypeDescriptor TypeName="System.Int32"
                                        IdentifierName="AnimalID"
                                        Name="AnimalID" />
                        <TypeDescriptor TypeName="System.String"
                                        Name="Animal" />
                        <TypeDescriptor TypeName="System.String"
                                        Name="DangerousLevel" />
                     </TypeDescriptors>
                  </TypeDescriptor>
               </TypeDescriptors>
            </TypeDescriptor>
         </Parameter>
      </Parameters>
      <MethodInstances>
               <MethodInstance Name="AnimalsFinder"
                               Type="Finder"
                               ReturnParameterName="Animals"
                               ReturnTypeDescriptorName=
                                  "AnimalsDataReader"
                               ReturnTypeDescriptorLevel="0" />
               <MethodInstance Name="AnimalsSpecificFinder"
                               Type="SpecificFinder"
                               ReturnParameterName="Animals"
                               ReturnTypeDescriptorName=
                                  "AnimalsDataReader"
                               ReturnTypeDescriptorLevel="0" />
      </MethodInstances>
   </Method>
</Methods>

Actions

Actions provide an avenue to the original application or any chosen resource. The implementation of a BDC Action is fundamentally a HTML command and is available for simple tasks only: for example, redirection to a web page, to send an eail, and so forth. In the Action for the case in point, the user will be redirected to the site of the San Francisco Zoo (http://www.sfzoo.gob/). The code for the Action element is:

<Actions>
   <Action Position="1"
           IsOpenedInNewWindow="false"
           Url="http://www.sfzoo.gob"
           ImageUrl="/_layouts/images/addressbook.gif"
           Name="Go to San Francisco Zoo"
           DefaultDisplayName="Go to San Francisco Zoo">
      <ActionParameters>
         <ActionParameter Index="0" Name="AnimalID" />
      </ActionParameters>
   </Action>
</Actions>




Page 3 of 5



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Rocket Fuel