|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGDbStoreRowsCmd
TWGDbStoreRowsCmd encapsulates the parameters for inserting or updating rows in one or more database tables. All the tables updated must reside in a single physical database.
The TWGDbStoreRowsCmd object is passed as a parameter on an IPC command to the database update service node.
A TWGDbReply object is returned as output parameter 0 for this command.
Command behavior:
For tables that have keys this command handles both inserts and updates. The database will insert the row if a row with that key does not exist, otherwise it will update the existing row with the new data.
For tables that do not have keys all rows will be inserted. There is no capability for updating these rows.
Each TWGDbStoreRows object must contain values for all key columns for keyed tables. Values do not have to be specified for columns that are not part of a key.
If a value is not provided for a non-key column the database engine will treat these columns differently for inserted and updated rows:
Return codes (all found in TWGDatabaseConstants):
TWGDatabaseConstants
,
Serialized FormField Summary | |
---|---|
static int |
TWG_DB_STORE_ROWS_CMD
Command code for the store rows command |
static int |
TWG_DB_STORE_ROWS_CMD_INTEL
Command code for the store rows command with intelByteBuffer parameters. |
Constructor Summary | |
---|---|
|
TWGDbStoreRowsCmd()
Constructor for the building the command. |
protected |
TWGDbStoreRowsCmd(Command cmd)
This method is protected as an implementation side effect. |
|
TWGDbStoreRowsCmd(int type)
Constructor for the building the command. |
|
TWGDbStoreRowsCmd(java.lang.String version,
java.lang.String db)
Constructor for the building the command. |
|
TWGDbStoreRowsCmd(java.lang.String version,
java.lang.String db,
int type)
Constructor for the building the command. |
Method Summary | |
---|---|
void |
addRow(TWGDbStoreRow rowData)
Add a row to the command. |
boolean |
getAutoInventoryUpdateSignal()
Check to see if automatic inventory update request is set |
java.lang.String |
getDbName()
Get the database name parameter from the command |
protected int |
getIntelByteBufferSize()
This method is protected as an implementation side effect. |
int |
getNumRows()
Get the number of table row updates/inserts contained in the command. |
TWGDbStoreRow |
getRowAt(int rownum)
Get a specific row |
java.util.Vector |
getRows()
Get all the rows contained in the command. |
int |
getType()
Get the command type |
java.lang.String |
getVersion()
Get the version requested parameter from the command |
void |
setAutoInventoryUpdateSignal(boolean do_signal)
Request to automatically signal inventory update once store of rows is completed |
void |
setIntelByteBufferParms(Command cmd)
This method is public as an implementation side effect. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TWG_DB_STORE_ROWS_CMD
public static final int TWG_DB_STORE_ROWS_CMD_INTEL
Constructor Detail |
public TWGDbStoreRowsCmd()
public TWGDbStoreRowsCmd(int type)
type
- - update type (TWGDatabaseConstants.TRANSACTION or
TWGDatabaseconstants.UPDATE)public TWGDbStoreRowsCmd(java.lang.String version, java.lang.String db, int type)
version
- - the version of the database requested by the client.db
- - the name of the database to be updated (Currently supports only
TWGDatabase.TWG_DB_NAME, which is the default;type
- - update type (TWGDatabaseConstants.TRANSACTION or
TWGDatabaseconstants.UPDATE)public TWGDbStoreRowsCmd(java.lang.String version, java.lang.String db)
version
- - the version of the database requested by the client.db
- - the name of the database to be updated
Database names are found in TWGDatabaseConstants.protected TWGDbStoreRowsCmd(Command cmd) throws TWGDbException
Constructor for the building the command from an IPC command that contains IntelByteBuffer format input parms for creating this command
cmd
- - the IPC command
-
- TWGDbException thrown for version errors
-
- TWGDbParamterException thrown for parameter errors
TWGDbException
Method Detail |
public void setIntelByteBufferParms(Command cmd) throws TWGDbException
cmd
- - the IPC command whose input parameters will be set by this method
-
- TWGDbException thrown for parameter or version errors
TWGDbException
protected int getIntelByteBufferSize()
public void addRow(TWGDbStoreRow rowData)
rowData
- - a TWGDbStoreRowTWGDbStoreRow
public java.lang.String getVersion()
public java.lang.String getDbName()
public int getType()
public int getNumRows()
public TWGDbStoreRow getRowAt(int rownum)
rownum
- - the number for the row (0 origin)
TWGDbStoreRow
public java.util.Vector getRows()
TWGDbStoreRow
public void setAutoInventoryUpdateSignal(boolean do_signal)
do_signal
- - true if update should be signalled, false if notpublic boolean getAutoInventoryUpdateSignal()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |