Platform SDK Java 8.5 API Reference

com.genesyslab.platform.applicationblocks.com.cache
Class CompositeConfCacheQueryEngine

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

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

An implementation of the query engine interface which allows for new query interpretation modules to be added at run time.


Constructor Summary
CompositeConfCacheQueryEngine()
           
 
Method Summary
 boolean canExecute(ICfgQuery query)
          Looks for a query engine in its list which is capable of executing the specified query.
 void register(IConfCacheQueryEngine queryEngine)
          Registers a query engine module.
<T extends ICfgObject>
java.util.Collection<T>
retrieveMultipleObjects(java.lang.Class<T> cls, ICfgQuery query)
          Looks for a query engine which is capable of executing the specified query, and if found, uses it to retrieve a list of objects based on that query.
<T extends ICfgObject>
T
retrieveObject(java.lang.Class<T> cls, CfgObjectType type, int dbid)
          Looks for a query engine which returns a result using the parameters passed.
<T extends ICfgObject>
T
retrieveObject(java.lang.Class<T> cls, ICfgQuery query)
          Looks for a query engine which is capable of executing the specified query, and if found, uses it to retrieve an object based on that query.
 void unregister(IConfCacheQueryEngine queryEngine)
          Unregisters a query engine module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeConfCacheQueryEngine

public CompositeConfCacheQueryEngine()
Method Detail

canExecute

public boolean canExecute(ICfgQuery query)
Looks for a query engine in its list which is capable of executing the specified query.

Specified by:
canExecute in interface IConfCacheQueryEngine
Parameters:
query - the query to execute
Returns:
true if a capable query engine is found, false otherwise

retrieveObject

public <T extends ICfgObject> T retrieveObject(java.lang.Class<T> cls,
                                               ICfgQuery query)
Looks for a query engine which is capable of executing the specified query, and if found, uses it to retrieve an object based on that query.

Specified by:
retrieveObject in interface IConfCacheQueryEngine
Type Parameters:
T - The type of object to retrieve
Parameters:
cls - class of object to be retrieved
query - The query to execute
Returns:
An object matching the passed query
Throws:
java.lang.IllegalArgumentException - Thrown if no query engine available to execute the query

retrieveMultipleObjects

public <T extends ICfgObject> java.util.Collection<T> retrieveMultipleObjects(java.lang.Class<T> cls,
                                                                              ICfgQuery query)
Looks for a query engine which is capable of executing the specified query, and if found, uses it to retrieve a list of objects based on that query.

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 to execute
Returns:
A list of objects matching the passed query
Throws:
java.lang.IllegalArgumentException - Thrown if no query engine available to execute the query

retrieveObject

public <T extends ICfgObject> T retrieveObject(java.lang.Class<T> cls,
                                               CfgObjectType type,
                                               int dbid)
Looks for a query engine which returns a result using the parameters passed. Returns the first obtained result.

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

register

public void register(IConfCacheQueryEngine queryEngine)
Registers a query engine module.

Parameters:
queryEngine - query engine module to register

unregister

public void unregister(IConfCacheQueryEngine queryEngine)
Unregisters a query engine module.

Parameters:
queryEngine - query engine module to unregister

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.