com.reuters.rc.db.adb
Class AdbMInstPubMsgData

java.lang.Object
  |
  +--com.reuters.rc.db.adb.AdbMInstPubMsgData
All Implemented Interfaces:
DbPubMsgData

public class AdbMInstPubMsgData
extends java.lang.Object
implements DbPubMsgData

This class represents the data of a MInstance message published by an ADB agent. It provides methods to extract the data from the MInstance message. A set of static methods is provided to extract the data from the MInstance message without having to create an instance of this class.

If a database table has the parent role in a parent-child relationship with another table and the ADB publishing agents are configured to published child rows, then, when the parent table is modified, ADB will publish the related rows from the child table(s). The child table data can be retrieved using an instance of this class.

Author:
Jawaid Hakim.
See Also:
AdbMInstChildPubMsgData

Constructor Summary
AdbMInstPubMsgData(com.tibco.tibrv.TibrvMsg msgData)
          Constructor.
 
Method Summary
 java.lang.String getAgentId()
          Get the Agent Id.
static java.lang.String getAgentId(com.tibco.tibrv.TibrvMsg rvMsg)
          Get the Agent Id.
 DbChildPubMsgData[] getChildRowData()
          Get all the child table data.
 java.lang.String getClassName()
          Get the message class - the message class is the name of the table from which the update is published.
static java.lang.String getClassName(com.tibco.tibrv.TibrvMsg rvMsg)
          Get the message class - the message class is the name of the table from which the update is published.
 com.tibco.tibrv.TibrvMsg getData()
          Get the published data message.
 DbOpcode getOpcode()
          Get the message opcode.
static AdbOpcode getOpcode(com.tibco.tibrv.TibrvMsg rvMsg)
          Get the message opcode.
 java.lang.Long getSequence()
          Get the message sequence number.
static java.lang.Long getSequence(com.tibco.tibrv.TibrvMsg rvMsg)
          Get the message sequence number.
 java.lang.String getSubject()
          Get the message subject.
static java.lang.String getSubject(com.tibco.tibrv.TibrvMsg rvMsg)
          Get the message subject.
 boolean isValid()
          Check if the object contains a valid result set.
 java.lang.String toString()
          Override.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdbMInstPubMsgData

public AdbMInstPubMsgData(com.tibco.tibrv.TibrvMsg msgData)
Constructor.
Parameters:
msgData - Data published by ADB.
Method Detail

isValid

public final boolean isValid()
Check if the object contains a valid result set.
Specified by:
isValid in interface DbPubMsgData
Returns:
true if the object contains a valid result set. Returns false if the object does not contain a valid result set.

getData

public final com.tibco.tibrv.TibrvMsg getData()
Get the published data message.
Specified by:
getData in interface DbPubMsgData
Returns:
Published data message.

getClassName

public final java.lang.String getClassName()
                                    throws AdbSystemException
Get the message class - the message class is the name of the table from which the update is published.
Specified by:
getClassName in interface DbPubMsgData
Returns:
Message class name. null is returned if the class name is not formatted correctly.

getClassName

public static java.lang.String getClassName(com.tibco.tibrv.TibrvMsg rvMsg)
                                     throws AdbSystemException
Get the message class - the message class is the name of the table from which the update is published.
Parameters:
rvMsg - Message data.
Returns:
Message class name. null is returned if the class name is not found.

getSubject

public final java.lang.String getSubject()
                                  throws AdbSystemException
Get the message subject.
Specified by:
getSubject in interface DbPubMsgData
Returns:
Message subject. Returns null if subject is not found.

getSubject

public static java.lang.String getSubject(com.tibco.tibrv.TibrvMsg rvMsg)
                                   throws AdbSystemException
Get the message subject.
Parameters:
rvMsg - Message data.
Returns:
Message subject. Returns null if subject is not found.

getSequence

public final java.lang.Long getSequence()
                                 throws AdbSystemException
Get the message sequence number.
Specified by:
getSequence in interface DbPubMsgData
Returns:
Message sequence number. Returns null if sequence number is not found.

getSequence

public static java.lang.Long getSequence(com.tibco.tibrv.TibrvMsg rvMsg)
                                  throws AdbSystemException
Get the message sequence number.
Parameters:
rvMsg - Message data.
Returns:
Message sequence number. Returns null if sequence number is not found.

getOpcode

public final DbOpcode getOpcode()
                         throws AdbSystemException
Get the message opcode. The opcode is the code returned by ADB.
Specified by:
getOpcode in interface DbPubMsgData
Returns:
Message opcode.
See Also:
AdbOpcode

getOpcode

public static AdbOpcode getOpcode(com.tibco.tibrv.TibrvMsg rvMsg)
                           throws AdbSystemException
Get the message opcode. The opcode is the code returned by ADB.
Parameters:
rvMsg - Message data.
Returns:
Message opcode. Returns null if opcode is not found.
See Also:
AdbOpcode

getAgentId

public final java.lang.String getAgentId()
                                  throws AdbSystemException
Get the Agent Id.
Specified by:
getAgentId in interface DbPubMsgData
Returns:
Agent id. Returns null if agent id is not found.

getAgentId

public static java.lang.String getAgentId(com.tibco.tibrv.TibrvMsg rvMsg)
                                   throws AdbSystemException
Get the Agent Id.
Parameters:
rvMsg - Message data.
Returns:
Agent id. Returns null if agent id is not found.

getChildRowData

public final DbChildPubMsgData[] getChildRowData()
Get all the child table data.
Specified by:
getChildRowData in interface DbPubMsgData
See Also:
AdbMInstChildPubMsgData

toString

public java.lang.String toString()
Override.
Overrides:
toString in class java.lang.Object


Copyright © 2002-2003 Reuters. All Rights Reserved.