Share via


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

Represents the persistent identity of entity instances. You can use the key to search for a specific entity instance or a group of entity instances of that entity by using the Business Data Catalog.

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

语法

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

备注

In the Business Data Catalog, Entity instances should have a persistent identity, such as a primary key, so that you can search for and locate them using the key (identifier). Without an identifier, the Business Data Catalog cannot uniquely identify an entity instance. The data returned by a back-end application method is just a blob of data without identifiers. Only if the returned data also has identifiers can the data have semantic meaning in the Business Data Catalog, and only then can you have actions, search, and index on the entities.

However, it is possible to have an entity that does not need an identifier. For an example, see the Address entity in the SampleWebServicemetadata sample in the SDK. In this case, we want to display a list of addresses for a customer using associations, and do not require the ability to search or relate 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 simply uses the combination of the identifiers as the unique key.

Schema

Child

Type

Occurs

Default

Limits / Accepted Values

Description

TypeName

System.String

1..1

  • System.Boolean

  • System.Byte

  • System.Char

  • System.DateTime

  • System.Decimal

  • System.Double

  • System.Int32

  • System.Int64

  • System.Int16

  • System.Single

  • System.Guid

Type of the identifier.

继承层次结构

System.Object
   Microsoft.Office.Server.ApplicationRegistry.Administration.MetadataObject
     Microsoft.Office.Server.ApplicationRegistry.Administration.AccessControlledMetadataObject
      Microsoft.Office.Server.ApplicationRegistry.Administration.Identifier

线程安全性

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

另请参阅

参考

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