com.tivoli.twg.engine
Class TWGDbRunQueryCmd

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGDbRunQueryCmd
All Implemented Interfaces:
java.io.Serializable

public class TWGDbRunQueryCmd
extends java.lang.Object
implements java.io.Serializable

TWGDbRunQueryCmd: run database query This command is for retrieving data from database tables based on a query. The query must be for tables in one physical database. This class can be serialized for use with the TWG IPC.

See Also:
Serialized Form

Field Summary
static int TWG_DB_RUN_QUERY_CMD
           
static int TWG_DB_RUN_QUERY_CMD_INTEL
           
 
Constructor Summary
protected TWGDbRunQueryCmd(byte[] buf)
          Constructor using an intel byte buffer format of this command as input
  TWGDbRunQueryCmd(long qId)
          Constructor for the building the command.
  TWGDbRunQueryCmd(long qId, LongValueSet managedObjId)
          TWGDbRunQueryCmd is used for running an existing query.
 
Method Summary
protected  int getBufferLen()
          Get the length of the buffer required to hold this object in intel byte buffer format
 java.util.Locale getLocale()
          Get the persistent object id of the query
 LongValueSet getManagedObjId()
          Get the list managed object used for targetted queries
 java.lang.Long getQueryId()
          Get the persistent object id of the query
 void setIntelByteBufferParms(Command cmd)
          This method is public as an implementation side effect.
 void setLocale(java.util.Locale queryLocale)
          Set the Locale to be used in translations
 void setLocale(java.lang.String language, java.lang.String country)
          Set the locale for translations
 void setLocale(java.lang.String language, java.lang.String country, java.lang.String variant)
          Set the locale for translations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TWG_DB_RUN_QUERY_CMD

public static final int TWG_DB_RUN_QUERY_CMD
See Also:
Constant Field Values

TWG_DB_RUN_QUERY_CMD_INTEL

public static final int TWG_DB_RUN_QUERY_CMD_INTEL
See Also:
Constant Field Values
Constructor Detail

TWGDbRunQueryCmd

public TWGDbRunQueryCmd(long qId,
                        LongValueSet managedObjId)

TWGDbRunQueryCmd is used for running an existing query. The persistent object id for the query is used to identify the query to be run.

The TWGDbRunQueryCmd object is passed as a parameter on an IPC command to the database query service node (TWGDatabaseConstants.QUERY_SERVICE_NODE_NAME).

Return codes (all found in TWGDatabaseConstants):


TWGDbRunQueryCmd

public TWGDbRunQueryCmd(long qId)
Constructor for the building the command.

Parameters:
qId - - the persistent object id

TWGDbRunQueryCmd

protected TWGDbRunQueryCmd(byte[] buf)
                    throws TWGDbException
Constructor using an intel byte buffer format of this command as input

This method should be called only in the Director server engine.

Parameters:
buf - = the intel byte buffer format of the command
Method Detail

setLocale

public void setLocale(java.util.Locale queryLocale)
Set the Locale to be used in translations


setLocale

public void setLocale(java.lang.String language,
                      java.lang.String country)
Set the locale for translations


setLocale

public void setLocale(java.lang.String language,
                      java.lang.String country,
                      java.lang.String variant)
Set the locale for translations


getLocale

public java.util.Locale getLocale()
Get the persistent object id of the query

Returns:
- the query's persistent object id

getQueryId

public java.lang.Long getQueryId()
Get the persistent object id of the query

Returns:
- the query's persistent object id

getManagedObjId

public LongValueSet getManagedObjId()
Get the list managed object used for targetted queries

Returns:
- a value set of managed object ids

setIntelByteBufferParms

public void setIntelByteBufferParms(Command cmd)
                             throws TWGDbException
This method is public as an implementation side effect. Do not call or change. Its interface may be changed in a later release.

Build IntelByteBuffer parms version of this command and add them to the IPC command

Parameters:
cmd - - the IPC command whose input parameters will be set by this method
Throws:
TWGDbException - thrown for parameter or version errors

getBufferLen

protected int getBufferLen()
Get the length of the buffer required to hold this object in intel byte buffer format

Returns:
the length