Platform SDK Java 8.5 API Reference

com.genesyslab.platform.applicationblocks.com.queries
Class CfgHostQuery

java.lang.Object
  extended by com.genesyslab.platform.applicationblocks.com.CfgQuery<TT>
      extended by com.genesyslab.platform.applicationblocks.com.CfgFilterBasedQuery<CfgHost>
          extended by com.genesyslab.platform.applicationblocks.com.queries.CfgHostQuery
All Implemented Interfaces:
ICfgFilterBasedQuery<CfgHost>, ICfgQuery<CfgHost>, ICfgQueryObjectClass<CfgHost>

public class CfgHostQuery
extends CfgFilterBasedQuery<CfgHost>

Class designed to construct queries to the Configuration Service for reading CfgHost object(s).

See Also:
ConfService, CfgHost

Constructor Summary
CfgHostQuery()
          Create query object with default filter value for configuration objects of CfgHost type.
CfgHostQuery(IConfService service)
          Create query object with default filter value for configuration objects of CfgHost type.
CfgHostQuery(int dbid)
          Create query object with filter initialized for the object DBID.
CfgHostQuery(java.lang.String name)
          Create query object with filter initialized for object name value.
 
Method Summary
 AsyncRequestResult<CfgHost> beginExecute(Action<AsyncRequestResult<CfgHost>> callback, java.lang.Object state)
          Begins the asynchronous execution of the current query.
 java.util.Collection<CfgHost> execute()
          Executes the query and returns a list of CfgHost objects.
 CfgHost executeSingleResult()
          Executes a query the result of which is a single object.
 int getDbid()
          A unique identifier of a host.
 CfgHostType getHostType()
          Type of the host (see CfgHostType ).
 java.lang.String getName()
          Name of a host.
 CfgOSType getOsType()
          Type of the operating system (see CfgOSType ).
 int getScsDbid()
          A unique identifier of SCS.
 CfgObjectState getState()
          Current state of a host (see CfgObjectState ).
 void setDbid(int value)
          A unique identifier of a host.
 void setHostType(CfgHostType value)
          Type of the host (see CfgHostType ).
 void setName(java.lang.String value)
          Name of a host.
 void setOsType(CfgOSType value)
          Type of the operating system (see CfgOSType ).
 void setScsDbid(int value)
          A unique identifier of SCS.
 void setState(CfgObjectState value)
          Current state of a host (see CfgObjectState ).
 
Methods inherited from class com.genesyslab.platform.applicationblocks.com.CfgFilterBasedQuery
equals, getCfgObjectClass, getCfgObjectType, getDoRequestFolderId, getDoRequestObjectPath, getExtraFilter, getFilter, getInt, getProperty, getQueryObjectClass, getString, hashCode, setDoRequestFolderId, setDoRequestObjectPath, setObjectClass, setProperty, toString
 
Methods inherited from class com.genesyslab.platform.applicationblocks.com.CfgQuery
beginExecute, endExecute, execute, executeSingleResult
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.genesyslab.platform.applicationblocks.com.ICfgQuery
beginExecute, endExecute, execute, executeSingleResult
 

Constructor Detail

CfgHostQuery

public CfgHostQuery()
Create query object with default filter value for configuration objects of CfgHost type. This query will not be executable.


CfgHostQuery

public CfgHostQuery(IConfService service)
Create query object with default filter value for configuration objects of CfgHost type. If an instance of the configuration service is provided, the query will be executable.

Parameters:
service - The configuration service to use when executing this query

CfgHostQuery

public CfgHostQuery(int dbid)
Create query object with filter initialized for the object DBID.

Parameters:
dbid - value for filter on object dbid
See Also:
setDbid(int)

CfgHostQuery

public CfgHostQuery(java.lang.String name)
Create query object with filter initialized for object name value.

Parameters:
name - value for filter on object name
See Also:
setName(String)
Method Detail

executeSingleResult

public CfgHost executeSingleResult()
                            throws ConfigException
Executes a query the result of which is a single object. Exception will be thrown if multiple objects are returned by the configuration server.

Overrides:
executeSingleResult in class CfgQuery<CfgHost>
Returns:
the CfgHost object retrieved as a result of this operation
Throws:
ConfigException

execute

public java.util.Collection<CfgHost> execute()
                                      throws ConfigException,
                                             java.lang.InterruptedException
Executes the query and returns a list of CfgHost objects.

Overrides:
execute in class CfgQuery<CfgHost>
Returns:
A collection of CfgHost objects
Throws:
ConfigException
java.lang.InterruptedException

beginExecute

public AsyncRequestResult<CfgHost> beginExecute(Action<AsyncRequestResult<CfgHost>> callback,
                                                java.lang.Object state)
                                         throws ConfigException
Begins the asynchronous execution of the current query.

Parameters:
callback - The method to be called when query results are available
state - a user-defined object that qualifies or contains information about an asynchronous operation
Returns:
AsyncRequestResult describing the current operation
Throws:
ConfigException

setOsType

public final void setOsType(CfgOSType value)
Type of the operating system (see CfgOSType ). If specified, Configuration Server will return information only about the hosts that use operating systems of this type.

Parameters:
value - filter value on field "os_type".

getOsType

public final CfgOSType getOsType()
Type of the operating system (see CfgOSType ). If specified, Configuration Server will return information only about the hosts that use operating systems of this type.

Returns:
filter value or null (if applicable)
See Also:
setOsType(CfgOSType)

setHostType

public final void setHostType(CfgHostType value)
Type of the host (see CfgHostType ). If specified, Configuration Server will return information only about the hosts of this type.

Parameters:
value - filter value on field "host_type".

getHostType

public final CfgHostType getHostType()
Type of the host (see CfgHostType ). If specified, Configuration Server will return information only about the hosts of this type.

Returns:
filter value or null (if applicable)
See Also:
setHostType(CfgHostType)

setState

public final void setState(CfgObjectState value)
Current state of a host (see CfgObjectState ). If specified, Configuration Server will return information only about hosts that are currently in this state.

Parameters:
value - filter value on field "state".

getState

public final CfgObjectState getState()
Current state of a host (see CfgObjectState ). If specified, Configuration Server will return information only about hosts that are currently in this state.

Returns:
filter value or null (if applicable)
See Also:
setState(CfgObjectState)

setName

public final void setName(java.lang.String value)
Name of a host. Shall be specified as a character string. If specified, Configuration Server will return information only about the host(s) with that name.

Parameters:
value - filter value on field "name".

getName

public final java.lang.String getName()
Name of a host. Shall be specified as a character string. If specified, Configuration Server will return information only about the host(s) with that name.

Returns:
filter value or null (if applicable)
See Also:
setName(String)

setDbid

public final void setDbid(int value)
A unique identifier of a host. If specified, Configuration Server will return information only about this host.

Parameters:
value - filter value on field "dbid".

getDbid

public final int getDbid()
A unique identifier of a host. If specified, Configuration Server will return information only about this host.

Returns:
filter value or null (if applicable)
See Also:
setDbid(int)

setScsDbid

public final void setScsDbid(int value)
A unique identifier of SCS. If specified, Configuration Server will return information only about hosts controlled by this SCS.

Parameters:
value - filter value on field "scs_dbid".

getScsDbid

public final int getScsDbid()
A unique identifier of SCS. If specified, Configuration Server will return information only about hosts controlled by this SCS.

Returns:
filter value or null (if applicable)
See Also:
setScsDbid(int)

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.