com.sap.mdm.data.commands
Class ModifyRecordHierarchyCommand

java.lang.Object
  extended bycom.sap.mdm.commands.AbstractCommandBase
      extended bycom.sap.mdm.commands.AbstractCommand
          extended bycom.sap.mdm.session.AbstractSessionCommand
              extended bycom.sap.mdm.session.AbstractUserSessionCommand
                  extended bycom.sap.mdm.data.commands.ModifyRecordHierarchyCommand
All Implemented Interfaces:
Command, PassportSupport

public class ModifyRecordHierarchyCommand
extends AbstractUserSessionCommand

This command is responsible for changing the location of record in the hierarchy structure. This command is relevant only for the records of hierarchy table.


Constructor Summary
ModifyRecordHierarchyCommand(ConnectionAccessor connection)
          Constructor
ModifyRecordHierarchyCommand(UserSessionContext ctx)
          Creates a new instance of this command by context.
 
Method Summary
 RecordId getParentRecordId()
          Gets parent record ID.
 int getPosition()
          Gets record position
 RecordId getRecordId()
          Get the ID of record which location should be changed.
 TableId getTableId()
          Get the ID of hierarchy table that includes the record which hierarchy should be changed.
 void setParentRecordId(RecordId parentRecordId)
          Sets parent record ID (optional).
 void setPosition(int position)
          Sets record position (optional).
 void setRecordId(RecordId recordId)
          Set the record ID which location should be changed (required).
 void setTableId(TableId tableId)
          Set the ID of hierarchy table that includes the record which hierarchy should be changed (required).
 
Methods inherited from class com.sap.mdm.commands.AbstractCommand
getSession, setSession
 
Methods inherited from class com.sap.mdm.commands.AbstractCommandBase
execute, getPassport, isCommandComplete, setPassport
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifyRecordHierarchyCommand

public ModifyRecordHierarchyCommand(ConnectionAccessor connection)
Constructor

Parameters:
connection - a connection to the MDM server

ModifyRecordHierarchyCommand

public ModifyRecordHierarchyCommand(UserSessionContext ctx)
                             throws ConnectionException,
                                    SessionException
Creates a new instance of this command by context.

Parameters:
ctx - the user session context.
Method Detail

getRecordId

public RecordId getRecordId()
Get the ID of record which location should be changed.

Returns:
the record ID

setRecordId

public void setRecordId(RecordId recordId)
Set the record ID which location should be changed (required).

Parameters:
recordId - the ID of record which location should be changed in the hierarchy.

getTableId

public TableId getTableId()
Get the ID of hierarchy table that includes the record which hierarchy should be changed.

Returns:
the table ID

setTableId

public void setTableId(TableId tableId)
Set the ID of hierarchy table that includes the record which hierarchy should be changed (required).

Parameters:
tableId - the ID of hierarchy table that includes the record which hierarchy should be changed.

getParentRecordId

public RecordId getParentRecordId()
Gets parent record ID.

Returns:
the parentRecordId

setParentRecordId

public void setParentRecordId(RecordId parentRecordId)
Sets parent record ID (optional). If not specified then the record is moved to the root of hierarchy.

Parameters:
parentRecordId - the parent record ID to set

getPosition

public int getPosition()
Gets record position

Returns:
the position

setPosition

public void setPosition(int position)
Sets record position (optional). The position is enumerated starting from 0. If position is not specified then the record as appended as the last root record (when parent ID is not specified) or as the last child record (when parent ID is specified).

Parameters:
position - the position in the hierarchy level.


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.