|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGDbReplaceManagedObjCmd
TWGDbReplaceManagedObjCmd encapsulates the parameters for replacing the rows for a managed object in one or more tables with new rows. The object is passed as a parameter on an IPC command to the database update service node.
First all the rows for the managed object are deleted from the tables specified in the replacement rows. Then the replacement rows are inserted into the database tables. If there are tables other than the ones in the replacement rows that need to have rows * deleted a separate Delete Rows request must be issued.
If any of the deletes or inserts fails, the entire set of commands is backed out of the database -- no commit is done.
This command does not support replacing more than one managed object per request
Return codes (all found in TWGDatabaseConstants):
TWGDatabaseConstants
,
Serialized FormField Summary | |
---|---|
static int |
TWG_DB_REPLACE_MANAGEDOBJ_CMD
Command code for the replace managed object command |
static int |
TWG_DB_REPLACE_MANAGEDOBJ_CMD_INTEL
Command code for the replace managed object command with intelByteBuffer parameters |
Constructor Summary | |
---|---|
protected |
TWGDbReplaceManagedObjCmd(Command cmd)
This method is protected as an implementation side effect. |
|
TWGDbReplaceManagedObjCmd(int managed_object_id)
Constructor for the building the command. |
|
TWGDbReplaceManagedObjCmd(java.lang.String version,
java.lang.String db,
int managed_object_id)
Constructor for the building the command specifying a specific database and version. |
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 |
getHeaderIntelByteBufferSize()
Determines the IntelByteBuffer size for the first parameter (header) of a store rows command |
int |
getManagedObjId()
Get the managed object id whose rows are being replaced. |
int |
getNumRows()
Get the number of replacement table rows contained in the command. |
TWGDbStoreRow |
getRowAt(int rownum)
Get a specific row |
java.util.Vector |
getRows()
Get all the rows contained in the command. |
java.lang.String |
getVersion()
Get the database version 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_REPLACE_MANAGEDOBJ_CMD
public static final int TWG_DB_REPLACE_MANAGEDOBJ_CMD_INTEL
Constructor Detail |
public TWGDbReplaceManagedObjCmd(int managed_object_id)
managed_object_id
- - managed object id whose rows will be replaced.public TWGDbReplaceManagedObjCmd(java.lang.String version, java.lang.String db, int managed_object_id)
version
- - the version of the database requested by the client.
Database versions are found in TWGDatabaseConstants.db
- - the name of the database to be updated.
Database names are found in TWGDatabaseConstants.managed_object_id
- - managed object id with which the row will be replaced.TWGDatabaseConstants
protected TWGDbReplaceManagedObjCmd(Command cmd) throws TWGDbException
Constructor for the building the command from an IPC command that has IntelByteBuffer format input parameters for this command
cmd
- - the IPC command
-
- TWGDbException thrown for version errors
-
- TWGDbParameterException thrown for parameter errors
TWGDbException
Method Detail |
public void addRow(TWGDbStoreRow rowData)
rowData
- - a TWGDbStoreRowTWGDbStoreRow
public TWGDbStoreRow getRowAt(int rownum)
rownum
- - the number for the row (0 origin)
TWGDbStoreRow
public java.util.Vector getRows()
TWGDbStoreRow
public int getNumRows()
public java.lang.String getVersion()
public java.lang.String getDbName()
public int getManagedObjId()
public void setIntelByteBufferParms(Command cmd) throws TWGDbException
Build IntelByteBuffer parms version of this command and add them to the IPC command
cmd
- - the IPC command whose input parameters will be set by this method
-
- TWGDbException thrown for parameter or version errors
TWGDbException
protected int getHeaderIntelByteBufferSize()
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 |