Class QueryConfig
- java.lang.Object
-
- com.tangosol.coherence.rest.config.QueryConfig
-
public class QueryConfig extends Object
Holder for query configuration.Query configuration is composed of two parts:
- named queries (pre-defined queries that can be invoked using their name)
- direct query (queries submitted directly as part of URL)
- Author:
- ic 2011/11/26
- See Also:
NamedQuery
,DirectQuery
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,NamedQuery>
m_mapNamedQueries
Named query mappings.
-
Constructor Summary
Constructors Constructor Description QueryConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryConfig
addNamedQuery(NamedQuery query)
Add named query to this config.boolean
containsNamedQuery(String sName)
Return true if this configuration contains a query with given name.DirectQuery
getDirectQuery()
Return the direct query.NamedQuery
getNamedQuery(String sName)
Return the named query.boolean
isDirectQueryEnabled()
Return true if direct querying is enabled.QueryConfig
setDirectQuery(DirectQuery directQuery)
Set the direct query.
-
-
-
Field Detail
-
m_mapNamedQueries
protected Map<String,NamedQuery> m_mapNamedQueries
Named query mappings.
-
-
Method Detail
-
addNamedQuery
public QueryConfig addNamedQuery(NamedQuery query)
Add named query to this config.- Parameters:
query
- named query to add
-
getNamedQuery
public NamedQuery getNamedQuery(String sName)
Return the named query.- Parameters:
sName
- name of the query- Returns:
- named query
-
containsNamedQuery
public boolean containsNamedQuery(String sName)
Return true if this configuration contains a query with given name.- Parameters:
sName
- name of the query whose presence is to be tested- Returns:
- true if query with given name exists in this configuration.
-
getDirectQuery
public DirectQuery getDirectQuery()
Return the direct query.- Returns:
- direct query
-
setDirectQuery
public QueryConfig setDirectQuery(DirectQuery directQuery)
Set the direct query.- Parameters:
directQuery
- direct query
-
isDirectQueryEnabled
public boolean isDirectQueryEnabled()
Return true if direct querying is enabled.- Returns:
- true if direct querying is enabled
-
-