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

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

public class QueryBuilder
extends java.lang.Object

Author:
Sameer Charles $Id: QueryBuilder.java 32667 2010-03-13 00:37:06Z gjoseph $ 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  java.lang.String buildOrderByClause()
          Order clause
protected  java.lang.String buildWhereClause()
          Build the complete where clause
protected  java.lang.String buildWhereClause(SearchQueryExpression expression)
          NOTE : its a very simple in-order binary traversal, order of operation is not preserved
 java.lang.String getSQLStatement()
          get SQL statement based on SearchQuery
 boolean isUseJCROrderBy()
           
 void setUseJCROrderBy(boolean useJCROrderBy)
           
protected  java.lang.String toDateJCRExpression(DateSearchQueryParameter param)
          Make a jcr expression out of the expression
protected  java.lang.String toJCRExpression(SearchQueryExpression expression)
          Make a jcr expression out of the expression
protected  java.lang.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 java.lang.String getSQLStatement()
get SQL statement based on SearchQuery

Returns:
SQL statement

buildWhereClause

protected java.lang.String buildWhereClause()
Build the complete where clause


buildOrderByClause

protected java.lang.String buildOrderByClause()
Order clause


buildWhereClause

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

Parameters:
expression -

toJCRExpression

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

Parameters:
expression -
Returns:
the expression as string

toDateJCRExpression

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

Parameters:
param -
Returns:
the expression as a string

toStringJCRExpression

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

isUseJCROrderBy

public boolean isUseJCROrderBy()

setUseJCROrderBy

public void setUseJCROrderBy(boolean useJCROrderBy)


Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.