public class SearchQuery
extends java.lang.Object
instance
.Constructor and Description |
---|
SearchQuery(Predicate predicate,
java.util.List<Order> orders,
ManagedBeanPool beanPool,
com.centrasite.jaxr.CentraSiteBusinessQuery centraSiteBusinessQuery)
Creates a SearchQuery instance for a given search properties.
|
Modifier and Type | Method and Description |
---|---|
void |
addPrologExtension(java.lang.String prologExtension)
Adds a prologExtension to a String of prolog extensions.
|
BulkResponse |
execute()
Creates and executes the business query.
|
java.lang.String |
generateNextContextObject()
Generates the next context object.
|
ManagedBeanPool |
getBeanPool()
Returns the bean pool.
|
PersistenceContext |
getContext()
Returns the persitanceContext.
|
java.lang.String |
getCurrentContextObject()
Returns the current context object and iterates for the next.
|
java.util.Locale |
getLocale()
Returns the current locale.
|
int |
getLocalFunctionCount()
Gets the local function count.
|
java.lang.String |
getNextContextObject()
Gets the next context object.
|
javax.xml.namespace.QName |
getObjectTypeName(java.lang.Class<? extends RegistryBean> beanClass)
Gives the object type name for a given bean class.
|
java.lang.String |
getPrefixForNamespaceUri(java.lang.String nameSpaceUri,
boolean importRequired)
Declares and returns a prefix for a given nameSpaceUri.
|
java.lang.String |
getPreviousContextObjectType()
Gets the previous context object type.
|
java.lang.String |
getPrologExtension()
Gets the prolog extension.
|
java.lang.String |
getQueryPath()
Gets the query path.
|
boolean |
isInFunction()
Checks if this query is in function.
|
void |
resetContextObjects()
Resets the values of the context objects so they are ready for next iteration.
|
void |
setIsInFunction(boolean isInFunction)
Sets whether the search query should be in function or not.
|
void |
setLocalFunctionCount(int localFunctionCount)
Sets the local function count.
|
void |
setNextFunctionCount()
Sets the next function count by incrementing.
|
void |
setPreviousContextObjectType(java.lang.String previsousContextObjectType)
Sets the previous context object type.
|
void |
setPrologExtension(java.lang.String expression)
Declares a prolog extension in CentraSiteBusinessQuery.
|
void |
setQueryPath(java.lang.String queryPath)
Sets the query path.
|
public SearchQuery(Predicate predicate, java.util.List<Order> orders, ManagedBeanPool beanPool, com.centrasite.jaxr.CentraSiteBusinessQuery centraSiteBusinessQuery)
predicate
- The Predicate
for the queryorders
- The List
of Order
s for the search resultsbeanPool
- The ManagedBeanPool
containing the bean objectscentraSiteBusinessQuery
- The CentraSiteBusinessQuery
for constructing JAXR queriespublic BulkResponse execute() throws CSAppFrameworkException
BulkResponse
with info of the executed queryCSAppFrameworkException
- If an error occurs while executing the business querypublic java.lang.String getCurrentContextObject()
public void resetContextObjects()
public java.lang.String getPrefixForNamespaceUri(java.lang.String nameSpaceUri, boolean importRequired)
nameSpaceUri
- The namespace URIimportRequired
- If true
, namespace import is requiredpublic void setPrologExtension(java.lang.String expression)
expression
- The extension string to setpublic javax.xml.namespace.QName getObjectTypeName(java.lang.Class<? extends RegistryBean> beanClass) throws CSAppFrameworkException
beanClass
- The RegistryBean
Class
QName
CSAppFrameworkException
- If an error occurs in retrieving the object type namepublic PersistenceContext getContext()
PersistenceContext
instancepublic ManagedBeanPool getBeanPool()
ManagedBeanPool
instancepublic java.util.Locale getLocale()
Locale
public java.lang.String getPreviousContextObjectType()
public void setPreviousContextObjectType(java.lang.String previsousContextObjectType)
previsousContextObjectType
- the previous context object type to setpublic java.lang.String getQueryPath()
public void setQueryPath(java.lang.String queryPath)
queryPath
- The query pathpublic java.lang.String getNextContextObject()
public java.lang.String generateNextContextObject()
public boolean isInFunction()
true
if the query is in function and false
otherwisepublic void setIsInFunction(boolean isInFunction)
isInFunction
- If true
, the search query will be in functionpublic java.lang.String getPrologExtension()
public void addPrologExtension(java.lang.String prologExtension)
setPrologExtension(String)
so that they can be set in the query when needed.prologExtension
- The prolog extension string to addpublic int getLocalFunctionCount()
public void setLocalFunctionCount(int localFunctionCount)
localFunctionCount
- The local function count value to setpublic void setNextFunctionCount()