@Component(value="blQueryHelper") public class QueryHelperImpl extends Object implements QueryHelper, org.springframework.context.ApplicationContextAware
QueryHelper. Utilizes the BroadleafRequestContext to store query hints
in a ThreadLocal context.| Constructor and Description |
|---|
QueryHelperImpl() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getQueryHint(String hintKey) |
List |
getResultListWithHint(javax.persistence.Query query,
String hintKey,
Object hintValue) |
<T> List<T> |
getResultListWithHint(javax.persistence.TypedQuery<T> query,
String hintKey,
Object hintValue) |
Object |
getSingleResultWithHint(javax.persistence.Query query,
String hintKey,
Object hintValue) |
<T> T |
getSingleResultWithHint(javax.persistence.TypedQuery<T> query,
String hintKey,
Object hintValue) |
static QueryHelper |
getSingleton() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public static QueryHelper getSingleton()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic <T> List<T> getResultListWithHint(javax.persistence.TypedQuery<T> query, String hintKey, Object hintValue)
getResultListWithHint in interface QueryHelperpublic <T> T getSingleResultWithHint(javax.persistence.TypedQuery<T> query,
String hintKey,
Object hintValue)
getSingleResultWithHint in interface QueryHelperpublic List getResultListWithHint(javax.persistence.Query query, String hintKey, Object hintValue)
getResultListWithHint in interface QueryHelperpublic Object getSingleResultWithHint(javax.persistence.Query query, String hintKey, Object hintValue)
getSingleResultWithHint in interface QueryHelperpublic Object getQueryHint(String hintKey)
getQueryHint in interface QueryHelperCopyright © 2022. All rights reserved.