Share via


Identifier 类 (Microsoft.Office.Server.ApplicationRegistry.MetadataModel)

Represents the persistent and unique identity of entity instances.

命名空间: Microsoft.Office.Server.ApplicationRegistry.MetadataModel
程序集: Microsoft.SharePoint.Portal (在 microsoft.sharepoint.portal.dll 中)

语法

声明
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class Identifier
    Inherits MetadataObject
用法
Dim instance As Identifier
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public class Identifier : MetadataObject

备注

In the Business Data Catalog, entity instances should have a persistent identity, such as a primary key, so that they can be searched for and located using the key (identifier). Without an identifier, the Business Data Catalog cannot uniquely identify an entity instance. The data returned by a back-end method is just a blob of data without identifiers. Only if the returned data also has an identifier can the data have semantic meaning in the Business Data Catalog, and entities can have actions on and have search and indexing capability applied to them.

However, you might have an entity that does not need an identifier. For example, see the Address entity in the SampleWebService sample. In this case, we just want to display of list addresses for a customer using associations and are not concerned with searching or relating the addresses with any other entity. Addresses in this case are just a blob of data. Without an identifier, the Address entity cannot have actions on it, cannot be searched or indexed, cannot be related, and cannot be used in any of the Business Data features except the Related List Web Part.

The Business Data Catalog supports entitles with composite keys by allowing you to define multiple identifiers for an entity. When you define two or more identifiers for an entity, the Business Data Catalog uses the combination of the identifiers as the unique key.

Identifiers are restricted to primitive types. Complex identifiers can be synthesized by the Business Data Catalog automatically from their simple primitive constituents.

Defining identifiers also enables many of the API simplification semantics offered by the Business Data Catalog. For example, transforming a complex API (e.g. BAPI_GETCUSTOMER) into a simple Entity.FindSepcific call is done by tagging where exactly the identifier value for the Entity must be supplied as input in the API signature. The tagging is done by associating the TypeDescriptor of the primitive field in the complex API parameter with the Identifier.

继承层次结构

System.Object
   Microsoft.Office.Server.ApplicationRegistry.MetadataModel.MetadataObject
    Microsoft.Office.Server.ApplicationRegistry.MetadataModel.Identifier

线程安全性

此类型的任何公共静态( Visual Basic 中共享)成员是线程安全的。不保证任何实例成员都是线程安全的。

另请参阅

参考

Identifier 成员
Microsoft.Office.Server.ApplicationRegistry.MetadataModel 命名空间