com.sap.mdm.data
Interface KeyMappingSet

All Superinterfaces:
Cloneable, RepositoryItem
All Known Subinterfaces:
AttributeKeyMapping, RecordKeyMapping

public interface KeyMappingSet
extends RepositoryItem, Cloneable

This interface represents set of key mappings for different remote systems. Such set can define either record key mappings or attribute key mappings

See Also:
RecordKeyMapping, AttributeKeyMapping

Method Summary
 void addKey(RemoteSystemId remoteSystem, String key)
          Add key to the key mapping with the specified remote system.
 void addKeyMapping(KeyMapping keyMapping)
          Add a new key mapping
 Object clone()
          Returns a clone.
 boolean containsKey(RemoteSystemId remoteSystem, String key)
          Check if the specified key is contained in the key mapping with the specified remote system
 boolean containsKeyMapping(RemoteSystemId remoteSystem)
          Check if this set contains key mapping for the specified remote system
 int getCount()
          Get number of key mappings for different remote systems
 KeyMapping getKeyMapping(RemoteSystemId remoteSystem)
          Get key mapping for the specified remote system
 KeyMapping[] getKeyMappings()
          Get all key mappings in the set
 RemoteSystemId[] getRemoteSystems()
          Get IDs for all remote systems included in this set
 boolean isCompleteSet()
          Specify if this set of key mappings is complete set that user wants to see in repository.
 void removeKey(RemoteSystemId remoteSystem, String key)
          Remove key from the key mapping with the specified remote system
 KeyMapping removeKeyMapping(RemoteSystemId remoteSystem)
          Remove the specified key mapping
 void setCompleteSet(boolean isCompleteSet)
          Define if this set of key mappings is complete set that user wants to see in repository.
 void setDefaultKey(RemoteSystemId remoteSystem, String defaultKey)
          Set key as default in the key mapping with the specified remote system
 

Method Detail

getCount

public int getCount()
Get number of key mappings for different remote systems

Returns:
number of key mappings

getKeyMappings

public KeyMapping[] getKeyMappings()
Get all key mappings in the set

Returns:
array of KeyMapping instances

getRemoteSystems

public RemoteSystemId[] getRemoteSystems()
Get IDs for all remote systems included in this set

Returns:
array of remote system IDs

getKeyMapping

public KeyMapping getKeyMapping(RemoteSystemId remoteSystem)
Get key mapping for the specified remote system

Parameters:
remoteSystem - remote system ID
Returns:
key mapping or null if key mapping for specified remote system does not belong to this set

containsKeyMapping

public boolean containsKeyMapping(RemoteSystemId remoteSystem)
Check if this set contains key mapping for the specified remote system

Parameters:
remoteSystem - remote system ID
Returns:
true if this set contains the specified key mapping, false otherwise

addKeyMapping

public void addKeyMapping(KeyMapping keyMapping)
                   throws IllegalArgumentException
Add a new key mapping

Parameters:
keyMapping - a new key mapping
Throws:
IllegalArgumentException - if key mapping with the same remote system already exist in this set

removeKeyMapping

public KeyMapping removeKeyMapping(RemoteSystemId remoteSystem)
                            throws IllegalArgumentException
Remove the specified key mapping

Parameters:
remoteSystem - ID of remote system
Returns:
instance of removed key mapping
Throws:
IllegalArgumentException - if key mapping does not belong to this set

addKey

public void addKey(RemoteSystemId remoteSystem,
                   String key)
Add key to the key mapping with the specified remote system. If key mapping with specified remote system does not exist it will be created

Parameters:
remoteSystem - remote system ID
key - a new key

removeKey

public void removeKey(RemoteSystemId remoteSystem,
                      String key)
               throws IllegalArgumentException
Remove key from the key mapping with the specified remote system

Parameters:
remoteSystem - remote system ID
key - the key to remove
Throws:
IllegalArgumentException - if key mapping with the specified remote system does not exist in the set or if the key does not belongs to the key mapping

setDefaultKey

public void setDefaultKey(RemoteSystemId remoteSystem,
                          String defaultKey)
                   throws IllegalArgumentException
Set key as default in the key mapping with the specified remote system

Parameters:
remoteSystem - remote system ID
defaultKey - default key
Throws:
IllegalArgumentException - if key mapping with the specified remote system does not exist in the set or if the default key does not belongs to the key mapping

containsKey

public boolean containsKey(RemoteSystemId remoteSystem,
                           String key)
                    throws IllegalArgumentException
Check if the specified key is contained in the key mapping with the specified remote system

Parameters:
remoteSystem - remote system ID
key - key to check
Returns:
true if the key is found, otherwise false
Throws:
IllegalArgumentException - if key mapping with the specified remote system does not exist in the set

isCompleteSet

public boolean isCompleteSet()
Specify if this set of key mappings is complete set that user wants to see in repository. If the set is complete then on modify command all existing key mappings of record/attribute will be removed and the current set will completely replace them, otherwise only new/removed/modified key will be changed in repository

Returns:
true if set is complete, false if only differential changes will be used for modification

setCompleteSet

public void setCompleteSet(boolean isCompleteSet)
Define if this set of key mappings is complete set that user wants to see in repository. If the set is complete then on modify command all existing relationships for this anchor will be removed and the current group will completely replace them, otherwise only new/removed/modified relationship will be changed in repository

Parameters:
isCompleteSet - true if set is complete, false if only differential changes will be used for modification

clone

public Object clone()
Returns a clone.

Returns:
a clone


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.