Platform SDK Java 8.5 API Reference

com.genesyslab.platform.applicationblocks.com.cache
Class DefaultConfCacheQueryEngine

java.lang.Object
  extended by com.genesyslab.platform.applicationblocks.com.cache.DefaultConfCacheQueryEngine
All Implemented Interfaces:
IConfCacheQueryEngine

public final class DefaultConfCacheQueryEngine
extends java.lang.Object
implements IConfCacheQueryEngine

The default query engine implementation.


Constructor Summary
DefaultConfCacheQueryEngine(IConfCacheStorage storage)
          Creates a new query engine which works with the specified storage.
 
Method Summary
 boolean canExecute(ICfgQuery query)
          Determines whether the query engine can execute the specified query.
<T extends ICfgObject>
java.util.Collection<T>
retrieveMultipleObjects(java.lang.Class<T> cls, ICfgQuery query)
          This method is from IConfCacheQueryEngine interface.
<T extends ICfgObject>
T
retrieveObject(java.lang.Class<T> cls, CfgObjectType type, int dbid)
          Retrieves an object using the specified parameters.
<T extends ICfgObject>
T
retrieveObject(java.lang.Class<T> cls, ICfgQuery query)
          Retrieves an object based on the specified query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfCacheQueryEngine

public DefaultConfCacheQueryEngine(IConfCacheStorage storage)
Creates a new query engine which works with the specified storage.

Parameters:
storage - The storage which will be queried
Method Detail

canExecute

public boolean canExecute(ICfgQuery query)
Determines whether the query engine can execute the specified query. Currently, only queries which contain an object type and dbid parameters are supported.

Specified by:
canExecute in interface IConfCacheQueryEngine
Parameters:
query - The query to execute
Returns:
true if the query engine can execute this query, false otherwise

retrieveObject

public <T extends ICfgObject> T retrieveObject(java.lang.Class<T> cls,
                                               ICfgQuery query)
Retrieves an object based on the specified query. Note that this implementation only supports the "dbid" and "type" query filters. All other filters are ignored.

Specified by:
retrieveObject in interface IConfCacheQueryEngine
Type Parameters:
T - The type of object to retrieve
Parameters:
query - The query by which to retrieve the object
cls - class of object to be retrieved
Returns:
The object specified by the query or null if the object is not found

retrieveObject

public <T extends ICfgObject> T retrieveObject(java.lang.Class<T> cls,
                                               CfgObjectType type,
                                               int dbid)
Retrieves an object using the specified parameters.

Specified by:
retrieveObject in interface IConfCacheQueryEngine
Type Parameters:
T - The type of object to retrieve
Parameters:
type - The type of object (CfgObjectType)
dbid - The dbid of the object
cls - class of object to be retrieved
Returns:
A configuration object with the requested dbid and type or null if the object is not found

retrieveMultipleObjects

public <T extends ICfgObject> java.util.Collection<T> retrieveMultipleObjects(java.lang.Class<T> cls,
                                                                              ICfgQuery query)
This method is from IConfCacheQueryEngine interface. It is not supported by this implementation.

Specified by:
retrieveMultipleObjects in interface IConfCacheQueryEngine
Type Parameters:
T - The type of object to retrieve
Parameters:
cls - class of objects to be retrieved
query - The query by which to retrieve the objects
Returns:
The objects specified by the query or an empty collection if no results are matching objects are found
Throws:
java.lang.RuntimeException

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.