Identifier, classe (Microsoft.Office.Server.ApplicationRegistry.MetadataModel)
Represents the persistent and unique identity of entity instances.
Espace de noms : Microsoft.Office.Server.ApplicationRegistry.MetadataModel
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)
Syntaxe
'Déclaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class Identifier
Inherits MetadataObject
'Utilisation
Dim instance As Identifier
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)]
public class Identifier : MetadataObject
Remarques
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.
Hiérarchie d'héritage
System.Object
Microsoft.Office.Server.ApplicationRegistry.MetadataModel.MetadataObject
Microsoft.Office.Server.ApplicationRegistry.MetadataModel.Identifier
Sécurité des threads
Les membres statiques publics de ce type (Shared en Visual Basic) sont sécurisés au niveau des threads. Il n'est pas garanti que les membres d'instance soient sécurisés au niveau des threads.
Voir aussi
Référence
Membres Identifier
Microsoft.Office.Server.ApplicationRegistry.MetadataModel, espace de noms