info.magnolia.cms.gui.controlx.search
Class QueryBuilder

java.lang.Object
  extended by info.magnolia.cms.gui.controlx.search.QueryBuilder

public class QueryBuilder
extends Object

Author:
Sameer Charles $Id$ package private helper class Implement this class if you need any further operations in future NOTE : its a very simple in-order binary traversal, order of operation is not preserved

Constructor Summary
QueryBuilder(RepositorySearchListModel model)
          package private
 
Method Summary
protected  String buildOrderByClause()
          Order clause
protected  String buildWhereClause()
          Build the complete where clause
protected  String buildWhereClause(SearchQueryExpression expression)
          NOTE : its a very simple in-order binary traversal, order of operation is not preserved
 String getSQLStatement()
          get SQL statement based on SearchQuery
 boolean isUseJCROrderBy()
           
 void setUseJCROrderBy(boolean useJCROrderBy)
           
protected  String toDateJCRExpression(DateSearchQueryParameter param)
          Make a jcr expression out of the expression
protected  String toJCRExpression(SearchQueryExpression expression)
          Make a jcr expression out of the expression
protected  String toStringJCRExpression(StringSearchQueryParameter param)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryBuilder

public QueryBuilder(RepositorySearchListModel model)
package private

Parameters:
model -
Method Detail

getSQLStatement

public String getSQLStatement()
get SQL statement based on SearchQuery

Returns:
SQL statement

buildWhereClause

protected String buildWhereClause()
Build the complete where clause


buildOrderByClause

protected String buildOrderByClause()
Order clause


buildWhereClause

protected String buildWhereClause(SearchQueryExpression expression)
NOTE : its a very simple in-order binary traversal, order of operation is not preserved

Parameters:
expression -

toJCRExpression

protected String toJCRExpression(SearchQueryExpression expression)
Make a jcr expression out of the expression

Parameters:
expression -
Returns:
the expression as string

toDateJCRExpression

protected String toDateJCRExpression(DateSearchQueryParameter param)
Make a jcr expression out of the expression

Parameters:
param -
Returns:
the expression as a string

toStringJCRExpression

protected String toStringJCRExpression(StringSearchQueryParameter param)
Parameters:
param -
Returns:
jcr search expression

isUseJCROrderBy

public boolean isUseJCROrderBy()

setUseJCROrderBy

public void setUseJCROrderBy(boolean useJCROrderBy)


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.