com.sap.mdm.publishing2.commands
Class GetNodeRecordDataCommand

java.lang.Object
  extended bycom.sap.mdm.commands.AbstractCommandBase
      extended bycom.sap.mdm.commands.AbstractCommand
          extended bycom.sap.mdm.publishing2.commands.GetNodeRecordDataCommand
All Implemented Interfaces:
Command, PassportSupport

public class GetNodeRecordDataCommand
extends AbstractCommand

Retrieves all record data associated with a node in the Hierarchy pane, and converts it into a string format.


Constructor Summary
GetNodeRecordDataCommand(ConnectionAccessor connection)
          Creates a new instance of the command.
 
Method Summary
 AdoptedRelationshipsRecords getAdoptedRelationships()
          Gets an AdoptedRelationships class instance
 LiidWrapper getColumnLiid(int column)
          Gets the Liid (an MDM field descriptor) of a data grid column.
 RecordId[] getExcludedRecordIds()
          Gets an array of recordIds for records excluded from the calculation of the printable layout, @see com.sap.mdm.publishing2.commands.GetLivePrintableContentCommand
 int getNodeId()
          Returns the ID of the current node.
 int getNumberOfFields()
          Gets the number of fields in the returned data grid
 int getNumberOfRows()
          Gets the number of rows in the returned data grid
 int getPublicationId()
          Sets the ID of the current publication.
 RecordId getRecordIdByRow(int row)
          Deprecated. Don't call this method, due to a performance hit. Instead call: getRecordIdByRowAndColumn.
 RecordId getRecordIdByRowAndColumn(int row, int column)
          Gets the ID of the record specified by the data grid row number
 RecordId[] getRecordIds()
          Gets an array of record IDs excluded from the printable layout.
 String getStringValueByCell(int row, int column)
          Gets a string value of the data grid cell specified by the row and column numbers
 String getStringValueByColumn(RecordId recordId, int column)
          Gets a string value of a data grid cell specified by the record ID and column number
 String getStringValueByField(RecordId recordId, LiidWrapper liid)
          Gets a string value of a data grid cell specified by the record and field
 void setNodeId(int presentationNodeId)
          Sets the ID of the current presentation node.
 void setPublicationId(int publicationId)
          Sets the ID of the current publication.
 
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

GetNodeRecordDataCommand

public GetNodeRecordDataCommand(ConnectionAccessor connection)
Creates a new instance of the command.

Parameters:
connection - the connections to the server.
Method Detail

setPublicationId

public void setPublicationId(int publicationId)
Sets the ID of the current publication.

Parameters:
publicationId - obtained from GetPublicationListCommand

getPublicationId

public int getPublicationId()
Sets the ID of the current publication.

Returns:
The ID of the current publication.

setNodeId

public void setNodeId(int presentationNodeId)
Sets the ID of the current presentation node.

Parameters:
presentationNodeId - obtained from GetPublicationTreeCommand

getNodeId

public int getNodeId()
Returns the ID of the current node.

Returns:
The ID of the current presentation node.

getNumberOfFields

public int getNumberOfFields()
Gets the number of fields in the returned data grid

Returns:
The number of fields

getNumberOfRows

public int getNumberOfRows()
Gets the number of rows in the returned data grid

Returns:
The number of rows

getRecordIds

public RecordId[] getRecordIds()
Gets an array of record IDs excluded from the printable layout.

Returns:
An array of RecordIds

getColumnLiid

public LiidWrapper getColumnLiid(int column)
Gets the Liid (an MDM field descriptor) of a data grid column.

Parameters:
column - the number of the data grid column
Returns:
A LiidWrapper object for the specified column

getExcludedRecordIds

public RecordId[] getExcludedRecordIds()
Gets an array of recordIds for records excluded from the calculation of the printable layout, @see com.sap.mdm.publishing2.commands.GetLivePrintableContentCommand

Returns:
An array of RecordIds

getAdoptedRelationships

public AdoptedRelationshipsRecords getAdoptedRelationships()
Gets an AdoptedRelationships class instance

Returns:
The AdoptedRelationshipsRecords

getStringValueByField

public String getStringValueByField(RecordId recordId,
                                    LiidWrapper liid)
Gets a string value of a data grid cell specified by the record and field

Parameters:
recordId - the record ID
Returns:
The string value of a data grid field

getStringValueByColumn

public String getStringValueByColumn(RecordId recordId,
                                     int column)
Gets a string value of a data grid cell specified by the record ID and column number

Parameters:
recordId - the record ID
column - the number of a data grid column
Returns:
The string value of a data grid field

getRecordIdByRow

public RecordId getRecordIdByRow(int row)
Deprecated. Don't call this method, due to a performance hit. Instead call: getRecordIdByRowAndColumn.

Gets the ID of the record specified by the data grid row number

Parameters:
row - the data grid row number
Returns:
The record ID

getRecordIdByRowAndColumn

public RecordId getRecordIdByRowAndColumn(int row,
                                          int column)
Gets the ID of the record specified by the data grid row number

Parameters:
row - the data grid row number
Returns:
The record ID

getStringValueByCell

public String getStringValueByCell(int row,
                                   int column)
Gets a string value of the data grid cell specified by the row and column numbers

Parameters:
row - the row number
column - the column number
Returns:
The string value of the data grid cell


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.