com.atlassian.crowd.search.hibernate
Class HQLQuery

java.lang.Object
  extended by com.atlassian.crowd.search.hibernate.HQLQuery

public class HQLQuery
extends Object


Field Summary
protected  int aliasCounter
           
protected  boolean distinctRequired
           
protected  StringBuilder from
           
protected  StringBuilder orderBy
           
protected  boolean orderByRequired
           
protected  List<Object> parameterValues
           
protected  StringBuilder select
           
protected  StringBuilder where
           
protected  boolean whereRequired
           
 
Constructor Summary
HQLQuery()
           
 
Method Summary
 String addParameterPlaceholder(Object value)
          Creates a variable placeholder for a parameter
 StringBuilder appendFrom(CharSequence hql)
           
 StringBuilder appendOrderBy(CharSequence hql)
           
 StringBuilder appendSelect(CharSequence hql)
           
 StringBuilder appendWhere(CharSequence hql)
           
 String getNextAlias(String baseAliasName)
           
 List<Object> getParameterValues()
           
 void requireDistinct()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

select

protected final StringBuilder select

from

protected final StringBuilder from

where

protected final StringBuilder where

orderBy

protected final StringBuilder orderBy

aliasCounter

protected int aliasCounter

distinctRequired

protected boolean distinctRequired

whereRequired

protected boolean whereRequired

orderByRequired

protected boolean orderByRequired

parameterValues

protected final List<Object> parameterValues
Constructor Detail

HQLQuery

public HQLQuery()
Method Detail

appendSelect

public StringBuilder appendSelect(CharSequence hql)

appendFrom

public StringBuilder appendFrom(CharSequence hql)

appendWhere

public StringBuilder appendWhere(CharSequence hql)

appendOrderBy

public StringBuilder appendOrderBy(CharSequence hql)

getNextAlias

public String getNextAlias(String baseAliasName)

addParameterPlaceholder

public String addParameterPlaceholder(@Nullable
                                      Object value)
Creates a variable placeholder for a parameter

Parameters:
value - actual value of the parameter, or null if the parameter is to be ignored
Returns:
the JPA-style positional variable (?1, ?2, ...)

getParameterValues

public List<Object> getParameterValues()
Returns:
a list of parameter values. May contain null elements for parameters that are to be ignored

requireDistinct

public void requireDistinct()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Atlassian. All Rights Reserved.