View Javadoc
1 /*** 2 * Copyright (c) 2002, Reuters America Inc. All rights reserved.<p> 3 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following 4 * conditions are met:<p> 5 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 7 * in the documentation and/or other materials provided with the distribution. Neither the name of Reuters America Inc. nor the 8 * names of its contributors may be used to endorse or promote products derived from this software without specific prior written 9 * permission.<p> 10 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 11 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 12 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 13 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 14 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 15 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<p> 16 */ 17 18 package com.reuters.rc.db; 19 20 import com.tibco.tibrv.*; 21 22 /*** 23 * This interface abstracts the data within a message published 24 * by an ADB-like agent. It provides methods to extract the data from 25 * the message. <p> 26 * 27 * If a database table has the parent role in a parent-child relationship 28 * with another table and the DB publishing agents are configured to published 29 * child rows, then, when the parent table is modified, DB agent will publish 30 * the related rows from the child table(s). The child table data can be 31 * retrieved by getChildRowData method.<p> 32 * 33 * @author Jawaid Hakim. 34 * @author Cavit Aydin (converted to an interface) 35 * @see ChildPubMsgData 36 */ 37 public interface DbPubMsgData 38 { 39 40 /*** 41 * Check if the object contains a valid result set. 42 * @return <code>true</code> if the object contains a valid 43 * result set. Returns <code>false</code> if the object does 44 * not contain a valid result set. 45 */ 46 public boolean isValid(); 47 48 /*** 49 * Get the published data message. 50 * @return Published data message. 51 */ 52 public TibrvMsg getData(); 53 54 55 /*** 56 * Get the message class - the message class is the name of the table 57 * from which the update is published. 58 * @return Message class name. <code>null</code> is returned if the 59 * class name is not formatted correctly. 60 */ 61 public String getClassName() throws DbSystemException; 62 63 64 /*** 65 * Get the message subject. 66 * @return Message subject. Returns <code>null</code> if subject is not found. 67 */ 68 public String getSubject() throws DbBusinessException, DbSystemException; 69 70 71 /*** 72 * Get the message sequence number. 73 * @return Message sequence number. Returns <code>null</code> if sequence 74 * number is not found. 75 */ 76 public Long getSequence() throws DbBusinessException, DbSystemException; 77 78 79 /*** 80 * Get the message opcode. The opcode is the code returned by ADB. 81 * @return Message opcode. 82 * @see AdbOpcode 83 */ 84 public DbOpcode getOpcode() throws DbBusinessException, DbSystemException; 85 86 87 88 /*** 89 * Get the Agent Id. 90 * @return Agent id. Returns <code>null</code> if agent id is not found. 91 */ 92 public String getAgentId() throws DbBusinessException, DbSystemException; 93 94 95 /*** 96 * Get all the child table data. 97 * @returns Array of all child table data. The array length is <code>0</code> 98 * if no child table data is found. 99 * @see ChildPubMsgData 100 */ 101 public DbChildPubMsgData[] getChildRowData(); 102 103 104 }

This page was automatically generated by Maven